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

# Revoke API Key

> Soft-revoke an API key (sets revoked_at, preserves the row for audit)

## Overview

Revokes an API key by setting its `revoked_at` timestamp. The key record is preserved so audit logs and historical usage records remain valid. Once revoked, requests using the key return `401 unauthorized` immediately.

System keys cannot be revoked. Requires the `api-keys:manage` scope and an `Idempotency-Key` header; see [Idempotency](/api-reference/introduction#idempotency).

## Path Parameters

<ParamField path="id" type="string" required>
  API key ID (`key_...`).
</ParamField>

## Response

<ResponseField name="id" type="string">Echo of the revoked API key ID.</ResponseField>
<ResponseField name="object" type="string">Always `api_key`.</ResponseField>
<ResponseField name="deleted" type="boolean">Always `true` on success.</ResponseField>
<ResponseField name="request_id" type="string">Unique request identifier for support and debugging.</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "id": "key_Mc2eF6gH",
    "object": "api_key",
    "deleted": true,
    "request_id": "req_zS5jK1lM"
  }
  ```
</ResponseExample>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.signa.so/v1/organization/api-keys/key_Mc2eF6gH" \
    -H "Authorization: Bearer sig_YOUR_KEY" \
    -H "Idempotency-Key: revoke-key-Mc2eF6gH-2026-06-12"
  ```

  ```typescript TypeScript theme={null}
  import { Signa } from "@signa-so/sdk";

  const signa = new Signa({ api_key: process.env.SIGNA_API_KEY });

  await signa.organization.apiKeys.revoke("key_Mc2eF6gH");
  ```
</CodeGroup>

<Note>
  Revocation is irreversible. To roll a key without downtime, use [Rotate API Key](/api-reference/administration/rotate-api-key): the old key remains valid for a 24-hour grace period.
</Note>

## Errors

| Status | Type               | Description                                               |
| ------ | ------------------ | --------------------------------------------------------- |
| 400    | `validation_error` | Invalid API key ID or missing `Idempotency-Key` header    |
| 401    | `unauthorized`     | Missing or invalid API key                                |
| 403    | `forbidden`        | API key lacks `api-keys:manage` or target is a system key |
| 404    | `not_found`        | API key does not exist or belongs to another org          |

## Related Endpoints

* [Rotate API Key](/api-reference/administration/rotate-api-key), graceful key rotation
* [List API Keys](/api-reference/administration/list-api-keys)
