API Keys

Create API key

Creates a new API key scoped to the current organization. The full key value is returned only once — store it securely, as it cannot be retrieved again.

post/api-keys

Request body

namestring

Descriptive name for the key (defaults to 'API Key')

expiresIninteger

Expiration in seconds (e.g., 2592000 = 30 days). Omit for no expiry.

scopesstring[]

What this key may do. Defaults to every scope except keys:write, which a key can never hold. write includes read for the same resource.

Example request

{
  "name": "Production API Key",
  "expiresIn": 2592000,
  "scopes": [
    "jobs:write",
    "assets:write"
  ]
}

Response

API key created successfully

Changes