Skip to main content
PUT
/
api
/
rate-limits
/
tiers
/
{tier}
Update Tier
curl --request PUT \
  --url https://api.example.com/api/rate-limits/tiers/{tier} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "allowed_limit": 123,
  "window_seconds": 123,
  "is_active": true
}
'

Authentication

Authorization
string
required
Bearer token: Bearer <admin_token>

Path Parameters

tier
string
required
Tier name to update

Request Body

allowed_limit
integer
Updated request limit
window_seconds
integer
Updated time window
is_active
boolean
Updated active status

Example Request

curl -X PUT https://api.sari-platform.com/api/rate-limits/tiers/client \
  -H "Authorization: Bearer <admin_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "allowed_limit": 2000,
    "is_active": true
  }'

Response

Returns the updated tier configuration.
{
  "tier": "client",
  "allowed_limit": 2000,
  "window_seconds": 3600,
  "is_active": true,
  "updated_at": "2024-01-16T12:00:00Z"
}

Errors

StatusDescription
400Invalid request body
401Invalid or expired token
403Admin access required
404Tier not found