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
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
serviceAccountId | integer | Yes | The unique ID for a specified service account. | |
tokenId | integer | Yes | The unique ID for a specified service account token. |
Request body
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
status | string | Yes | The new token status, either "active" or "suspended". |
Responses
200 Successfully updated the token status.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
createdAt | string | Yes | read-only (server-generated) | Time the token was created, in RFC3339 format. |
expiresAt | string | No | read-only (server-generated) | Time the token expires, in RFC3339 format. Absent if the token does not expire. |
id | integer | Yes | read-only (server-generated) | Unique ID assigned at time of creation. |
projectId | integer | Yes | read-only (server-generated) | Project that this token belongs to. |
serviceAccountId | integer | Yes | read-only (server-generated) | Service account that this token belongs to. |
status | string | Yes | read-only (server-generated); one of: active, suspended | Lifecycle state of the token. |
suffix | string | Yes | read-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
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of invalid data or denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
404 The requested token does not exist or is not accessible.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |