Browse the documentation

Rate limits and idempotency

Rate limits

Seven counters, in fixed one-minute windows. A call goes through all of them; the first one full answers 429 API_RATE_LIMITED with Retry-After.

CounterCeilingCounted perApplies to
Address1 200 / mincalling IP addressevery /v1 call that presents a key, before the key is even checked
Reads600 / minkeyGET, HEAD
Writes60 / minkeyPOST, PUT, PATCH, DELETE
Power20 / minkey and servicePOST /services/{code}/power
Reinstall2 / minkey and servicePOST /services/{code}/reinstall
Deployment10 / minkey and sitePOST /services/{code}/web/sites/{siteId}/deployments and .../deployments/{deploymentId}/redeploy, together
Account1 200 / minaccountevery call, across all keys

POST /services/{code}/backups, POST /services/{code}/backups/restore, POST /services/{code}/actions/{action} and every /services/{code}/web/... and /services/{code}/games/... route also spend the account's action budgets, shared with the dashboard, whatever the route:

Action budgetCeiling
All actions300 / min
Backups (create or restore)10 / min
Password or secret resets10 / min
Domain verifications10 / min
Subdomain availability checks30 / min

Over budget, the answer is the same 429 API_RATE_LIMITED with Retry-After, and the action is not run. Every call to these routes counts, reads included: an integration polling them in a loop eats into the budget of its owner's dashboard.

Three details that change how a retry loop behaves:

  • A refused call counts. A burst of 400 eats the write budget like successful calls do. Fix the body before retrying.
  • Rotating a key resets its per-key counters. The account counter and the action budgets carry on.
  • The accepted rate can exceed the nominal ceiling. Rely on the nominal ceiling only.

Reading the headers

HeaderValue
X-RateLimit-Limitthe ceiling of the key or account counter closest to its limit (the action budgets are not reflected)
X-RateLimit-Remainingwhat is left on that counter
X-RateLimit-Resetepoch timestamp in seconds of the end of the window, not a delay
Retry-Afteron 429 API_RATE_LIMITED: seconds to wait, minimum 1

These headers describe the tightest counter at that moment, which is not always the same one from call to call.

Idempotency

Fifteen routes require an Idempotency-Key header: the four that move money, the seven that create a web hosting resource or start a deployment, and the four of a game server that answer a password or start an install.

  • POST /orders
  • POST /orders/{orderNumber}/pay
  • POST /invoices/{code}/pay
  • POST /services/{code}/renew
  • POST /services/{code}/web/sites and POST /services/{code}/web/sites/{siteId}/clone
  • POST /services/{code}/web/databases
  • POST /services/{code}/web/sftp-accounts
  • POST /services/{code}/web/sites/{siteId}/apps
  • POST /services/{code}/web/sites/{siteId}/deployments and .../deployments/{deploymentId}/redeploy
  • POST /services/{code}/games/databases and POST /services/{code}/games/databases/{databaseId}/password
  • POST /services/{code}/games/versions/installs
  • POST /services/{code}/games/content/installs
Idempotency keyDetail
Formatnon-blank string, 128 characters at most. A UUID does
Absent or blank400 IDEMPOTENCY_KEY_REQUIRED
Beyond 128 characters400 IDEMPOTENCY_KEY_INVALID
Scopethe API key. Two keys may use the same string without colliding
Retention24 hours

What makes it "the same request"

The digest covers the method, the concrete path and the body. The same idempotency key on another order number is therefore a different request.

SituationAnswer
Identical replay after a successthe recorded response, with Idempotent-Replayed: true. Nothing is redone
Same key, different request409 IDEMPOTENCY_KEY_REUSED
Same key while the first call is still running409 IDEMPOTENCY_IN_PROGRESS with Retry-After: 2

Refusals replay too

A refusal is a result: it is recorded and replayed. A replayed 402 PAYMENT_DENIED stays a 402, with no second payment attempt.

The exceptions are the refusals in the left column: they release the key, so fix the condition and retry with the same one. The others are recorded and replayed, PRODUCT_OUT_OF_STOCK and the validation refusals of POST /orders included: fix the request, then retry with a new key.

Releases the keyDoes not release it
INSUFFICIENT_BALANCEPAYMENT_DENIED and PAYMENT_DENIED_*
NO_PAYMENT_METHODPAYMENT_RECORDED_MISMATCH
PAYMENT_METHOD_ID_REQUIREDAPI_KEY_SPENDING_CAP_EXCEEDED
PAYMENT_METHOD_NOT_FOUNDPAYMENT_FAILED
PAYMENT_METHOD_NOT_ACTIVEany 500
PAYMENT_METHOD_DECRYPTION_FAILED
PAYMENT_METHOD_VAULT_ID_MISSING
PAYMENT_IN_PROGRESS
RENEWAL_IN_PROGRESS
RENEWAL_TOO_FREQUENT
PROMO_RATE_LIMITED
SITE_BUSY, INSTANCE_BUSY, DATABASE_BUSY
API_RATE_LIMITED
ACCOUNT_ACCESS_DENIED, ACCOUNT_ACCESS_REVOKED, SITE_SCOPE_RESTRICTED
SERVICE_NOT_FOUND, NOT_FOUND, SERVICE_NOT_ACTIVE, SERVICE_IN_DUNNING

API_KEY_SPENDING_CAP_EXCEEDED does not release the key, even when nothing was charged. Raise the cap, then retry with a new idempotency key.

A password does not replay

A creation or a reset that answers a password (a database, an SFTP account, an application's administrator, a game server's database) shows it once, in the first answer. A replay under the same idempotency key returns the same resource without its credential fields, with "credentialsRedacted": true in data; a connection URL loses its user:password@. The password is never kept with the recorded answer. Lost, it is reset: POST /services/{code}/web/databases/{databaseId}/password, POST /services/{code}/web/sftp-accounts/{accountId}/password, POST /services/{code}/web/sites/{siteId}/apps/{installId}/admin-password, POST /services/{code}/games/databases/{databaseId}/password.

In practice

  • Generate the idempotency key before the first send, and store it with the task, not in memory.
  • Reuse it as is for every retry of the same task.
  • Change it as soon as the task changes, even by one cent.