09e652815095

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-151,1412,2144.5 MB
API Tokens

Create API token

Create an API token in the current account.

This V2 endpoint generates tokens that use _ (underscore) as the separator between the token ID and the secret string, instead of the $ separator used by the V1 endpoint. For example: 42_a1b2c3d4...

Tokens created via this endpoint are fully compatible with all existing authentication mechanisms.

post/iam/v2/clients/{clientId}/tokens

Path parameters

clientIdinteger required

Account ID.

Request body

namestring required

API token name.

descriptionstring

API token description.

exp_datestring nullable required

Date when the API token becomes expired (ISO 8086/RFC 3339 format), UTC. If null, then the API token will never expire.

Example request

{
  "name": "My token",
  "description": "It's my token",
  "exp_date": "2021-01-01T12:00:00.000000Z",
  "client_user": {
    "role": {
      "id": 1,
      "name": "Administrators"
    }
  }
}

Response

OK.

tokenstring

API token with _ separator. Copy it, because you will not be able to get it again. We do not store tokens. All responsibility for token storage and usage is on the issuer.

namestring required

API token name.

descriptionstring

API token description.

exp_datestring nullable required

Date when the API token becomes expired (ISO 8086/RFC 3339 format), UTC. If null, then the API token will never expire.

idinteger required

API token ID.

deletedboolean required

Deletion flag. If true, then the API token was deleted.

expiredboolean required

Expiration flag. If true, then the API token has expired. When an API token expires it will be automatically deleted.

createdstring required

Date when the API token was issued (ISO 8086/RFC 3339 format), UTC.

last_usagestring required

Date when the API token was last used (ISO 8086/RFC 3339 format), UTC.

Example response

{
  "token": "42_a1b2c3d4e5f6...",
  "name": "My token",
  "description": "It's my token",
  "exp_date": "2021-01-01T12:00:00.000000Z",
  "client_user": {
    "role": {
      "id": 1,
      "name": "Administrators"
    },
    "user_id": 123,
    "user_name": "John Doe",
    "user_email": "some@email.com",
    "client_id": 456
  },
  "id": 42,
  "created": "2021-01-01T12:00:00.000000Z",
  "last_usage": "2021-01-01T12:00:00.000000Z"
}