Unkey · Example Payload
Unkey Ratelimitmultilimit Example
API KeysRate LimitingAuthenticationDeveloper PlatformAccess ControlIdentityAnalytics
Unkey Ratelimitmultilimit Example is an example object payload from Unkey, with 6 top-level fields. It illustrates the shape of data this provider's APIs accept or return.
Top-level fields
operationIdmethodpathsummaryrequestExamplesresponseExamples
Example Payload
{
"operationId": "ratelimit.multiLimit",
"method": "POST",
"path": "/v2/ratelimit.multiLimit",
"summary": "Apply Multiple Rate Limit Checks",
"requestExamples": [
{
"contentType": "application/json",
"name": "ipHashAndUserLimits",
"example": [
{
"duration": 60000,
"identifier": "sha256_8f434346648f6b96df89dda901c5176b10a6d83961dd3c1ac88b59b2dc327aa4",
"limit": 10,
"namespace": "auth.login"
},
{
"duration": 3600000,
"identifier": "user_def456",
"limit": 1000,
"namespace": "api.requests"
}
]
},
{
"contentType": "application/json",
"name": "multipleChecks",
"example": [
{
"duration": 60000,
"identifier": "user_abc123",
"limit": 100,
"namespace": "api.requests"
},
{
"duration": 60000,
"identifier": "user_abc123",
"limit": 5,
"namespace": "auth.login"
}
]
},
{
"contentType": "application/json",
"name": "withWeightedCost",
"example": [
{
"cost": 1,
"duration": 60000,
"identifier": "user_xyz789",
"limit": 100,
"namespace": "api.light_operations"
},
{
"cost": 5,
"duration": 3600000,
"identifier": "user_xyz789",
"limit": 50,
"namespace": "api.heavy_operations"
}
]
}
],
"responseExamples": [
{
"status": "200",
"contentType": "application/json",
"name": "allAllowed",
"example": {
"data": {
"limits": [
{
"identifier": "user_abc123",
"limit": 100,
"namespace": "api.requests",
"remaining": 99,
"reset": 1714582980000,
"success": true
},
{
"identifier": "user_abc123",
"limit": 5,
"namespace": "auth.login",
"remaining": 4,
"reset": 1714582980000,
"success": true
}
],
"passed": true
},
"meta": {
"requestId": "req_01H9TQPP77V5E48E9SH0BG0ZQX"
}
}
},
{
"status": "200",
"contentType": "application/json",
"name": "mixedResults",
"example": {
"data": {
"limits": [
{
"identifier": "sha256_8f434346648f6b96df89dda901c5176b10a6d83961dd3c1ac88b59b2dc327aa4",
"limit": 10,
"namespace": "auth.login",
"remaining": 5,
"reset": 1714582980000,
"success": true
},
{
"identifier": "user_def456",
"limit": 1000,
"namespace": "api.requests",
"remaining": 0,
"reset": 1714583040000,
"success": false
}
],
"passed": false
},
"meta": {
"requestId": "req_01H9TQPP77V5E48E9SH0BG0ZQY"
}
}
},
{
"status": "200",
"contentType": "application/json",
"name": "withOverride",
"example": {
"data": {
"limits": [
{
"identifier": "user_xyz789",
"limit": 100,
"namespace": "api.light_operations",
"remaining": 95,
"reset": 1714582980000,
"success": true
},
{
"identifier": "user_xyz789",
"limit": 1000,
"namespace": "api.heavy_operations",
"overrideId": "ovr_2cGKbMxRyIzhCxo1Idjz8q",
"remaining": 995,
"reset": 1714582980000,
"success": true
}
],
"passed": true
},
"meta": {
"requestId": "req_01H9TQPP77V5E48E9SH0BG0ZQZ"
}
}
}
]
}