Skip to content
Dashboard
Theme
Theme

Revoke an organization-scoped key

POST /v1/organizations/{org}/api_keys/{key}/revoke: Revoke an organization-scoped key.

View Markdown

POST /v1/organizations/{org}/api_keys/{key}/revoke

Scope
api_keys:write
Auth
Secret key (sk_…)
Since
1.0
  • org string Required

  • key string Required

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • Idempotency-Key string

    Honoured for 24 h; a replay returns the original response.

    min length 1 · max length 255

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/organizations/org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5/api_keys/key_01J9Z3K5V7W8X9Y0Z1A2B3C4D5/revoke" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY"
Response 200
{
"id": "key_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "api_key",
"name": "Acme Corp",
"type": "secret",
"prefix": "sk_test",
"publishable_key": "pk_01J9ZQ4M7K2X8V3N5B6C1D0E9F",
"revoked_at": "2026-01-15T09:30:00Z",
"environment": "env_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"scopes": [
"organizations:read"
],
"ip_allow_list": [
"example_ip_allow_list"
],
"expires_at": "2026-01-15T09:30:00Z",
"last_used_at": "2026-01-15T09:30:00Z",
"created_at": "2026-01-15T09:30:00Z",
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5"
}