v14

OpenAPI 3.1.02026-08-03122113375.9 KB
user-personal-access-tokens

Create a PAT

Create a new personal access token for the authenticated user.

Use personal access tokens for server-to-server or CLI integrations where interactive user login is not practical.

Important behavior:

  • A user can have up to 5 personal access tokens.
  • Token names must be unique per user.
  • expires is optional, but if provided it must be at least 24 hours in the future.
  • Treat the token value as a secret and store it securely.

How to use the token with API requests:

Authorization: ApiKey <personal-access-token>

Example request flow:

  1. Create token via this endpoint.
  2. Save the token value in your secret store.
  3. Send it as an API key on subsequent API calls.
  4. Rotate and revoke tokens regularly as part of your security process.
post/user/personal-access-tokens

Request body

namestring required

The personal access token name. Must be unique for the authenticated user.

expiresstring date-time

Optional ISO timestamp indicating when the token should expire. Omit to create a non-expiring token.

Response

Personal access token created

namestring required

The personal access token name

valuestring required

The personal access token value. This is only available immediately after creation.

createdAtstring date-time required

ISO timestamp indicating when the token was created

expiresstring date-time

ISO timestamp indicating when the token expires