Limits & safe retries
Rate limits
Section titled “Rate limits”Limits are counted per API key, per minute:
| Key | All requests | Orders and bookings created |
|---|---|---|
| Publishable | 120 / minute | 20 / minute |
| Secret | 600 / minute | 120 / minute |
Every response to a key-authenticated request has:
X-RateLimit-Limit: requests allowed this minute;X-RateLimit-Remaining: requests left this minute;X-RateLimit-Reset: when the minute ends, in Unix seconds.
Over the limit you get 429 rate_limited with a Retry-After header in seconds. Wait that long before trying again.
Safe retries
Section titled “Safe retries”Networks fail. If a request to create an order or booking times out, you cannot tell whether it was saved.
To retry without creating a duplicate, send an Idempotency-Key header with POST /orders and POST /reservations:
POST /ordersIdempotency-Key: 6f1d2c1e-6a2b-4b8e-9b55-0d9a7e2c3f10- Use a new random value (for example
crypto.randomUUID()) for each new order, and the same value when you retry that order. - If the first request finished, the retry returns the same response with the header
Idempotent-Replayed: true. No second order is created. - If the first request is still running, you get
409 request_in_progress; retry a few seconds later. - Reusing a key with a different body gives
409 idempotency_conflict. - Keys are remembered for 24 hours, per API key.
A good retry pattern: up to 3 attempts, waiting 1, 2 and 4 seconds, only for network errors, 409 request_in_progress, 429 and 500.
Never retry 400, 401, 403, 404 or 422 without changing the request.
Marking an order as paid (POST /orders/{id}/payment) is safe to repeat without an Idempotency-Key: once paid, it returns the order unchanged.
