Skip to main content
POST
Create an Admin API key with a subset of your permissions (`value` is returned once)

Authorizations

Authorization
string
header
required

ak_admin_… Admin API key

Body

application/json
name
string
required

1–120 Unicode code points, trimmed

Maximum string length: 120
permissions
enum<string>[]
required

A subset of the caller's own permissions (02 §6)

Required array length: 1 - 20 elements
Available options:
organization:read,
projects:read,
projects:create,
project_api_keys:read,
project_api_keys:create,
project_api_keys:revoke,
admin_api_keys:read,
admin_api_keys:create,
admin_api_keys:revoke,
billing:read,
spend_limits:read,
spend_limits:write,
policies:read,
policies:write
expires_at
string<date-time>

RFC 3339, in the future. Omit for a key that never expires

Response

Created

id
string
required
Pattern: ^key_[0-9a-f]{32}$
Example:

"key_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"

object
enum<string>
required
Available options:
organization.admin_api_key
name
string
required
redacted_value
string
required

Prefix + … + last 4

Example:

"ak_admin_…x9Qe"

owner
object
required
status
enum<string>
required
Available options:
active,
revoked,
expired,
suspended
permissions
enum<string>[]
required
Available options:
organization:read,
projects:read,
projects:create,
project_api_keys:read,
project_api_keys:create,
project_api_keys:revoke,
admin_api_keys:read,
admin_api_keys:create,
admin_api_keys:revoke,
billing:read,
spend_limits:read,
spend_limits:write,
policies:read,
policies:write
created_at
integer
required

Unix seconds

Example:

1793750400

last_used_at
integer | null
required

Unix seconds

Example:

1793750400

expires_at
integer | null
required

Unix seconds

Example:

1793750400

value
string
required

ak_admin_ + 43 base64url chars. Returned only by create

Example:

"ak_admin_Jd3…x9Qe"