Rotate API token
API Tokens
Rotate API token
Revoke an existing token and create a new one with the same name and scopes. The new token secret is returned only once — store it securely. The old token is immediately invalidated.
POST
Rotate API token
Authorizations
Bearer token authentication. Supports two token types:
- JWT Access Token — obtained via
POST /v1/auth/login - Personal Access Token (PAT) — created via
POST /v1/api-tokens, format:cmnd_<tokenId>.<secret>
Path Parameters
The token ID to rotate
Response
Token rotated successfully
The token secret (shown only once). Format: cmnd_.
Example:
"cmnd_abc123.sk_xxxxxxxxxxxxxxxxxxxx"
Example:
"abc123"
Example:
"CI/CD Pipeline Token"
Example:
[
"chat:write",
"models:read",
"knowledgebases:read"
]
