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: - Granting higher limits to premium users or trusted partners - Implementing stricter limits for suspicious or abusive users - Creating tiered access levels with different quotas - Implementing temporary rate limit adjustments - Prioritizing important clients with higher limits
API KeysRate LimitingAuthenticationDeveloper PlatformAccess ControlIdentityAnalytics
Properties
Name
Type
Description
namespace
string
The ID or name of the rate limit namespace.
duration
integer
The duration in milliseconds for the rate limit window. This defines how long the rate limit counter accumulates before resetting to zero. Considerations: - This can differ from the default duration f
identifier
string
Identifier of the entity receiving this custom rate limit. This can be: - A specific user ID for individual custom limits - An IP address for location-based rules - An email domain for organization-wi
limit
integer
The maximum number of requests allowed for this override. This defines the custom quota for the specified identifier(s). Special values: - Higher than default: For premium or trusted entities - Lower
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/V2RatelimitSetOverrideRequestBody",
"title": "V2RatelimitSetOverrideRequestBody",
"description": "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.\n\nOverrides are useful for:\n- Granting higher limits to premium users or trusted partners\n- Implementing stricter limits for suspicious or abusive users\n- Creating tiered access levels with different quotas\n- Implementing temporary rate limit adjustments\n- Prioritizing important clients with higher limits",
"additionalProperties": false,
"properties": {
"namespace": {
"description": "The ID or name of the rate limit namespace.",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"duration": {
"description": "The duration in milliseconds for the rate limit window. This defines how long the rate limit counter accumulates before resetting to zero.\n\nConsiderations:\n- This can differ from the default duration for the namespace\n- Longer durations create stricter limits that take longer to reset\n- Shorter durations allow more frequent bursts of activity\n- Common values: 60000 (1 minute), 3600000 (1 hour), 86400000 (1 day)",
"format": "int64",
"type": "integer",
"minimum": 1000
},
"identifier": {
"description": "Identifier of the entity receiving this custom rate limit. This can be:\n\n- A specific user ID for individual custom limits\n- An IP address for location-based rules\n- An email domain for organization-wide policies\n- Any other string that identifies the target entity\n\nWildcards (*) can be used to create pattern-matching rules that apply to multiple identifiers. For example:\n- 'premium_*' would match all identifiers starting with 'premium_'\n- '*_admin' would match all identifiers ending with '_admin'\n- '*suspicious*' would match any identifier containing 'suspicious'\n\nMore detailed information on wildcard pattern rules is available at https://www.unkey.com/docs/ratelimiting/overrides#wildcard-rules",
"type": "string",
"minLength": 1,
"maxLength": 255
},
"limit": {
"description": "The maximum number of requests allowed for this override. This defines the custom quota for the specified identifier(s).\n\nSpecial values:\n- Higher than default: For premium or trusted entities\n- Lower than default: For suspicious or abusive entities\n- 0: To completely block access (useful for ban implementation)\n\nThis limit entirely replaces the default limit for matching identifiers.",
"format": "int64",
"type": "integer",
"minimum": 0
}
},
"required": [
"namespace",
"identifier",
"limit",
"duration"
],
"type": "object"
}