# Delete a Key

The delete API key operation requires the `apiKeyId`, which can be retrieved using the **List API Keys** endpoint.

<mark style="color:red;">`DELETE`</mark>`https://api.olisystems.com/user/api-key/{apiKeyId}`

**Headers**

| Name                                            | Value            |
| ----------------------------------------------- | ---------------- |
| Authorization<mark style="color:red;">\*</mark> | `Bearer <token>` |

**Example Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "message": "User API KEY successfully deleted"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "message": "No API key found with API Key ID"
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "status": "ERROR",
  "message": "Unexpected Error occurred.  Please Try again",
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devdocs.olisystems.com/authentication/api-keys/delete-a-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
