Skip to main content
err:unkey:data:key_not_found
The keyId you sent doesn’t match a key in your workspace. You get HTTP 404. This is about a key you manage. If your root key is the problem, you get err:unkey:authentication:key_not_found instead.
Example response

Likely causes

  • You sent the secret key string where a keyId is expected.
  • The key was deleted.
  • The key ID is from another workspace, such as a staging workspace used with a production root key.
  • On keys.whoami, which takes the key string, the string doesn’t match any key.

How to fix

  1. Use the keyId returned when the key was created. It starts with key_.
  2. If you lost it, list keys with apis.listKeys to find it.
  3. If the key was deleted, create a new one. Deleted keys can’t be restored through the API.
Last modified on October 6, 2026