---
title: "Delete ratelimit namespace"
method: POST
path: "/v2/ratelimit.deleteNamespace"
tags: ["ratelimit"]
---

# Delete ratelimit namespace

`POST /v2/ratelimit.deleteNamespace`

## Request

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

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)

## Request body

- V2RatelimitDeleteNamespaceRequestBody
  - `namespace` string, required: The namespace to delete. Pass the namespace ID (`rlns_...`) or its name.

## Response `200`

Namespace and its overrides deleted.

- V2RatelimitDeleteNamespaceResponseBody
  - `meta` Meta, required: Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
    - `requestId` string, required: A unique id for this request. Always include this ID when contacting support about a specific API request. This identifier allows Unkey's support team to trace the exact request through logs and diagnostic systems to provide faster assistance.
  - `data` EmptyResponse, required: Empty response object by design. A successful response indicates this operation was successfully executed.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden - The root key or the workspace is disabled, or the key can read the namespace but lacks the required permission. A key that cannot read the namespace gets 404 instead.
- `404`: Not Found - The namespace does not exist in your workspace, was already deleted, or your root key cannot read it. All cases return the same response, so a root key cannot learn which namespaces exist.
- `429`: Too Many Requests
- `500`: Internal server error

## Changes

- **2026-10-13** `764f52b42650`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/unkeyed/apis/unkey-api/changes/v2/ratelimit.deleteNamespace/post.md)

---

[API](https://skmtc.dev/unkeyed/apis/unkey-api.md) - [All operations](https://skmtc.dev/unkeyed/apis/unkey-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unkeyed/apis/unkey-api/revisions/6fbaa27f19e0?raw)
