Create API token (secret shown once)
POST
/api/v1/api-tokens
const url = 'https://example.com/api/v1/api-tokens';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"aiAgent":true,"expiresAt":"2026-04-15T12:00:00Z","ipBind":["example"],"name":"example","roles":["example"],"scopes":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/api-tokens \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "aiAgent": true, "expiresAt": "2026-04-15T12:00:00Z", "ipBind": [ "example" ], "name": "example", "roles": [ "example" ], "scopes": [ "example" ] }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
aiAgent
boolean
expiresAt
string format: date-time
ipBind
Array<string>
name
required
string
roles
Array<string>
scopes
Array<string>
Examplegenerated
{ "aiAgent": true, "expiresAt": "2026-04-15T12:00:00Z", "ipBind": [ "example" ], "name": "example", "roles": [ "example" ], "scopes": [ "example" ]}Responses
Section titled “Responses”Created
Media typeapplication/json
object
meta
required
object
aiAgent
boolean
createdAt
required
string format: date-time
createdBy
required
string
expiresAt
string format: date-time
id
required
string
ipBind
Array<string>
lastUsedAt
string format: date-time
name
required
string
prefix
required
string
roles
Array<string>
scopes
required
Array<string>
tenantId
required
string
version
required
integer
token
required
string
Examplegenerated
{ "meta": { "aiAgent": true, "createdAt": "2026-04-15T12:00:00Z", "createdBy": "example", "expiresAt": "2026-04-15T12:00:00Z", "id": "example", "ipBind": [ "example" ], "lastUsedAt": "2026-04-15T12:00:00Z", "name": "example", "prefix": "example", "roles": [ "example" ], "scopes": [ "example" ], "tenantId": "example", "version": 1 }, "token": "example"}default
Section titled “default”Problem Details (RFC 9457)
Media typeapplication/problem+json
object
code
required
string
detail
string
instance
string
status
required
integer
title
required
string
type
required
string
Examplegenerated
{ "code": "example", "detail": "example", "instance": "example", "status": 1, "title": "example", "type": "example"}