API Tokens

List API tokens

get

Returns all API tokens visible to the current API token.

Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Path parameters
account_idinteger · int64 · min: 1Required

Unique account ID

Example: 3229
Responses
chevron-right
200

List of API tokens

application/json
idinteger · int64Optional

API token ID

namestringOptional

Token display name

last_4_digitsstringOptional

Last 4 characters of the token (full token is only shown on create or reset)

created_bystringOptional

Name of the user or token that created this token

expires_atstring · date-time · nullableOptional

When the token expires (ISO 8601); null if the token does not expire

get
/api/accounts/{account_id}/api_tokens
cURL

Create API token

post

Creates a new API token for the account with the given name and resource permissions.

Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Path parameters
account_idinteger · int64 · min: 1Required

Unique account ID

Example: 3229
Body
namestringRequired

Display name for the token

Responses
chevron-right
200

Created API token (includes full token value once)

application/json
idinteger · int64Optional

API token ID

namestringOptional

Token display name

last_4_digitsstringOptional

Last 4 characters of the token (full token is only shown on create or reset)

created_bystringOptional

Name of the user or token that created this token

expires_atstring · date-time · nullableOptional

When the token expires (ISO 8601); null if the token does not expire

tokenstringOptional

Full token value (only returned on create or reset; store securely)

post
/api/accounts/{account_id}/api_tokens
cURL

Get API token

get

Returns a single API token by id.

Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Path parameters
account_idinteger · int64 · min: 1Required

Unique account ID

Example: 3229
idinteger · int64Required

API token ID

Example: 12345
Responses
chevron-right
200

API token

application/json
idinteger · int64Optional

API token ID

namestringOptional

Token display name

last_4_digitsstringOptional

Last 4 characters of the token (full token is only shown on create or reset)

created_bystringOptional

Name of the user or token that created this token

expires_atstring · date-time · nullableOptional

When the token expires (ISO 8601); null if the token does not expire

get
/api/accounts/{account_id}/api_tokens/{id}
cURL

Delete API token

delete

Permanently deletes an API token.

Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Path parameters
account_idinteger · int64 · min: 1Required

Unique account ID

Example: 3229
idinteger · int64Required

API token ID

Example: 12345
Responses
delete
/api/accounts/{account_id}/api_tokens/{id}
cURL

No content

Reset API token

post

Expires the requested token and creates a new token with the same permissions. The old token stops working after a short grace period. The response includes the new token value (store it securely; it is only returned once). Only tokens that have not already been reset (no expiration set) can be reset.

Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Path parameters
account_idinteger · int64 · min: 1Required

Unique account ID

Example: 3229
idinteger · int64Required

API token ID

Example: 12345
Responses
chevron-right
200

New API token (includes full token value once)

application/json
idinteger · int64Optional

API token ID

namestringOptional

Token display name

last_4_digitsstringOptional

Last 4 characters of the token (full token is only shown on create or reset)

created_bystringOptional

Name of the user or token that created this token

expires_atstring · date-time · nullableOptional

When the token expires (ISO 8601); null if the token does not expire

tokenstringOptional

Full token value (only returned on create or reset; store securely)

post
/api/accounts/{account_id}/api_tokens/{id}/reset
cURL

Last updated

Was this helpful?