> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avatcado.com/llms.txt
> Use this file to discover all available pages before exploring further.

# key_revoked

> Error: the API key has already been revoked

# key\_revoked

<Info>HTTP Status: **409 Conflict**</Info>

## Example response

```json theme={null}
{
  "error": {
    "code": "key_revoked",
    "message": "This API key has already been revoked",
    "docs_url": "https://docs.avatcado.com/errors/key_revoked"
  },
  "meta": {
    "request_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}
```

## What happened?

You tried to revoke or roll an API key that has already been revoked. This is a conflict error because the requested action has already been performed.

## How to fix

1. **Check the key status**. The key may have been revoked by another team member or through a previous request.
2. **Create a new key** if you need a replacement. Use the dashboard or the admin API.

## Catching this error with the SDKs

<CodeGroup>
  ```typescript @avatcado/node theme={null}
  import Avatcado, { AuthenticationError } from '@avatcado/node';

  const avatcado = new Avatcado('avat_live_your_api_key');
  const { data, error } = await avatcado.vat.validate({ vatNumber: '...' });

  if (error instanceof AuthenticationError) {
    console.log(error.message);
  }
  ```

  ```python Python theme={null}
  from avatcado import Avatcado, AuthenticationError

  avatcado = Avatcado("avat_live_your_api_key")

  try:
      result = avatcado.vat.validate("...")
  except AuthenticationError as e:
      print(e.message)
  ```
</CodeGroup>

## Related errors

* [`unauthorized`](/errors/unauthorized): API key is missing or invalid
* [`not_found`](/errors/not_found): Requested resource does not exist
