Create or update a custom rate limit for specific identifiers, bypassing the namespace default.
Use this to create premium tiers with higher limits, apply stricter limits to specific users, or implement emergency throttling.
Important: Overrides take effect immediately and completely replace the default limit for matching identifiers. Use wildcard patterns (e.g., premium_*) to match multiple identifiers.
Permissions: Requires ratelimit.*.set_override or ratelimit.<namespace_id>.set_override
Unkey uses API keys (root keys) for authentication. These keys authorize access to management operations in the API. To authenticate, include your root key in the Authorization header of each request:
Authorization: Bearer unkey_123Root keys have specific permissions attached to them, controlling what operations they can perform. Key permissions follow a hierarchical structure with patterns like resource.resource_id.action (e.g., apis.*.create_key, apis.*.read_api).
Security best practices:
Sets a new or overwrites an existing rate limit override. Overrides allow you to apply special rate limit rules to specific identifiers, providing custom limits that differ from the default.
Overrides are useful for:
The ID or name of the rate limit namespace.
1 - 255The duration in milliseconds for the rate limit window. This defines how long the rate limit counter accumulates before resetting to zero.
Considerations:
x >= 1000Identifier of the entity receiving this custom rate limit. This can be:
Wildcards (*) can be used to create pattern-matching rules that apply to multiple identifiers. For example:
More detailed information on wildcard pattern rules is available at https://www.unkey.com/docs/ratelimiting/overrides#wildcard-rules
1 - 255The maximum number of requests allowed for this override. This defines the custom quota for the specified identifier(s).
Special values:
This limit entirely replaces the default limit for matching identifiers.
x >= 0Override successfully created or updated and is now active.