Skip to content

Get API tokens.​

GET
/backend/v1/tokens

Retrieves a list of tokens matching the given filter criteria,
with the option to adjust the limit for more results.
The token values are obfuscated.
By default, the current user's personal tokens are returned.

Authorizations​

HTTPBearer
Type
HTTP (bearer)

Parameters​

Query Parameters

cursor

Selects page for paginated results. Pass in the next or prev attribute in the response.

includeUsers

Include user details for token owners.

Type
boolean
Default
false
includeProjects

Include project details for project-scoped tokens.

Type
boolean
Default
false
scope

Filter tokens by their scope (personal, organization, project).

status

Filter tokens by their status (active, expired, revoked).

Default
"active"
sortBy

Sort results by the given parameter.

Type
string
Valid values
"name""expires_at""status""id"
Default
"id"
ascending

Whether results should be sorted in ascending order.

Type
boolean
Default
false
userId

Filter tokens by the users that own them.

machine

Deprecated. If true returns only machine tokens, if false doesn't return machine tokens.

projectId

Filter tokens by the projects they belong to. Accepts one or more project IDs.

limit

Limits the amount of returned objects. Max 100, min 1.

Type
integer
Default
10
Maximum
100
Minimum
1

Responses​

Successful Response

application/json
JSON
{
  
"next": "string",
  
"prev": "string",
  
"projects": [
  
  
{
  
  
  
"adminCount": 0,
  
  
  
"adminRoleId": "string",
  
  
  
"agentSessionCount": 0,
  
  
  
"botType": "string",
  
  
  
"chatbotId": "string",
  
  
  
"config": {
  
  
  
  
"id": "string",
  
  
  
  
"packages": [
  
  
  
  
  
{
  
  
  
  
  
  
"blocking": true,
  
  
  
  
  
  
"direction": "string",
  
  
  
  
  
  
"enabled": true,
  
  
  
  
  
  
"flagMessage": "string",
  
  
  
  
  
  
"force": true,
  
  
  
  
  
  
"id": "string",
  
  
  
  
  
  
"mode": "string",
  
  
  
  
  
  
"version": "string"
  
  
  
  
  
}
  
  
  
  
],
  
  
  
  
"providers": [
  
  
  
  
  
{
  
  
  
  
  
  
"capabilities": [
  
  
  
  
  
  
  
"string"
  
  
  
  
  
  
],
  
  
  
  
  
  
"default": true,
  
  
  
  
  
  
"enabled": true,
  
  
  
  
  
  
"id": "string",
  
  
  
  
  
  
"name": "string",
  
  
  
  
  
  
"type": "string"
  
  
  
  
  
}
  
  
  
  
],
  
  
  
  
"scanners": [
  
  
  
  
  
{
  
  
  
  
  
  
"blocking": true,
  
  
  
  
  
  
"direction": "string",
  
  
  
  
  
  
"enabled": true,
  
  
  
  
  
  
"flagMessage": "string",
  
  
  
  
  
  
"force": true,
  
  
  
  
  
  
"id": "string",
  
  
  
  
  
  
"mode": "string",
  
  
  
  
  
  
"version": "string"
  
  
  
  
  
}
  
  
  
  
]
  
  
  
},
  
  
  
"createdAt": "string",
  
  
  
"createdBy": "string",
  
  
  
"deploymentStatus": "draft",
  
  
  
"friendlyId": "string",
  
  
  
"id": "string",
  
  
  
"memberCount": 0,
  
  
  
"memberRoleId": "string",
  
  
  
"name": "string",
  
  
  
"providerCount": 0,
  
  
  
"scannerCount": 0,
  
  
  
"tokenCount": 0,
  
  
  
"type": "string",
  
  
  
"updatedAt": "string"
  
  
}
  
],
  
"tokens": [
  
  
{
  
  
  
"expiresAt": "string",
  
  
  
"id": "string",
  
  
  
"machine": true,
  
  
  
"name": "string",
  
  
  
"projectId": "string",
  
  
  
"revoked": true,
  
  
  
"scope": "string",
  
  
  
"status": "string",
  
  
  
"userId": "string",
  
  
  
"value": "string"
  
  
}
  
],
  
"users": {
  
  
"additionalProperties": {
  
  
  
"admin": true,
  
  
  
"blocked": false,
  
  
  
"createdAt": "string",
  
  
  
"email": "string",
  
  
  
"id": "string",
  
  
  
"lastInvitationSentAt": "string",
  
  
  
"machine": false,
  
  
  
"name": "string",
  
  
  
"org": "string",
  
  
  
"permissions": [
  
  
  
  
[
  
  
  
  
]
  
  
  
],
  
  
  
"roleIds": [
  
  
  
  
[
  
  
  
  
]
  
  
  
],
  
  
  
"roles": [
  
  
  
  
[
  
  
  
  
]
  
  
  
],
  
  
  
"social": false,
  
  
  
"teams": [
  
  
  
  
[
  
  
  
  
]
  
  
  
],
  
  
  
"verified": true
  
  
}
  
}
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Updated at: