Skip to main content

Quickstart

Use sandbox to validate your integration, then move the same request shapes to production credentials and https://api.theary.ai.

1. Configure environment

Your JWT must include the tenant claim configured for your account. See Authentication.

2. Verify connectivity

GET /health requires no authentication:
Expected: HTTP 200 with a JSON health payload. Then confirm your token and tenant claim are accepted against an authenticated endpoint:
A 200 confirms auth is working; a 401 means the token is missing/expired or the tenant claim is invalid (see Authentication).

3. Create an employment order

See Create order — field reference for all required and optional fields. Applicant home address (applicant.addresses) is optional. Set searchTypes[].externalSearchId to your own stable correlation ID. It is echoed back on searches and webhook events and is the key you use to reconcile duplicates — order creation is not idempotent (see Production readiness).

Minimal order (no home address)

Full example (with home address)

Copy this JSON body as-is to the Create order page, or save it as order.json and send it with cURL. It includes aliases, home address, a questionnaire link, employment history with fax, and per-search webhook routing.
Field notes for the pieces beyond the minimal body:
  • searchTypes[].questionnaireUrl / questionnaireAccessCode — direct link and access code for the applicant’s online questionnaire, passed through to outbound verification.
  • applicant.applicantAlias[] — AKA / former names (firstName and lastName required per entry; middleName, suffix optional). See Applicant alias.
  • history.employment[].employerFax — fax contact used when policy allows fax outreach.
  • webhookConfig.closeoutEndpoints — per-search-type routing with optional headers, basicAuth, and events filters; fallbackEndpoint covers anything not matched. See Webhook config.

Education order

Education orders use the same envelope with an EDUCATION search type and history.education records.

Send the request

Save either JSON example above as order.json, then:
Or send the minimal body inline:
Example success response:

4. Track progress

Capture the verificationOrderId from the create response, then poll that order’s searches (this example uses jq to extract the ID):
Use webhooks for production completion events, and use polling as a fallback. See Webhook integration.

Optional: attach a signed release

If you want a signed release PDF attached to outbound verification requests, set applicant.signedReleaseFileUrl using one of these options:
  1. Call Generate upload URL.
  2. PUT the PDF to the returned signedUrl with Content-Type: application/pdf.
  3. Put the returned fileUri in applicant.signedReleaseFileUrl.

Inline base64

Send the PDF as raw base64 or a data:application/pdf;base64,... data URL in applicant.signedReleaseFileUrl. The API uploads it to cloud storage at order creation and stores a gs:// URI on each search. See Applicant schema — Signed release file for validation rules and examples.

Optional: ban a third-party vendor

If a client does not want a search routed to a specific third-party vendor, add thirdPartyBan inside searchConfig.
For multiple vendors, deferral behavior, and the full supported vendor-code list, see Third-party ban.

Production readiness

Before you leave sandbox, confirm your integration handles these cases:
  • Duplicate prevention — Always send a stable externalSearchId per search. If a create call fails without a response, look up by externalSearchId before resending to avoid duplicates.
  • Transient errors and retries — Retry 5xx and network failures with exponential backoff. Do not retry 4xx — fix the request instead. See Errors.
  • Async timing — A 201 means SNH AI accepted the order, not that verification finished. Turnaround depends on employer responsiveness and channel — typical results arrive within hours, though some verifications take longer. Prefer webhooks for completion and use polling only as a fallback. See Webhook integration.
  • Webhook security — Always verify the X-Webhook-Signature header with your shared secret before you process an event. See Webhook integration.
  • SLA and escalation — Searches that cannot finish automatically escalate on organization-configurable timers. See SLA and escalation.
  • BatchingPOST /batches creates each order independently. Record every returned verificationOrderId and track work with individual order endpoints. See Background Check overview.

Next steps