Skip to content

Update API token

PUT
/api-tokens/{tokenId}
tokenId
required

Unique identifier of the API token to retrieve

string

Unique identifier of the API token to retrieve

object
name

New name for the token

string
>= 1 characters <= 255 characters
isActive

Set to false to deactivate the token (revoke access)

boolean
expiresAt

New expiration date (ISO 8601), or null to remove expiration

string format: date-time
nullable

API token updated successfully

object
tokenId
required

Unique identifier for the API token (nanoid format)

string
teamId
required

ID of the team this token provides access to

string
name
required

Human-readable name for identifying this token

string
tokenPrefix
required

Prefix of the token for identification (e.g., ‘cat_tok_’)

string
last4
required

Last 4 characters of the token for verification

string
role
required

Permission level: ‘admin’ (full access), ‘member’ (standard access), ‘readonly’ (read-only access)

string
Allowed values: admin member readonly
createdByUserId
required

ID of the user who created this token

string
expiresAt
required

When the token expires (ISO 8601), or null if no expiration

string format: date-time
nullable
lastUsedAt
required

When the token was last used for an API request (ISO 8601)

string format: date-time
nullable
isActive
required

Whether the token is active and can be used for authentication

boolean
createdAt
required

When the token was created (ISO 8601)

string format: date-time
updatedAt
required

When the token was last modified (ISO 8601)

string format: date-time

Bad Request - Validation error or invalid input

object
error
required
string
code
string
details
nullable
retryable
boolean

Unauthorized - Authentication required or invalid token

object
error
required
string
code
string
details
nullable
retryable
boolean

Forbidden - Insufficient permissions

object
error
required
string
code
string
details
nullable
retryable
boolean

Not Found - Resource does not exist

object
error
required
string
code
string
details
nullable
retryable
boolean