Suspend or reactivate a service account token

PATCH/serviceAccounts/{serviceAccountId}/tokens/{tokenId}

Base URL: https://api.tinkermode.com

Change the status of the token with the specified ID. The status may be set to "suspended" to reject the token on subsequent requests, or back to "active" to accept it again. To permanently kill a token, use the DELETE endpoint, which removes it for good.

Authentication

Send an Authorization header of the form ModeCloud <AUTH_CODE>.

Must contain a user API key for a project super admin or a project API key with "Admin" privileges.

Path parameters

NameTypeRequiredConstraintsDescription
serviceAccountIdintegerYesThe unique ID for a specified service account.
tokenIdintegerYesThe unique ID for a specified service account token.

Request body

Content type: application/json

PropertyTypeRequiredConstraintsDescription
statusstringYesThe new token status, either "active" or "suspended".

Responses

200 Successfully updated the token status.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
createdAtstringYesread-only (server-generated)Time the token was created, in RFC3339 format.
expiresAtstringNoread-only (server-generated)Time the token expires, in RFC3339 format. Absent if the token does not expire.
idintegerYesread-only (server-generated)Unique ID assigned at time of creation.
projectIdintegerYesread-only (server-generated)Project that this token belongs to.
serviceAccountIdintegerYesread-only (server-generated)Service account that this token belongs to.
statusstringYesread-only (server-generated); one of: active, suspendedLifecycle state of the token.
suffixstringYesread-only (server-generated)Trailing characters of the raw token, kept for display only.

Response example

{
  "createdAt": "2026-06-01T00:00:00.000Z",
  "id": 100,
  "projectId": 1234,
  "serviceAccountId": 7,
  "status": "active",
  "suffix": "a9b65a"
}

204 The token has been successfully updated.

401 Authorization is required to access this resource.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

403 Request failed because of invalid data or denied permission.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

404 The requested token does not exist or is not accessible.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

429 Request failed because of rate limit.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

500 An unexpected error has occurred.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.

503 The service is temporarily unavailable.

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataobjectNoread-only (server-generated)Any relevant data related to error.
reasonstringYesread-only (server-generated)Reason of error.