RotaProxy

Documentation

API Errors

Status codes, error shapes and how to handle each failure.

Error shape

Every failure returns JSON with a stable machine-readable code:

{
  "error": {
    "code": "invalid_key",
    "message": "The API key is missing, revoked or malformed."
  }
}

Branch on code, not on the human message — messages may be reworded.

Catalog

Status Code Meaning What to do
400 bad_request Malformed JSON or parameters. Fix the request shape.
400 missing_proxy_id proxy_id absent on rotate. Include the port id.
401 invalid_key Key missing, revoked or malformed. Check the key; create a new one if needed.
402 insufficient_data No allowance or GB left. Top up or wait for renewal.
404 not_found Unknown path or port id. Verify the URL / proxy_id.
409 missing_authorized_ip Port has no authorized machine IP. Bind the IP on the proxy card first.
405 method_not_allowed Wrong HTTP method. Match the method on the endpoint page.
409 suspended Port suspended. Contact support.
429 rate_limited Too many requests. Back off exponentially; Retry-After header is set.
500 internal_error Our bug, not yours. Retry once, then open a ticket with the timestamp.

Retry guidance

  • Retry 429 and 500 with exponential backoff (1s, 2s, 4s… up to 5 attempts).
  • Never blindly retry 402, 401 or 409 in a loop — fix the account state first.
  • Log the full response body on 5xx; support will ask for it.