# Delete a key

`DELETE /api/v1/api-keys/{apiKey}`

Revoke a key, which stops working the moment this answers.

Anything still using it stops working, immediately, with nothing to wait out. Your other keys are untouched, which is the point of naming them: an integration you no longer trust can be cut off without breaking the rest.

You may revoke the key you are calling with. This call succeeds and every later call with it answers 401.

## Path parameters

- `apiKey` (integer, required): The id of the key.

## Returns

Nothing at all. A key belonging to somebody else answers 404, and keeps working.

## Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in `X-RateLimit-Remaining`.

## Request

```sh
curl https://my.monicahq.com/api/v1/api-keys/3 \
  -X DELETE \
  -H "Authorization: Bearer $MONICA_TOKEN"
```

```javascript
const response = await fetch('https://my.monicahq.com/api/v1/api-keys/3', {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${token}` },
})
```

```php
$response = Http::withToken($token)->delete('https://my.monicahq.com/api/v1/api-keys/3');
```

## Response

`204`, with no body.
