> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke API Key

> Permanently revoke a company API key

Permanently revoke a company-scoped API key. The caller must have the
`api_keys:manage` permission.

Call [List API Keys](/api-reference/api-keys/list) first and compare the key ID,
name, non-secret prefix, and `isCurrent` flag. Revocation cannot be undone, and
revoking the active credential will prevent it from making another request.

<ParamField path="apiKeyId" type="string" required>
  Exact API key ID returned by the list API keys endpoint.
</ParamField>

```bash theme={null}
curl -X DELETE "https://api.sequenzy.com/api/v1/api-keys/key_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-company-id: company_abc123"
```

## Response

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "apiKey": {
      "id": "key_abc123",
      "name": "SST production handoff",
      "prefix": "seq_live_abcd",
      "type": "company",
      "scopes": ["account:read", "subscribers:read"],
      "permissions": {
        "preset": "custom",
        "fullAccess": false,
        "selectedScopeCount": 2,
        "currentScopeCount": 63,
        "description": "2 of 63 current permissions are enabled."
      },
      "deviceName": null,
      "lastUsedAt": null,
      "createdAt": "2026-07-17T10:30:00Z",
      "updatedAt": "2026-07-17T10:30:00Z",
      "isCurrent": false
    },
    "message": "API key revoked successfully."
  }
  ```

  The response confirms the removed key with metadata only. It never includes the
  plain key or stored hash.

  ```json 404 theme={null}
  {
    "error": "API key not found"
  }
  ```
</ResponseExample>
