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

# api_keys.revoke()

> Revoke an API key by ID.

Revoke a key. Subsequent requests that use the revoked key fail with `AuthenticationError`.

**Required scope: `admin`**

```python theme={null}
result = await mesa.api_keys.revoke(key_id="key_123")
print(result.success)
```

## Options

<ParamField path="key_id" type="str" required>
  API key ID to revoke.
</ParamField>

<ParamField path="org" type="str | None">
  Organization override.
</ParamField>

## Response

<ResponseField name="success" type="bool">
  Whether the operation succeeded.
</ResponseField>
