err:unkey:data:api_not_foundapiId 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, andkeys.createKeyreturn 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 403err:unkey:authorization:insufficient_permissionsthat names the missing permission.
How to fix
- Copy the ID from the dashboard or from the
apis.createApiresponse. - If the ID is right, check that the root key has the permission the endpoint needs on that API.
- 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.deleteApiremoves only the API, and its keys can’t be reached through thatapiIdany more.
Related errors
err:unkey:data:key_not_found: a key within the API doesn’t exist.err:unkey:application:precondition_failed: the API exists but isn’t set up for keys or for key recovery.err:unkey:application:protected_resource: the API can’t be deleted while delete protection is on.