# Відкликати ключ API

> Негайно відкликати ключ.

`DELETE /api-keys/:id`

Requests with the revoked key fail with `401` from this moment on.

## Параметри шляху

- `id` (string, required): The API key id, for example `key_3nQe8`.

## Example

cURL

```
curl -X DELETE 'https://sendtern.com/api-keys/key_3nQe8' \
  -H 'Authorization: Bearer st_your_api_key'
```

Node.js

```
const res = await fetch("https://sendtern.com/api-keys/key_3nQe8", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.SENDTERN_API_KEY}`,
  },
});

console.log(res.status); // 204
```

Python

```
import os
import requests

res = requests.delete(
    "https://sendtern.com/api-keys/key_3nQe8",
    headers={"Authorization": f"Bearer {os.environ['SENDTERN_API_KEY']}"},
)

print(res.status_code)  # 204
```

## Response

```json
HTTP/1.1 204 No Content
```
