Data
err:unkey:data:api_not_found
The requested API was not found
Example
What Happened?
This error occurs when you’re trying to perform an operation on an API that doesn’t exist in the Unkey system. In Unkey, APIs are resources that you create to organize and manage your keys.
Common scenarios that trigger this error:
- Using an incorrect API ID in your requests
- Referencing an API that has been deleted
- Attempting to access an API in a workspace you don’t have access to
- Typos in API names when using name-based lookups
Here’s an example of a request that would trigger this error:
How To Fix
Verify that you’re using the correct API ID and that the API still exists in your workspace:
- List all APIs in your workspace to find the correct ID
- Check if the API has been deleted and recreate it if necessary
- Verify you’re working in the correct workspace
- Ensure proper permissions to access the API
Here’s how to list all APIs in your workspace:
If you need to create a new API, use the apis.createApi
endpoint:
Common Mistakes
- Copy-paste errors: Using incorrect API IDs from documentation examples
- Deleted APIs: Attempting to reference APIs that have been deleted
- Environment confusion: Looking for an API in production that only exists in development
- Workspace boundaries: Trying to access an API that exists in another workspace
Related Errors
- err:unkey:data:workspace_not_found - When the requested workspace doesn’t exist
- err:unkey:data:key_not_found - When the requested key doesn’t exist
- err:unkey:authorization:insufficient_permissions - When you don’t have permission to access an API