Personal API Tokens

Create personal API token

Creates a new personal API token for the authenticated user. Maximum 2 active tokens allowed.

POST
/api/v2/personal-api-tokens

Authorization

BearerAuthObject
AuthorizationBearer <token>

In: header

Request Body

application/json

Provide either expiresAt (custom expiration up to 1 year) or expiresInHours (legacy, 1–24). Exactly one must be supplied.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/personal-api-tokens" \  -H "Content-Type: application/json" \  -d '{    "name": "My laptop"  }'
{  "id": "01964e3a-7e1c-7000-8000-000000000001",  "name": "My laptop",  "createdAt": "2026-03-23T10:00:00+00:00",  "expiresAt": "2026-03-23T22:00:00+00:00",  "token": "eyJ0eXAi..."}
{  "message": {    "name": "Name is required",    "expiresInHours": "Expires in hours must be between 1 and 24",    "expiresAt": "expiresAt must be within 1 year"  }}
{  "message": {    "error": "Your request was made with invalid credentials."  }}
{  "message": {    "error": "You are not allowed to perform this action."  }}
{  "message": {    "name": "Maximum 2 active personal API tokens allowed"  }}
{  "message": {    "error": "Oops! Something went wrong! Write to administrator. Your Request Id {f1177aee-9a99-42f0-a23f-4dd29fc39b65-672e0df972ccb}"  }}