Creates an API key for your organization.
Required role: ORG_ADMIN (your organization), or SYS_ADMIN (any organization). API keys can't call this endpoint.
Fields
| Field | Required | Description |
|---|---|---|
title | Yes | Title of the API key, 3 to 50 characters. Unique in the organization (case-insensitive). |
roles | Yes | One role: ORG_EDITOR or ORG_VIEWER |
expiresAt | No | Expiration date and time (ISO-8601 with an offset), in the future. Left out: the key never expires. |
API keys
An API key lets an application call the API without signing in as a user. Send it in the Api-Key header of each request (instead of Authorization).
An API key acts as a member of the organization, with the email [email protected] (made of the first part of its id): give permissions to this email to give the API key access to resources. It has the ORG_EDITOR or ORG_VIEWER role, so it can't call the endpoints that need ORG_ADMIN, and some endpoints refuse API keys (403). An API key never belongs to a group.
An API key stops working when it expires (401), or about one minute after it is deleted.
Response
result holds the API key, with its value in apiKey. Copy it now: the other endpoints never return it.
When it fails
400:titleis missing, shorter than 3 or longer than 50 characters, or already used;rolesis empty, has more than one role, or a role other thanORG_EDITORorORG_VIEWER; orexpiresAtis in the past or malformed.404: the organization doesn't exist.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||