Skip to content

Error reference

Only its owner can revoke this key

Only the person a key belongs to, or the workspace Owner, can revoke the key of an Owner or a Manager.

Code
api_key_revoke_restricted
HTTP status
403
Category
forbidden
Severity
error
Retryable
No
Domain
api-access

How to fix

Review the request and try again. The response `detail` explains the specific problem.

Example response

Every error is returned as application/problem+json (RFC 9457). The detail is the specific, actionable message; the code is stable and safe to branch on.

{
  "type": "https://skedcast.com/errors/api_key_revoke_restricted",
  "title": "Only its owner can revoke this key",
  "status": 403,
  "category": "forbidden",
  "code": "api_key_revoke_restricted",
  "detail": "Only the person a key belongs to, or the workspace Owner, can revoke the key of an Owner or a Manager.",
  "correlationId": "c-1f2e3d4c-…",
  "severity": "error"
}

Handle it in code

try {
  await skedcast.posts.create(input);
} catch (err) {
  if (err instanceof SkedcastApiError && err.code === 'api_key_revoke_restricted') {
    // Only the person a key belongs to, or the workspace Owner, can revoke the key of an Owner or a Manager.
  }
}