Skip to main content
POST
/
api
/
rate-limits
/
overrides
Create Override
curl --request POST \
  --url https://api.example.com/api/rate-limits/overrides \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "client_id": "<string>",
  "allowed_limit": 123,
  "window_seconds": 123,
  "is_active": true
}
'

Authentication

Authorization
string
required
Bearer token: Bearer <admin_token>

Request Body

client_id
string
required
The client’s profile ID (UUID)
allowed_limit
integer
required
Custom request limit
window_seconds
integer
required
Custom time window
is_active
boolean
default:"true"
Whether this override is active

Example Request

curl -X POST https://api.sari-platform.com/api/rate-limits/overrides \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "550e8400-e29b-41d4-a716-446655440000",
    "allowed_limit": 5000,
    "window_seconds": 3600,
    "is_active": true
  }'

Response

{
  "id": 1,
  "client_id": "550e8400-e29b-41d4-a716-446655440000",
  "allowed_limit": 5000,
  "window_seconds": 3600,
  "is_active": true,
  "created_at": "2024-01-15T10:00:00Z"
}
Overrides take precedence over tier-based limits. A client can have only one active override.

Errors

StatusDescription
400Invalid request body
401Invalid or expired token
403Admin access required
404Client not found
409Client already has an active override