Reference

Errors

Every error returns a JSON body with a stable shape. Inspect the HTTP status code first, then branch on error.code.

Error envelope

error response
{
  "error": {
    "code": "invalid_request",
    "message": "business_name: Required"
  }
}

Codes returned today

StatusCodeCause
400invalid_requestMalformed JSON body, missing required field, or value failed validation (e.g. state is not 2 letters).
401unauthorizedMissing Authorization header, malformed token, or key not found / revoked.
404not_foundResource (e.g. /business/{id}) does not exist. Note: a /verify call with no match returns 200 with status: 'not_found' — not a 404.
429quota_exceededMonthly verification quota exceeded for this account. Upgrade the plan or wait until the next billing period. Overages are not enabled.
500internal_errorUnhandled server-side failure. Safe to retry with exponential backoff.

This is the complete list of error codes the API emits today.

Retry strategy

  • 4xx — do not retry without changing the request.
  • 500 internal_error — retry with exponential backoff (e.g. 1s, 2s, 4s, 8s).
  • Network timeouts — retry idempotent calls (/search, /business/{id}, /verify) safely; all are read-only and side-effect free.

Handling example

javascript
const res = await fetch(url, { headers, method, body });

if (!res.ok) {
  const { error } = await res.json();
  switch (error.code) {
    case "unauthorized":
      throw new Error("Rotate or check TRUSTREGISTRY_KEY");
    case "invalid_request":
      throw new Error(`Bad input: ${error.message}`);
    case "internal_error":
      // retry with backoff
      break;
    default:
      throw new Error(`${error.code}: ${error.message}`);
  }
}