ratelimit
Create ratelimit namespace
Changed onCreate a rate limit namespace before you rate limit against it.
ratelimit.limit also creates a namespace the first time you use its name, when your root key can create namespaces. Use this endpoint when you want the namespace to exist up front, for example to set overrides before the first request.
Important: Names are unique within your workspace, deleted namespaces included. A name that is in use or was deleted returns 409.
Required Permissions
Your root key must have the following permission:
- unkey:v1:<workspace_id>:projects/*/ratelimits/namespaces/*#write
post/v2/ratelimit.createNamespace
Request
- Base URLhttps://api.unkey.com
- URLhttps://api.unkey.com/v2/ratelimit.createNamespace
- AuthHTTP bearer
Request body
Example request
{
"name": "email.outbound"
}Response
Namespace created successfully.
Example response
{
"meta": {
"requestId": "req_123"
},
"data": {
"id": "rlns_1234abcd",
"name": "api.requests",
"createdAt": 1704067200000,
"updatedAt": 1704153600000
}
}Changes
- info
endpoint added
- info