Credentials

Revoke a credential

Revoke one credential by kind and id. A Function key is rotated, never revoked (409 rotate_instead). An API key is revoked only by a person whose own access covers the key's access (an owner covers every key); otherwise 403 grant_forbidden, details.reason target_not_covered. What the credential set up keeps working and is listed in standing_objects for review. Needs the organization's credential features to be enabled; while they are not, this answers 404 feature_disabled.

Person only: a dashboard session. The person's role must hold keys:manage. API keys, agent connection keys and agents are refused.

post/credentials/revoke

Request

  • Base URL
    https://api.primitive.dev/v1
  • URL
    https://api.primitive.dev/v1/credentials/revoke
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring

Optional client-supplied idempotency key. Retrying a request with the same key returns the original result instead of performing the action a second time; if omitted the server derives one from the canonical payload hash. Safe to retry network failures without duplicating side effects.

Request body

kind'org_key' | 'function_key' | 'connected_key' | 'oauth' | 'agent_delegate' | 'cli_user_access' required
idstring required
reasonstring

Response

Success

successtrue required

Changes

No operation changes recorded.