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

# Delete API Key

> Deletes an API key for the authenticated user

This endpoint deletes an API key for the authenticated user. Once deleted, the API key can no longer be used to authenticate API requests. This action cannot be undone, so use it with caution.

## Request

<ParamField body="apiKey" type="string" required>
  The API key to delete
</ParamField>

### Example Request

```json theme={null}
{
  "apiKey": "brx_api_12345678-90ab-cdef-1234-567890abcdef"
}
```

## Response

<ResponseField name="UpdateKeyResponse" type="object">
  <Expandable title="properties">
    <ResponseField name="deleted" type="boolean">
      Indicates whether the API key was successfully deleted
    </ResponseField>
  </Expandable>
</ResponseField>

### Example Response

```json theme={null}
{
  "UpdateKeyResponse": {
    "deleted": true
  }
}
```

## Error Codes

<ResponseField name="400" type="object">
  Bad Request - The request was malformed or missing required parameters
</ResponseField>

<ResponseField name="401" type="object">
  Unauthorized - Authentication credentials are missing or invalid
</ResponseField>

<ResponseField name="403" type="object">
  Forbidden - The authenticated user does not have permission to delete the specified API key
</ResponseField>

<ResponseField name="404" type="object">
  Not Found - The specified API key does not exist or does not belong to the authenticated user
</ResponseField>

<ResponseField name="500" type="object">
  Internal Server Error - An unexpected error occurred on the server
</ResponseField>

## Notes

* Once an API key is deleted, it can no longer be used to authenticate API requests.
* This action cannot be undone, so use it with caution.
* You can only delete API keys that belong to your account.
* If an API key is compromised, it should be deleted immediately to prevent unauthorized access.
* To generate a new API key, use the [Generate API Key](/api-reference/endpoint/generate-key) endpoint.
* To list all API keys for the authenticated user, use the [List API Keys](/api-reference/endpoint/list-keys) endpoint.
