Documentation

Personal Access Tokens

Create new token

Returns plain token once. Store it securely.

ProductionStagingUAT
POSThttps://ankiren.com/api/me/tokens

Request Body

Bắt buộc.

  • namestringRequired
  • expiresAtstring<date-time>?
    format: date-time
application/json
{
  "name": "string",
  "expiresAt": "2026-01-01T00:00:00.000Z"
}

Responses

201 · Token created

  • tokenstring

    Plain token (shown once, starts with ank_)

  • idstring
application/json
{
  "token": "ank_a1b2c3d4e5f6...",
  "id": "string"
}

Sample Code

Đổi ngôn ngữ ở ô Language trên thanh Documentation.

cURL
curl -X POST 'https://ankiren.com/api/me/tokens' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "expiresAt": "2026-01-01T00:00:00.000Z"
}'