Skip to content

Suspend an API token

POST
/api/v1/api_token/{api_token_id}/suspend
api_token_id
required
ApiToken_Id

A valid API token ID

string
Example
013xrzp12g3nqk8n7f8f9jbg8d18q7tm
One of:
IdempotencyKeyOrNull

Optional idempotency key for ensuring request idempotency

string

Success

object
details
ApiToken_Details
object
account_id
Account_Id

A valid account ID

string
Example
013xrzp12g3nqk8ngskn1wtxgka5b0nf
available_actions
ApiToken_AvailableActions

Available actions for this token based on its status

object
activate

Whether the token can be activated

boolean
delete

Whether the token can be deleted

boolean
revoke

Whether the token can be revoked

boolean
suspend

Whether the token can be suspended

boolean
created_by_admin_user_id
One of:
AdminUser_Id

A valid admin user ID

string
Example
013xrzp12g3nqk8nh0qrc2b1jfanmvb9
environment_id
One of:
Environment_Id

A valid environment ID

string
Example
013xrzp12g3nqk8nzxvq7jm2arsfg5h1
expires_at

When the token expires

string format: date-time
Example
2024-01-01T00:00:00Z
id
ApiToken_Id

A valid API token ID

string
Example
013xrzp12g3nqk8n7f8f9jbg8d18q7tm
inserted_at

When the token was created

string format: date-time
Example
2024-01-01T00:00:00Z
last_used_at
One of:

When the token was last used for authentication

string format: date-time
Example
2024-01-01T00:00:00Z
status

Current status of the token

string
Allowed values: active suspended revoked
Example
active
token_scope

Scope of the token

string
Allowed values: account environment
Example
account
type

Type of resource (always ‘api_token’)

string
Allowed values: api_token
Example
api_token
updated_at

When the token was last updated

string format: date-time
Example
2024-01-01T00:00:00Z
status
string
Allowed values: success
Example
success

Error

One of:
object
code
string
Allowed values: bad_request bad_authtoken not_authenticated not_permitted not_implemented unknown not_found unexpected_ref_type unexpected invalid_action invalid_value required_value idempotency_key_already_used
Example
bad_request
message
string
status
string
Allowed values: error
Example
error