POST /v1/identity/credentials/mint
Auth
Workspace API key required.Core behavior
- Policy-gated decision before minting
- Workspace-scoped agent lookup
- TTL validation (
default=300s, capped by server max) - Token type:
opaqueorjwt
Response shape
Common errors
401 {"error":"missing_api_key"}400 {"error":"missing_agent_id"|"invalid_ttl"|"invalid_scopes"|"invalid_token_type"}403 {"error":"minting_paused"}403 {"error":"policy_denied"|"policy_challenge"}404 {"error":"unknown_agent"|"unknown_policy"}429 {"error":"rate_limited","retry_after":...}
POST /v1/identity/credentials/revoke
Revokes one credential by token value.
Example response
POST /v1/identity/credentials/revoke-by-agent
Bulk-revokes all active credentials for one agent in this workspace.
Example response
Junior developer checklist
- Always pass
ttl_secondsexplicitly. - Use
one_time=Truefor risky operations. - Store only metadata (
cred_id,expires_at), never long-lived raw tokens. - Revoke aggressively during incidents.