Skip to main content
POST
Create a personal access token

Authorizations

Authorization
string
header
required

Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at https://cnap.tech/account/tokens

Body

application/json
name
string
required

Human-readable name for the token

Required string length: 1 - 100
Example:

"My CLI token"

expires_at
integer

Unix timestamp (seconds) when the token expires. Omit for no expiry.

Example:

1742169600

Response

Token created. The token field is shown only once.

id
string
required
name
string
required
token
string
required

The full token. This is shown only once — store it securely.

Example:

"cnap_pat_a3b2c4d5e6f7g8h9i0j1k2l3m4n5o6p7"