curl --request POST \
--url https://api.cnap.tech/v1/user/tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My CLI token",
"expires_at": 1742169600
}
'{
"id": "<string>",
"name": "<string>",
"token": "cnap_pat_a3b2c4d5e6f7g8h9i0j1k2l3m4n5o6p7"
}Creates a new PAT. The full token is returned in the response and never shown again.
curl --request POST \
--url https://api.cnap.tech/v1/user/tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My CLI token",
"expires_at": 1742169600
}
'{
"id": "<string>",
"name": "<string>",
"token": "cnap_pat_a3b2c4d5e6f7g8h9i0j1k2l3m4n5o6p7"
}Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at https://dash.cnap.tech/account/tokens