Throttle
GET/api/v1/throttle/plans
Authorization
bearer_token In: header
Query Parameters
Full-text search query applied to the plan description
1-indexed page number
int640 <= valuePage size
int640 <= valueSort field (created_at, updated_at)
Sort order (asc or desc)
Value in
- "asc"
- "desc"
Filter by a single tag
Response Body
application/json
curl -X GET "https://example.com/api/v1/throttle/plans"{ "pagination": { "has_more": true, "page": 0, "page_size": 0, "total": 0 }, "plans": [ { "actions": { "property1": { "cost": 0 }, "property2": { "cost": 0 } }, "created_at": "2019-08-24T14:15:22Z", "default_enforcement": "soft", "description": "string", "headers_mode": "standard", "limits": { "max_requests": 0, "window_seconds": 0 }, "owner_id": "string", "plan_id": "string", "refund_window_seconds": 0, "subject_namespaces": [ "string" ], "tags": [ "string" ], "updated_at": "2019-08-24T14:15:22Z" } ]}POST/api/v1/throttle/plans
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Create a throttle plan.
Use internal IDs only; do not pass email addresses, phone numbers, or other PII as subject identifiers.
Response Body
application/json
curl -X POST "https://example.com/api/v1/throttle/plans" \ -H "Content-Type: application/json" \ -d '{ "limits": { "max_requests": 0, "window_seconds": 0 }, "plan_id": "string" }'{ "actions": { "property1": { "cost": 0 }, "property2": { "cost": 0 } }, "created_at": "2019-08-24T14:15:22Z", "default_enforcement": "soft", "description": "string", "headers_mode": "standard", "limits": { "max_requests": 0, "window_seconds": 0 }, "owner_id": "string", "plan_id": "string", "refund_window_seconds": 0, "subject_namespaces": [ "string" ], "tags": [ "string" ], "updated_at": "2019-08-24T14:15:22Z"}GET/api/v1/throttle/plans/{plan_id}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/throttle/plans/string"{ "actions": { "property1": { "cost": 0 }, "property2": { "cost": 0 } }, "created_at": "2019-08-24T14:15:22Z", "default_enforcement": "soft", "description": "string", "headers_mode": "standard", "limits": { "max_requests": 0, "window_seconds": 0 }, "owner_id": "string", "plan_id": "string", "refund_window_seconds": 0, "subject_namespaces": [ "string" ], "tags": [ "string" ], "updated_at": "2019-08-24T14:15:22Z"}PATCH/api/v1/throttle/plans/{plan_id}
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Partial update for a throttle plan.
Response Body
application/json
curl -X PATCH "https://example.com/api/v1/throttle/plans/string" \ -H "Content-Type: application/json" \ -d '{}'{ "actions": { "property1": { "cost": 0 }, "property2": { "cost": 0 } }, "created_at": "2019-08-24T14:15:22Z", "default_enforcement": "soft", "description": "string", "headers_mode": "standard", "limits": { "max_requests": 0, "window_seconds": 0 }, "owner_id": "string", "plan_id": "string", "refund_window_seconds": 0, "subject_namespaces": [ "string" ], "tags": [ "string" ], "updated_at": "2019-08-24T14:15:22Z"}DELETE/api/v1/throttle/plans/{plan_id}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/api/v1/throttle/plans/string"{ "message": "string", "plan_id": "string"}POST/api/v1/throttle/plans/{plan_id}/check
Authorization
bearer_token In: header
Path Parameters
Query Parameters
Override the plan default enforcement: hard returns 429 on denial
Value in
- "soft"
- "hard"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Check + consume against a plan bucket.
Response Body
application/json
curl -X POST "https://example.com/api/v1/throttle/plans/string/check" \ -H "Content-Type: application/json" \ -d '{ "subject": "string" }'{ "allowed": true, "consume_token": "string", "limit": 0, "reason": "string", "remaining": 0, "reset_after_seconds": 0, "reset_at": 0, "retry_after_seconds": 0}POST/api/v1/throttle/plans/{plan_id}/peek
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Read-only bucket inspection.
Response Body
application/json
curl -X POST "https://example.com/api/v1/throttle/plans/string/peek" \ -H "Content-Type: application/json" \ -d '{ "subject": "string" }'{ "limit": 0, "remaining": 0, "reset_after_seconds": 0, "reset_at": 0}POST/api/v1/throttle/plans/{plan_id}/refund
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Refund a prior consume by its token.
Response Body
application/json
curl -X POST "https://example.com/api/v1/throttle/plans/string/refund" \ -H "Content-Type: application/json" \ -d '{ "consume_token": "string", "subject": "string" }'{ "cost_refunded": 0, "refunded": true}POST/api/v1/throttle/plans/{plan_id}/reset
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Administratively reset a subject bucket to full capacity.
Response Body
application/json
curl -X POST "https://example.com/api/v1/throttle/plans/string/reset" \ -H "Content-Type: application/json" \ -d '{ "subject": "string" }'{ "message": "string"}GET/api/v1/throttle/plans/{plan_id}/stats
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/throttle/plans/string/stats"{ "plan_id": "string", "total_allowed": 0, "total_checks": 0, "total_denied": 0, "total_refunded": 0}