API

API response format

One response format for every JSON API call in this site pack, with the status codes, content types and retry rules a client must check before it treats a reply as success.

Staff with an invited workspace can Sign in from the header. This page restates the contract already stated in the API authorization matrix guide and in site.js. It adds no new endpoint and it changes no server reply.

The single envelope for JSON API replies

Every JSON API reply in this pack uses the same envelope. A client that accepts a different shape for one endpoint and the shape below for another will read a failure as a success.

FieldRule for every JSON API reply
Content-Typeapplication/json for a JSON API reply. An HTML reply is not a JSON API success, even when the status is 200.
BodyOne plain JSON object. An array, an empty body, invalid JSON or a truncated reply is not success.
okBoolean. Success is ok exactly true. Failure is ok exactly false. A missing ok field, or an ok value other than true or false, is not success.
errorOn failure, error is a plain sentence telling the person what to do. It carries no survivor name, note text, message content, access code, secret value, account name or email.
fieldErrorsOn a 422 validation failure only, fieldErrors is an array of field and message items, at most 8 items. Each field is a known field on the form that was sent. Each message is cleaned and capped at 200 characters.
Other fieldsOther fields, where an endpoint returns them, are read only as named for that endpoint. No other field on its own makes a reply a success.

Read the API authorization and response matrix

Status codes and content types, read together

Status, final path, content type and the ok value must be read together. A status alone, a body alone or a path alone is not success.

ReplyHow a client reads it
200 to 299Success only when the body is a plain JSON object with ok exactly true and the content type is JSON.
401Sign-in required. For the session check at GET /api/me, this is a distinct not ready result when ok is exactly false. It is not a success and it is not a server error.
403 and 405Forbidden, or method not allowed. The reply is not success. The client keeps entries on the page and shows a plain message.
404Not found for the address asked for. An HTML 404 page is not a JSON API reply and must not be parsed as one.
422Validation failure. Read fieldErrors as above, show the same per-field summary as client validation, and keep entries on the page.
429 and 5xx, timeout, network failure, offline stateNot success. Keep entries on the page, keep the draft where the form keeps one, discard any partial reply, and show a plain message. Do not present a template or a blank field as a completed result.
HTML reply, empty body or reply at another addressNot a JSON API success. For a health or readiness check, an HTML reply, an empty body, a missing ok value or a reply at another address counts as degraded, and no reply counts as not responding.

Addresses that are not JSON API replies

These addresses return a document or an asset. They have no ok envelope. Do not parse a page body as JSON and do not require these checks to respond for liveness.

  • GET /health and GET /health.json for a machine liveness check, where a 200 response is liveness only
  • GET /app/ for the signed-in app shell, which returns HTML
  • GET /theme.css, /site.css, /site.js, /icons/icon.svg, /manifest.webmanifest and /sw.js for site assets and offline support
  • Public pages and guides, which return HTML and are read in the browser with no JavaScript retry

Open the system status check

Timeout, retry and client normalization

Retry rules follow whether a call is a read or a write that creates a request.

CallTimeout, retry and normalization
POST /api/public/request, the only write endpoint in this pack12000 ms timeout, 0 automatic retries, because the call creates a request and a blind retry could create a duplicate. A manual retry reuses the same X-Client-Request-Id header as a deduplication hint only. The form sends page as the current pathname only, capped at 200 characters, and sends no credentials with this call.
Read only checks, including GET /api/me and GET /app/Bounded timeout and a bounded retry count stated on the page that runs the check. Response text is discarded after the status, final path, content type and ok value, where stated, are read. Results describe that check only and state no cause.
Older field error shapes, read onlyThe client in site.js accepts, on read only, the older shapes errors, fieldErrors or fields as an array, and errors or fieldErrors as an object map, and normalizes them to the canonical fieldErrors array above. A server must not emit an older shape as a new reply. Unknown fields are ignored.
  • Success needs the status, the content type and ok exactly true together
  • A failure reply never carries survivor detail, a secret value, an account name or an email
  • Field error messages are cleaned, capped at 200 characters and limited to known fields on the form
  • Retry applies to read only checks only. The write endpoint has 0 automatic retries

Read API access and partner integrations

What this page does not do

Keep these limits in mind before you build a client against this page.

  • This page adds no new endpoint, no new sign-in path, no new role, no new permission and no new tenancy path
  • This page changes no server reply, no sign-in check, no workspace scope and no permission in locked files
  • This page lists no secret, password, token, API key or access code, and no page in this pack lists one
  • Signed-in module route paths and status codes beyond the endpoints named in this pack remain as stated in the API authorization matrix guide

Ask for a demo with sample records

Request a demo and walk through a case, a referral and a grant report in one session.

Request a demo