ratelimit

Delete ratelimit namespace

Changed on

Delete a rate limit namespace and all of its overrides, identified by the namespace ID or name.

Important: A deleted name cannot be reused. ratelimit.limit and ratelimit.multiLimit return 410 for it instead of creating a new namespace, so a deleted namespace does not turn into unlimited traffic. Other API nodes can take up to a minute to see the deletion.

Required Permissions

Your root key must have one of the following permissions:

  • unkey:v1:<workspace_id>:projects/*/ratelimits/namespaces/*#delete (to delete any namespace)
  • unkey:v1:<workspace_id>:projects/<project_id>/ratelimits/namespaces/<namespace_id>#delete (to delete a specific namespace)
post/v2/ratelimit.deleteNamespace

Request

  • Base URL
    https://api.unkey.com
  • URL
    https://api.unkey.com/v2/ratelimit.deleteNamespace
  • Auth
    HTTP bearer

Request body

namespacestring required

The namespace to delete. Pass the namespace ID (rlns_...) or its name.

Example request

{
  "namespace": "rlns_1234abcd"
}

Response

Namespace and its overrides deleted.

dataEmptyResponse required

Empty response object by design. A successful response indicates this operation was successfully executed.

Example response

{
  "meta": {
    "requestId": "req_123"
  }
}

Changes