POST
/
user
/
api-tokens
curl -X POST \
 /user/api-tokens \
 --header "Content-Type: application/json" \
 --header "Authorization: Bearer <token>" \
 --data '{
    "description": "My API token",
    "expiresAt": "2021-01-01T00:00:00+00:00"
}'
{
  "id": "A1B2C3D4E5F6G7H8I9J0",
  "token": "api_A1B2C3D4E5F6G7H8I9J0",
  "description": "My API token",
  "expiresAt": "2021-01-01T00:00:00+00:00"
}

Authorizations

Authorization
string
header
required

Value for the Authorization header parameter.

Body

The new ApiToken resource
description
string | null

Description of the API token

Required string length: 3 - 255
expiresAt
string | null

Date and time when the API token expires. If null, the token never expires.

Response

201
application/json
ApiToken resource created
id
string
token
string
description
string | null
expiresAt
string | null