Update a rate limit

Update an existing rate limit.

PUT
/rate-limits/{id}
AuthorizationBearer <token>

Project API key

In: header

Path Parameters

id*string

Unique identifier for the rate limit

Request Body

application/json

name?string

Human-readable name for the rate limit

Length1 <= length
dimensionFilters?

Dimension filters that determine which requests match this rate limit

limitValue?integer

Maximum number of requests allowed in the time window

Range0 < value
window?string

Time window for the rate limit

Value in"second" | "minute" | "hour"
enabled?boolean

Whether the rate limit is enabled

Response Body

application/json

application/json

application/json

curl -X PUT "https://api.limitry.com/v1/rate-limits/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "rl_abc123",
  "projectId": "proj_xyz",
  "name": "Customer API limit",
  "dimensionFilters": {
    "customer_id": "cust_123"
  },
  "limitValue": 200,
  "window": "1h",
  "enabled": true,
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-16T14:22:00Z"
}
{
  "error": "Invalid or missing API key"
}
{
  "error": "Resource not found"
}