Update a quota

Update an existing quota.

PUT
/quotas/{id}
AuthorizationBearer <token>

Project API key

In: header

Path Parameters

id*string

Unique identifier for the quota

Request Body

application/json

name?string

Human-readable name for the quota

Length1 <= length
dimensionFilters?

Dimension filters that determine which events match this quota

metric?string

Metric being tracked

Value in"total_tokens" | "total_events" | "total_cost_cents"
limitValue?integer

Quota limit value

Range0 < value
period?string

Time period for the quota

Value in"hour" | "day" | "week" | "month"

Response Body

application/json

application/json

application/json

curl -X PUT "https://api.limitry.com/v1/quotas/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "qta_abc123",
  "projectId": "proj_xyz",
  "name": "Daily Token Limit",
  "dimensionFilters": {
    "customer_id": "cust_123"
  },
  "metric": "total_tokens",
  "limitValue": 150000,
  "period": "day",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-16T14:22:00Z"
}
{
  "error": "Invalid or missing API key"
}
{
  "error": "Resource not found"
}