Skip to main content
API tokens (Personal Access Tokens) provide programmatic access to the co-mind.ai API with fine-grained scopes.
API tokens require Team or Enterprise plan with API access enabled, and the user must belong to an organization.

Authentication with PATs

Include your token in the Authorization header:
Tokens start with the cmnd_ prefix and work anywhere a JWT Bearer token is accepted.

Scopes

User Scopes

Available to all users:

Admin-Only Scopes

Require Admin role. Non-admin users requesting these scopes will receive a 403 admin_scopes_required error.

Discover Available Scopes

This endpoint requires JWT authentication — PATs cannot access it.

Token Management

All management endpoints require JWT authentication. PATs attempting to access these endpoints receive a 403 pat_not_allowed error.

Create a Token

POST /v1/api-tokens
Response (201):
The token field is returned only once. Store it securely.

List Tokens

GET /v1/api-tokens Returns metadata for all your tokens. No secrets are included.

Revoke a Token

DELETE /v1/api-tokens/:id Immediately invalidates the token. This cannot be undone. Idempotent — revoking an already-revoked token returns 204.

Rotate a Token

POST /v1/api-tokens/:id/rotate Revokes the old token and creates a new one with the same name and scopes. The new token inherits the remaining expiry of the old token (capped at 365 days).
Cannot rotate a revoked or expired token. Organization membership and plan tier are rechecked at rotation time.

Limits

Error Codes