Create an API key

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

FieldRequiredDescription
titleYesTitle of the API key, 3 to 50 characters. Unique in the organization (case-insensitive).
rolesYesOne role: ORG_EDITOR or ORG_VIEWER
expiresAtNoExpiration 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: title is missing, shorter than 3 or longer than 50 characters, or already used; roles is empty, has more than one role, or a role other than ORG_EDITOR or ORG_VIEWER; or expiresAt is in the past or malformed.
  • 404: the organization doesn't exist.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

Id of the organization

Body Params

Title, role and optional expiration of the API key.

date-time

Expiration date and time (ISO-8601 with an offset), in the future. Left out: the API key never expires.

roles
array of strings
required

Role of the API key: one of ORG_EDITOR or ORG_VIEWER (case-insensitive)

roles*
Allowed:
string
required
length between 3 and 50

Title of the API key, 3 to 50 characters. Unique in the organization (case-insensitive).

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json