Delete API namespace
Changed onPermanently delete an API namespace and immediately invalidate all associated keys.
Use this for cleaning up development environments, retiring deprecated services, or removing unused resources. All keys in the namespace are immediately marked as deleted and will fail verification with code=NOT_FOUND.
Important: This operation is immediate and permanent. Verify you have the correct API ID before deletion. If delete protection is enabled, disable it first through the dashboard or API configuration.
Required Permissions
Your root key must have one of the following permissions:
- api.*.delete_api (to delete any API)
- api.<api_id>.delete_api (to delete a specific API)
Request
- Base URLhttps://api.unkey.com
- URLhttps://api.unkey.com/v2/apis.deleteApi
- AuthHTTP bearer
Request body
Example request
{
"apiId": "api_1234abcd"
}Response
API namespace deleted successfully. All associated keys are immediately invalidated and will fail verification with code=NOT_FOUND.
Example response
{
"meta": {
"requestId": "req_123"
}
}Changes
- info
the endpoint scheme security
bearerwas added to the API - info
the endpoint scheme security
rootKeywas removed from the API
- info
- info
added the non-success response with the status
- info