Skip to main content

key_revoked

HTTP Status: 409 Conflict

Example response

{
  "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

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);
}