err:unkey:data:key_not_foundkeyId 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
keyIdis 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
- Use the
keyIdreturned when the key was created. It starts withkey_. - If you lost it, list keys with
apis.listKeysto find it. - If the key was deleted, create a new one. Deleted keys can’t be restored through the API.
Related errors
err:unkey:authentication:key_not_found: the root key in theAuthorizationheader isn’t valid.err:unkey:data:api_not_found: the API that would own the key doesn’t exist.err:unkey:data:key_auth_not_found: the keyspace id doesn’t exist.