ratelimit
Update ratelimit namespace
Changed onRename a rate limit namespace, identified by its ID or current name.
Renaming to the current name returns the namespace without a write.
Important: Overrides stay with the namespace. Requests that pass the namespace by name, such as ratelimit.limit, must use the new name. A ratelimit.limit call with the old name can create a new, empty namespace with that name. A name that is in use or was deleted returns 409. Other API nodes can take up to a minute to see the new name.
Required Permissions
Your root key must have one of the following permissions:
- unkey:v1:<workspace_id>:projects/*/ratelimits/namespaces/*#write (to rename any namespace)
- unkey:v1:<workspace_id>:projects/<project_id>/ratelimits/namespaces/<namespace_id>#write (to rename a specific namespace)
post/v2/ratelimit.updateNamespace
Request
- Base URLhttps://api.unkey.com
- URLhttps://api.unkey.com/v2/ratelimit.updateNamespace
- AuthHTTP bearer
Request body
Example request
{
"namespace": "rlns_1234abcd",
"name": "email.outbound"
}Response
Namespace renamed successfully.
Example response
{
"meta": {
"requestId": "req_123"
},
"data": {
"id": "rlns_1234abcd",
"name": "api.requests",
"createdAt": 1704067200000,
"updatedAt": 1704153600000
}
}Changes
- info
endpoint added
- info