ROASFormDocs
API

Errors

One error shape, and the codes every endpoint can answer.

Every error has the same shape. code is for your code, message is for people and names the field when one is wrong.

{
  "error": {
    "code": "policyNotRegistered",
    "message": "The privacy policy URL or version is not the one registered for this subaccount when consent was given.",
    "requestId": "9d2f4c7a-1b3e-4a8c-9e5f-2c7d8b1a6e03"
  }
}

requestId is also in the ROASForm-Request-Id header. A refused call (4xx) is never charged. In the rare case of a 500 after the check was charged, retry with the same Idempotency-Key to get that check.

Codes every endpoint can answer

StatusCodeMeaning
400invalidRequestA field is missing or malformed, the body is not JSON, Idempotency-Key is missing, or ROASForm-Version isn't a version.
400apiVersionRetiredThe API version is retired: the key is pinned to it, or ROASForm-Version names it. Switch the key's version on the API page.
401invalidKeyThe key is wrong, malformed or was deleted.
403missingPermissionThe key does not have the permission this call needs.
403apiNotEnabledThe API is not enabled for this account.
403browserRequestRefusedThe call came from a browser. Call from your server.
409idempotencyConflictThe Idempotency-Key was already used with a different body.
429rateLimitedToo many calls. Wait for the seconds in the Retry-After header.
500internalErrorSomething went wrong on our side. Quote the request id to support.

An unknown path answers 404 and a method the path doesn't take answers 405, without this error shape.

Every call made with one of your keys, refused ones included, shows for 90 days in the dashboard on the API page, under Logs, with its request id, what your server sent and what we answered. Three things read [not stored] there: a check's result, which you find in X-Ray History; the details of a person who opted out; and any field the API does not define, so send only the documented ones. A call's request is removed from Logs when you delete that contact, or when the person opts out. Calls with an unknown key, and calls refused because they came from a browser, can't be tied to your account, so they don't show.

Product codes

Each product adds its own codes, listed with its endpoints: