Create an organization admin API key

Create a new admin-level API key for the organization.

post/organization/admin_api_keys

Request body

namestring required

Example request

{
  "name": "New Admin Key"
}

Response

The newly created admin API key.

objectstring required

The object type, which is always organization.admin_api_key

idstring required

The identifier, which can be referenced in API endpoints

namestring required

The name of the API key

redacted_valuestring required

The redacted value of the API key

valuestring

The value of the API key. Only shown on create.

created_atinteger required

The Unix timestamp (in seconds) of when the API key was created

last_used_atinteger nullable required

The Unix timestamp (in seconds) of when the API key was last used

Example response

{
  "object": "organization.admin_api_key",
  "id": "key_abc",
  "name": "Administration Key",
  "redacted_value": "sk-admin...def",
  "value": "sk-admin-1234abcd",
  "created_at": 1711471533,
  "last_used_at": 1711471534,
  "owner": {
    "type": "user",
    "object": "organization.user",
    "id": "sa_456",
    "name": "My Service Account",
    "created_at": 1711471533,
    "role": "owner"
  }
}

Changes