Skip to main content
err:unkey:data:api_not_found
The apiId you sent doesn’t match an API in your workspace. You get HTTP 404.
Example response

Likely causes

  • The ID has a typo, or isn’t an API ID. API IDs start with api_.
  • The API was deleted.
  • The API is in another workspace.
  • Your root key can’t read the API. apis.getApi, apis.listKeys, and keys.createKey return this 404 instead of a 403, so a 404 doesn’t prove the API is gone. A key that can read the API but lacks the action gets a 403 err:unkey:authorization:insufficient_permissions that names the missing permission.

How to fix

  1. Copy the ID from the dashboard or from the apis.createApi response.
  2. If the ID is right, check that the root key has the permission the endpoint needs on that API.
  3. If the API was deleted, create a new one. Deleting an API from the dashboard also deletes its keyspace and all its keys. Deleting it with apis.deleteApi removes only the API, and its keys can’t be reached through that apiId any more.
Last modified on October 27, 2026