v2

latestOpenAPI 3.1.02026-07-262937191.0 MB
beta.admin.api-keys

Create Api Key

Create a Workspace API key.

post/v1/admin/api-keys

Request body

namestring nullable

Optional name for the API key.

expirationstring date nullable

Date when the API key should expire.

workspace_uuidstring uuid required

Workspace ID for the API key.

user_idstring uuid required

ID of the user the API key is created for.

Example request

{
  "name": "Production API Key"
}

Response

OK

key_idstring uuid required

API key ID.

keystring nullable required

Plaintext API key value. Only returned at creation time.

namestring nullable required

Name of the API key.

hidden_keystring required

Masked API key value for display.

created_atstring date-time nullable required

Time when the API key was created.

expiration_datestring date nullable required

Date when the API key expires.

Example response

{
  "key": "HQSxfB7IaJRKNHRv0e5OAYJNO1h2Ug6Y",
  "name": "Production API Key",
  "hidden_key": "HQSx...Ug6Y"
}