v56

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-03113163377.5 KB
Token

Create token

Create a new authentication token for the authenticated account with custom name and expiration duration.

post/account/tokens

Request body

allowed_cidrsstring[]

Optional IP CIDR allowlist applied atomically at creation, so the token is never live unrestricted. Empty/omitted = unrestricted. Max 50 entries; same format as PUT /account/tokens/:lookup_id/allowed-cidrs.

expiry_durationinteger required

Duration in seconds from now until expiration (1 min to 1 year).

namestring required

User-friendly name for the JWT token.

token_typestring required

Type of token to create.

Example request

{
  "allowed_cidrs": [
    "[\"203.0.113.0/24\"",
    "\"198.51.100.42/32\"]"
  ],
  "expiry_duration": 86400,
  "name": "My Long-term Trading Token"
}

Response

Token created successfully

tokenstring

The generated JWT token

Example response

{
  "api_token": {
    "allowed_cidrs": [
      "[\"203.0.113.0/24\"]"
    ],
    "created_at": 1640995200,
    "expiry_at": 1672531200,
    "last_updated_at": 1640995200,
    "lookup_id": "uuid-123",
    "name": "My API Token",
    "token_id": "token_123"
  },
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}