Quickstart
Create a candidate, poll for the outcome, and download the compliance pack — end to end.
This walkthrough takes one candidate from creation to a downloaded compliance pack, without sending a real WhatsApp message until step 5 — when you choose to.
- 1
Get an API key
In the Onboardly dashboard, go to /settings/integrations →
API keys (inbound)→Create key. Copy the value from the one-time reveal panel — it is never shown again. You may hold up to 5 active keys at once.Export it once, use it in every sample belowexport ONB_KEY="onb_live_…" - 2
Create a candidate without sending anything
Create with
start: false— this seeds the candidate and their document checklist without messaging them.Shellcurl -X POST \"https://rca-onboardly.com/api/v1/candidates" \-H "X-Api-Key: $ONB_KEY" \-H "Idempotency-Key: ats-record-4471" \-H "Content-Type: application/json" \-d '{"first_name":"Jordan","last_name":"Ellis","email":"jordan.ellis@example.com","mobile_number":"+447700900321","opt_in":true,"opt_in_source":"ats_import","opt_in_at":"2026-09-01T09:00:00Z","start":false}'Expect: 201,
documentsSeeded/referencesSeededreflect what you sent,outboundis ABSENT. The candidate now shows in your dashboard, awaiting consent. - 3
Replay is safe
Send the exact same request again (same
Idempotency-Key) — nothing new is created.Expect: 200
{ "data": { "id": "…", "replayed": true }, "error": null }. - 4
Read the candidate back
GET /candidates/{id}using theidfrom step 2.Expect:
external_idechoesats-record-4471;documentsare allpending;compliance_pack.readyisfalse. - 5
Send the real opener (optional, needs a handset you control)
Create a SECOND candidate — a new record, a new
Idempotency-Key— withstart: trueand a phone number that is not already on your account.Expect: 201 with
"outbound": "sent". WhatsApp is only ever sent on the literaltrue. - 6
Make corrections as they come in
Use
PATCH /candidates/{id}for a profile fix,POST /candidates/{id}/documentsto add a checklist item you forgot, orPATCH /candidates/{id}/outreachto change how hard this one candidate is chased. - 7
Poll for completion
Every 15–30 minutes,
GET /candidates/{id}and checkcompliance_pack.ready(andreference_requirements.outstanding === 0if references matter to you). - 8
Fetch the evidence
Follow each accepted document’s
content_url, then download the pack.Shellcurl "https://rca-onboardly.com/api/v1/candidates/{id}/pack" -H "X-Api-Key: $ONB_KEY" -H "Accept: application/zip" -o compliance-pack.zipExpect: 409 with
meta.blockersuntil every required document is accepted — keep polling rather than retrying blindly.