Step 1: Read the envelope of a missing resource
Request a document that does not exist:Request
Response
type is machine-readable — branch on it rather than on the message, which is human-readable and may be reworded. New types appear over time, so handle a type your code does not know by its HTTP status. Quote the requestId when contacting support; it identifies this exact request in Circularo’s logs.
The part of the type before the colon is a namespace — a domain one such as DOCUMENT, or the generic RESOURCE where no dedicated one applies, so a missing transaction reports RESOURCE:NOT_FOUND. For documents, folders, groups and metadata definitions you cannot see, the answer is 404, exactly as if they did not exist; 403 means you are not allowed to do this — a missing permission, an operation reserved for administrators, or something you can see but may not change. Files are the exception: an inaccessible file answers 403.
Step 2: Read the envelope of an invalid request
Send a request that fails validation:Request
Response
4xx with a validation type means your request needs fixing before a retry makes sense, while a 404 may just mean “not yet” or “no longer”. Server-side failures (5xx) and throttling (429, after its Retry-After) are the classes worth retrying — see Retry requests safely for doing that safely.
When the request does not match the operation’s schema, as here, the envelope also lists every problem in details.errors — the part of the request it was found in (location: body, query, path or headers), the property’s path and a message — so your code can point at the exact value to fix. A request that is well-formed but breaks a rule spanning several values, such as a field placed beyond the document’s last page, is described by the message alone.
Two statuses can answer any call, whichever statuses its endpoint lists, because they concern your account rather than the request: 402 when the subscription your account is covered by is not active, and 428 when the account has not been activated yet — someone first has to activate it. Retrying does not help until the cause is resolved. An operation that consumes your subscription’s capacity — such as creating documents, transactions or members, sealing or sending an SMS — also answers 402 when that capacity is used up.
When you exceed the rate limit, the envelope arrives with status
429 and a Retry-After header telling you how many seconds to wait before retrying.Complete example
One wrapper that turns every failure into the same typed error, as a Node.js script. Everything above it in your integration can then branch ontype, and on status for a type it does not know.
Next steps
- Retry the failures worth retrying, without creating duplicates — Retry requests safely.
- Handle the
412that guards a concurrent write — Guard concurrent writes. - The statuses specific to each endpoint are listed in the API reference.