Skip to main content
err:unkey:authentication:key_not_found
The bearer token you sent isn’t a valid root key. You get HTTP 401.
Example response

Likely causes

  • The root key was deleted or rotated.
  • The token has a typo or was copied incompletely.
  • You sent one of your own API keys instead of a root key. Then detail is just The provided root key is invalid., without the second sentence.

How to fix

  1. Check the token against the root key you created in the dashboard. Root keys start with unkey_.
  2. If you rotated or deleted the key, create a new one and update every service that uses it.
  3. Don’t send your own API keys in the header. They go in the body of keys.verifyKey.
This is about the key you authenticate with. A key you manage that doesn’t exist is err:unkey:data:key_not_found. A keys.verifyKey result of valid: false with code NOT_FOUND isn’t an error: the call worked and is telling you about one of your keys.
Last modified on October 6, 2026