Get service account tokens
GET/serviceAccounts/{serviceAccountId}/tokens
Base URL: https://api.tinkermode.com
Get the token metadata for the service account. The raw token secret is never returned by this endpoint.
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. |
Responses
200 Successful retrieval of list of token metadata.
Content type: application/json
Stored metadata for a single service account token. The raw token secret is never persisted or returned in this record. Only a short display suffix is kept.
An array of objects with the following shape:
| 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"
},
{
"createdAt": "2026-06-03T11:20:00.000Z",
"id": 101,
"projectId": 1234,
"serviceAccountId": 7,
"status": "active",
"suffix": "0cba84"
}
]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 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. |
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. |