Example
{
  "meta": {
    "requestId": "req_2c9a0jf23l4k567"
  },
  "error": {
    "detail": "The requested rate limit override could not be found",
    "status": 404,
    "title": "Not Found",
    "type": "https://unkey.com/docs/api-reference/errors-v2/unkey/data/ratelimit_override_not_found"
  }
}

What Happened?

This error occurs when you’re trying to perform an operation on a rate limit override that doesn’t exist in the Unkey system. Rate limit overrides are used to create custom rate limits for specific identifiers within a namespace.

Common scenarios that trigger this error:

  • Using an incorrect override ID
  • Referencing an override that has been deleted
  • Trying to get or modify an override for an identifier that doesn’t have one
  • Using the wrong namespace when looking up an override

Here’s an example of a request that would trigger this error:

# Attempting to get a non-existent rate limit override
curl -X POST https://api.unkey.com/v2/ratelimit.getOverride \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer unkey_YOUR_API_KEY" \
  -d '{
    "namespaceId": "ns_123abc",
    "identifier": "user_without_override"
  }'

How To Fix

Verify that you’re using the correct namespace and identifier, and that the override still exists:

  1. Check the namespace ID and identifier in your request for typos
  2. List all overrides in the namespace to confirm if the one you’re looking for exists
  3. If the override has been deleted or never existed, you may need to create it

Here’s how to list overrides in a namespace:

curl -X POST https://api.unkey.com/v2/ratelimit.listOverrides \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer unkey_YOUR_API_KEY" \
  -d '{
    "namespaceId": "ns_123abc"
  }'

If you need to create a new override, use the ratelimit.setOverride endpoint:

curl -X POST https://api.unkey.com/v2/ratelimit.setOverride \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer unkey_YOUR_API_KEY" \
  -d '{
    "namespaceId": "ns_123abc",
    "identifier": "user_123",
    "limit": 200,
    "duration": 60000
  }'

Common Mistakes

  • Wrong identifier: Using an incorrect user identifier when looking up overrides
  • Deleted overrides: Attempting to reference overrides that have been removed
  • Namespace mismatch: Looking in the wrong namespace for an override
  • Assuming defaults are overrides: Trying to get an override for an identifier that’s using default limits