Skip to content

API Keys ​

Create and manage API keys for programmatic access. API keys authenticate requests the same way JWT bearer tokens do: pass the key in the Authorization header.

List API keys​

GET
/v1/api-keys

List the caller's API keys. Raw key material is never returned; each entry
carries only its metadata and a masked prefix. Organization admins may pass
user_id to view another member's keys.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Query Parameters

user_id

Responses​

Successful Response

application/json
JSON
{
  
"items": [
  
  
{
  
  
  
"created_at": "string",
  
  
  
"id": "string",
  
  
  
"key_prefix": "string",
  
  
  
"last_used_at": "string",
  
  
  
"name": "string",
  
  
  
"revoked_at": "string",
  
  
  
"user_id": "string"
  
  
}
  
]
}

Samples​

Create an API key​

POST
/v1/api-keys

Create an API key for the caller. The raw key is returned only once, in
this response — store it securely. If it is lost, revoke the key and create a
new one.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Request Body​

application/json
Max Length255
Min Length1

Responses​

Successful Response

application/json
JSON
{
  
"created_at": "string",
  
"id": "string",
  
"key_prefix": "string",
  
"name": "string",
  
"raw_key": "string"
}

Samples​

Revoke an API key​

DELETE
/v1/api-keys/{key_id}

Revoke an API key. Requests authenticating with it are rejected immediately.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Path Parameters

key_id*
Type
string
Required
Format
"uuid"

Responses​

Successful Response

Samples​