# social.coves.aggregator.revokeApiKey

> Published by [coves.social](https://lexicon.garden/identity/did:web:coves.social)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.aggregator.revokeApiKey)
- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.aggregator.revokeApiKey/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.aggregator.revokeApiKey/examples)

## Definitions

### `social.coves.aggregator.revokeApiKey`

**Type**: `procedure`

Revoke the authenticated aggregator's API key. After revocation, the aggregator must complete OAuth flow again to create a new API key. This action cannot be undone.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `revokedAt` | `string` (datetime) | Yes | ISO8601 timestamp when the key was revoked |

#### Errors

- **AuthenticationRequired**: Authentication is required to revoke an API key
- **AggregatorRequired**: Only registered aggregators can revoke API keys
- **AggregatorNotFound**: Aggregator not found
- **ApiKeyNotFound**: No API key exists to revoke
- **ApiKeyAlreadyRevoked**: API key has already been revoked
- **RevocationFailed**: Failed to revoke the API key

## Raw Schema

```json
{
  "id": "social.coves.aggregator.revokeApiKey",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "properties": {},
          "description": "No input required. Revokes the key for the authenticated aggregator."
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthenticationRequired",
          "description": "Authentication is required to revoke an API key"
        },
        {
          "name": "AggregatorRequired",
          "description": "Only registered aggregators can revoke API keys"
        },
        {
          "name": "AggregatorNotFound",
          "description": "Aggregator not found"
        },
        {
          "name": "ApiKeyNotFound",
          "description": "No API key exists to revoke"
        },
        {
          "name": "ApiKeyAlreadyRevoked",
          "description": "API key has already been revoked"
        },
        {
          "name": "RevocationFailed",
          "description": "Failed to revoke the API key"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "revokedAt"
          ],
          "properties": {
            "revokedAt": {
              "type": "string",
              "format": "datetime",
              "description": "ISO8601 timestamp when the key was revoked"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Revoke the authenticated aggregator's API key. After revocation, the aggregator must complete OAuth flow again to create a new API key. This action cannot be undone."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
