# Revoke an API key

## DELETE `/v1/orgs/{id}/keys/{keyId}`

The creator or an organization owner/admin may revoke a key. Future authentication fails; durable work already accepted is retained.

## Authentication

Use a person's Bearer access token or console session. See [Authentication](https://augenta.pages.dev/docs/authentication.md).

## Request example

```bash
curl --fail-with-body -X DELETE "https://api.augenta.ai/v1/orgs/$AUGENTA_ORG_ID/keys/$AUGENTA_API_KEY_ID" \
  -H "Authorization: Bearer $AUGENTA_ACCESS_TOKEN"
```

## Parameters

<a id="request-parameters-id"></a>

### `request.parameters.id`

`string` · required

path parameter.

Min length: `1`.

<a id="request-parameters-keyid"></a>

### `request.parameters.keyId`

`string` · required

path parameter.

## Response 200

Revoked.

Content-Type: `application/json`

<a id="response-200-object"></a>

### `response.200.object`

`string` · always present

Allowed values: `"api_key"`.

<a id="response-200-id"></a>

### `response.200.id`

`string` · always present

Min length: `1`.

<a id="response-200-revoked"></a>

### `response.200.revoked`

`boolean` · always present

Allowed values: `true`.

## Response 400

invalid_request: invalid fields or destination.

Content-Type: `application/json`

<a id="response-400-error"></a>

### `response.400.error`

`object` · always present

<a id="response-400-error-code"></a>

### `response.400.error.code`

`string` · always present

Stable. The Errors page lists every code.

<a id="response-400-error-message"></a>

### `response.400.error.message`

`string` · always present

Human-readable. May change; don't parse it.

<a id="response-400-error-retryable"></a>

### `response.400.error.retryable`

`boolean` · always present

<a id="response-400-error-retryafterseconds"></a>

### `response.400.error.retryAfterSeconds`

`integer` · conditional

Capacity retry interval, also present as Retry-After before stream headers commit. SSE error events retain this field after HTTP 200 is committed.

Minimum: `1`.

<a id="response-400-error-billingurl"></a>

### `response.400.error.billingUrl`

`string` · conditional

Top-up action when error.code is insufficient_balance (HTTP 402).

<a id="response-400-requestid"></a>

### `response.400.requestId`

`string` · always present

The request's id, as in the `X-Request-Id` response header.

## Response 401

unauthenticated: sign in first.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 403

forbidden: this action requires a person with the necessary role; API keys cannot administer resources.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 404

not_found: the key is unavailable.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 409

conflict: the operation could not be completed.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 429

rate_limited: retry after Retry-After.

Content-Type: `application/json`

Response fields use the same schema as Response 400.

## Response 500

internal_error: quote requestId when reporting a failure.

Content-Type: `application/json`

Response fields use the same schema as Response 400.
