Rate limits and errors
Rate limits
There are two separate limits:
GET /v1/account,GET /v1/domains…andPOST /v1/domains/l7together: 120 requests a minute per account, counted separately for your current key and, during the 7-day overlap, for the previous key.POST /v1/owner-logins: a separate 120 requests a minute per account, counted separately for each key (or origin agent) that creates links.
If you go over the limit, the API returns 429 with error rate_limited. There is no Retry-After header, so back off and wait a minute before trying again.
Account and domains errors
Errors on GET /v1/account, GET /v1/domains… and POST /v1/domains/l7 come back as application/problem+json, with an error code you can match on:
{"title": "Conflict", "status": 409, "detail": "No spare Website protection capacity. 3 of 3 domains with Website protection in use: 2 included with 2 licensed sentries, 1 Website protection licence. Add a licensed sentry or buy a Website protection licence to enable Website protection on more domains.", "error": "no_l7_place", "domainId": 2051}
title is the usual reason phrase for the status. domainId is only included for no_l7_place.
| Status | error | When |
|---|---|---|
| 400 | invalid_request | Neither or both of domainId and domain were given, the name can't be a domain name, or enabled is missing on POST /v1/domains/l7. |
| 400 | (may have no error) | The body isn't valid JSON. |
| 415 | (no custom error) | Content-Type is missing or isn't application/json. |
| 401 | unauthorized | The key is missing or not recognised, or it's an origin agent key. Detail: Use your account API key as the Bearer token. |
| 403 | account_closed | The key belongs to a closed account. Detail: This stillorigin account is closed. |
| 404 | domain_not_found | There's no domain with that ID or name in this account. Detail: There's no domain with that ID or name in this account. |
| 409 | no_l7_place | Turning Website protection on, and no Website protection licence is free. Nothing changed. detail has the counts; domainId is the domain. |
| 429 | rate_limited | More than 120 requests in a minute for that account and key. Detail: Too many requests. Try again in a minute. |
Match on error, not on detail: the detail text is for your logs and admin screens, and may change.
Owner sign-in link errors
POST /v1/owner-logins uses a simpler body, {"error":"…"}, not application/problem+json.
| Status | Body | When |
|---|---|---|
| 400 | {"error":"invalid_request"} | Neither or both of domainId and domain were given, or the name was empty. |
| 400 or 415 | no error field | The body isn't valid JSON, or Content-Type isn't application/json. |
| 401 | no body and no error field | The key is missing or not recognised, including a key for a closed account. |
| 404 | {"error":"domain_not_found"} | The domain isn't in this account, or (with an agent key) it isn't on that agent's origin servers. |
| 409 | {"error":"not_l7","domainId":2051} | The domain exists but Website protection is off, so it has no owner access. |
| 429 | {"error":"rate_limited"} | More than 120 links in a minute for that account and key (or agent). |
A closed account's API key gets 401 here, not 403 or 404. See Closing an account.