Skip to main content
POST
/
api
/
tokens
curl --request POST \
  --url https://app.qwoty.io/api/tokens \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Production API Token",
    "expires_at": "2025-12-31T23:59:59Z"
  }'
{
  "success": true,
  "data": {
    "id": "tok_123abc",
    "name": "Production API Token",
    "token": "qwoty_live_abc123def456...",
    "expires_at": "2025-12-31T23:59:59Z",
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Request Body

name
string
required
A descriptive name for the API token
expires_at
string
Optional expiration date in ISO 8601 format (e.g., “2024-12-31T23:59:59Z”)
permissions
object
Optional permissions configuration for the token

Response

success
boolean
Indicates if the operation was successful
data
object
The created API token object
curl --request POST \
  --url https://app.qwoty.io/api/tokens \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Production API Token",
    "expires_at": "2025-12-31T23:59:59Z"
  }'
{
  "success": true,
  "data": {
    "id": "tok_123abc",
    "name": "Production API Token",
    "token": "qwoty_live_abc123def456...",
    "expires_at": "2025-12-31T23:59:59Z",
    "created_at": "2024-01-15T10:30:00Z"
  }
}