> Documentation index: https://docs.dairo.app/llms.txt, a list of every page in this documentation.

# Revoke the calling API key

> Revokes the key that authenticates this request, flipping its status to revoked so its secret can no longer authenticate — the call to make when a script or CLI signs out.

```text title="Endpoint"
DELETE https://api.dairo.app/v1/api-keys/current
```

Revokes the key that authenticates this request, flipping its `status` to `revoked` so its secret can no longer authenticate — the call to make when a script or CLI signs out. Any key may revoke itself whatever its scopes, so no `keys:write` is needed; revoking any other key is [`DELETE /v1/api-keys/{apiKeyId}`](https://docs.dairo.app/api-reference/dairo-api/api-keys/revoke-api-key.md). A successful revoke returns `204 No Content` with an empty body, and the same secret is refused from then on.

**Scope:** `__any__`. Send the API key as a bearer token; [Scopes](https://docs.dairo.app/concepts/scopes.md) lists what each one reaches.

## Request

```bash title="cURL"
curl -X DELETE "https://api.dairo.app/v1/api-keys/current" \
  -H "Authorization: Bearer $DAIRO_API_KEY"
```

## Response

`204` Success, no body.

## Errors

Every error has the same body, `{"error": {"type", "code", "message", "param"}}`; branch on `code`. [Errors](https://docs.dairo.app/concepts/errors.md) lists every code.

| Status | Meaning |
| --- | --- |
| `400` | The request is malformed or a value is invalid (`invalid_request`, `invalid_domain`, `idempotency_key_mismatch`). |
| `401` | The API key is missing or invalid. |
| `404` | No such resource in this account (`resource_not_found`). |
| `429` | Rate limit, plan limit, budget or spend cap reached (`rate_limited`, `plan_limit_reached`, `budget_exceeded`, `spend_cap_reached`). |
| `500` | An unexpected error; retry with backoff, then contact support (`internal_error`). |

## Related topics

- [List API keys](https://docs.dairo.app/api-reference/dairo-api/api-keys/list-api-keys.md)
- [Create an API key and return its one-time secret](https://docs.dairo.app/api-reference/dairo-api/api-keys/create-api-key.md)
- [Update an API key's name and/or IP allowlist](https://docs.dairo.app/api-reference/dairo-api/api-keys/patch-api-key.md)
- [Revoke an API key](https://docs.dairo.app/api-reference/dairo-api/api-keys/revoke-api-key.md)
- Previous: [Create an API key and return its one-time secret](https://docs.dairo.app/api-reference/dairo-api/api-keys/create-api-key.md)
- Next: [Update an API key's name and/or IP allowlist](https://docs.dairo.app/api-reference/dairo-api/api-keys/patch-api-key.md)
