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

# Revoke API Key

> Permanently revoke an API key. Any requests using the revoked key will immediately return 401.

<Warning>
  This action is irreversible. The key is deleted along with its usage log. Create a replacement key before revoking a key that is actively in use.
</Warning>

<Note>
  This endpoint uses your dashboard session (Auth0 JWT), not an API key.
</Note>

### Path parameters

<ParamField path="id" type="string" required>
  The UUID of the key to revoke. Obtain this from [List API Keys](/api-reference/api-keys/list).
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  `true` when the key has been deleted.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -s -X DELETE "https://api.impulselabs.ai/api/api-keys/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
    -H "Authorization: Bearer <your-dashboard-session-token>"
  ```

  ```python Python theme={null}
  import requests

  key_id = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  resp = requests.delete(
      f"https://api.impulselabs.ai/api/api-keys/{key_id}",
      headers={"Authorization": "Bearer <dashboard-token>"},
  )
  print(resp.json())  # {"success": true}
  ```

  ```javascript Node.js theme={null}
  const keyId = "3fa85f64-5717-4562-b3fc-2c963f66afa6";
  const resp = await fetch(
    `https://api.impulselabs.ai/api/api-keys/${keyId}`,
    {
      method: "DELETE",
      headers: { Authorization: "Bearer <dashboard-token>" },
    }
  );
  const { success } = await resp.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": "API key not found"
  }
  ```

  ```json 403 Forbidden theme={null}
  {
    "error": "Forbidden"
  }
  ```
</ResponseExample>
