The contact resource
A contact is one record in your directory — phone, email, name, tags, consent, plus your own data layered on top. Custom-field values ride on the contact as thecustom_fields object: set them on a contact and they come back inline on
every contact response — create, read, list — with no separate lookup.
Custom-field keys and their types are defined under
/api/v1/custom-fields. Write a value with
PUT /api/v1/custom-fields/values
and read it back on the contact’s custom_fields object. Every response on
this page follows the same envelope — data plus a meta block carrying
request_id, timestamp, and, on list responses, pagination — so the
examples below hold for every endpoint here.
Errors follow Devotel Orbit’s { error, meta } envelope, shown once under
Error envelope.
Worked sequence: create, set custom fields, read back
The run-through every integration does first: create the contact, attach your own data, then pull the contact back and see the values inline.1. Create the contact
POST /api/v1/contacts/phone or email is required. Send phone numbers in E.164
(+14155551234); display formats are normalized to E.164 before insert.
Request
custom_fields object until you set values.
2. Set custom-field values
PUT /api/v1/custom-fields/valueskey must match a custom-field definition you already
created, and the value must match that definition’s type — values of the wrong
type are rejected.
Request
3. Read back — values inline
GET /api/v1/contacts/{id}Worked sequence: list with filters, then paginate
GET /api/v1/contacts/tags=vip,
country_code=US — search narrows by name, phone, or email. The response is
cursor-paginated: while meta.pagination.has_more is true, pass
meta.pagination.cursor back as the cursor query parameter to fetch the
next page. Here the list is filtered to one tag.
Request
has_more is true, so request the next page:
has_more comes back false.
Error envelope
Validation failures return422 with a VALIDATION_ERROR code. The classic
case is a phone value that fails the format and length checks — below the
E.164 floor or not recognizable:
422
+) and retry. A missing-or-unknown
custom-field key on PUT /custom-fields/values surfaces the same envelope
with a four-hundred status, so handle both before you code a special case.
GDPR erasure — from request to confirmed status
Erasure is a tenant-owned control: you file it, Orbit executes it and keeps the audit chain. The generated reference section forDELETE /api/v1/contacts/{id}/gdpr/delete documents the synchronous
cascade but stops at 204 No Content — nothing there tells you how to
confirm the deletion you just ran, or how to read the pending/completed
status on the cancellable flow. This section closes that gap.
The immediate delete answers 204; the status lives one call away
DELETE /api/v1/contacts/{id}/gdpr/deleteid returns
404. The probe pair: mint the re-auth challenge, delete, then confirm.
Step 1 — mint the re-auth challenge
200
X-Reauth-Challenge, the delete returns
401 and erases nothing:
401 Error
The cancellable erasure request returns a full status envelope
POST /api/v1/contacts/{id}/gdpr/erasure-request202 with the full
request — so you always know whether the deletion is still pending,
executing, completed, or cancellable:
status moves pending → executing → executed once the scheduled
worker hard-deletes the contact past cooling_off_ends_at (a failed run
leaves failure_reason and retries up to its attempt cap; a cancelled
request records cancelled_at and never executes). To cancel while it is
still pending, pass the request id to
POST /:id/gdpr/erasure-request/:requestId/cancel.
Poll the status on the per-contact list endpoint — the object above under
data.items:
200
Duplicate detection and merge review
Two endpoints handle duplicate detection: a cheap aggregate count for banner surfaces and pre-merge checks, and the full group list you fetch when you open the merge workflow.GET /api/v1/contacts/duplicates/countextras — the number of contacts that would be merged away — plus
hasMore indicating whether duplicates exist beyond the slice the count scanned.
Use it for banner headlines and pre-merge checks.
exact (default) or fuzzy. exact is the right choice for banner counts;
fuzzy mirrors the detection pass the merge endpoint uses.Per-strategy group cap, default
100, range 1–200. Raise it when
hasMore returns true and you need to scan deeper before reporting
“0 duplicates.”GET /duplicates to fetch the full group list (with per-group contact
records) when you actually render the merge review UI — fetching it just for a
banner paints the contacts page with data you don’t read.
Response envelopes for the generated shells
The operations below return real bodies that the generated sections render as the empty placeholder shell. Each block ships the envelope the handler actually sends — request line first, then the 200/201 body — so you can code against the fields your integration branches on. Cursor-paginated responses carrymeta.pagination (as on the list example above); a one-line callout marks each
of them and every 204-style empty body.
Reads — profile, preview, scores, health, engagement, timeline
1. Lightweight contact preview
GET /api/v1/contacts/{id}/preview2. Customer 360 profile
GET /api/v1/contacts/{id}/profiletimeline slice is cursor-paginated via limit + next_cursor; every other
slice returns in full. score is null until the nightly scoring run has seeded
the contact.
3. Predictive scores
GET /api/v1/contacts/{id}/scoresscored: false, all score fields null, and a message explaining when
the first score lands.
4. Deliverability health for one contact
GET /api/v1/contacts/{id}/deliverability-healthraw is the deliverability blend before consent is considered; sendableScore,
blockReason, and label are the consent-suppression overlay verdict. The pair
lets you render “healthy 0.92, blocked by opt-out” without conflating the two
questions.
5. Engagement profile
GET /api/v1/contacts/{id}/engagementprofile is null until the profiler has seen five events; counters still
returns zeroed figures so you can judge whether smart-send timing has enough
signal yet.
6. Unified contact timeline
GET /api/v1/contacts/{id}/timelinenext_cursor back as cursor while has_more is true.
Item ids are composite <type>:<source-id> and stable across calls; filter with
channels[] (sms, email, call, ticket, event).
7. GDPR erasure requests for a contact
GET /api/v1/contacts/{id}/gdpr/erasure-requestspending → executing → executed, plus
cancelled / failed) is documented in the GDPR section above; pass the row’s
id to the cancel endpoint below while it is still pending.
8. Pre-erasure data-impact preview
GET /api/v1/contacts/{id}/gdpr/previewcounts keys are the categories the cascade erases; total_records is their
sum. 404 when the contact does not exist in the tenant.
9. Blocked contacts
GET /api/v1/contacts/blockedblocked_at / blocked_reason audit pair; the list is the reconciliation
surface for POST /{id}/block and POST /{id}/unblock.
10. Duplicate count
GET /api/v1/contacts/duplicates/countextras counts contacts that would be merged away; hasMore says whether more
duplicate groups exist beyond the capped scan. See the duplicate-detection
section above for strategy guidance.
11. One segment
GET /api/v1/contacts/segments/{id}contact_count is the cached audience size from the last refresh tick; the
estimate and evaluate endpoints below give live numbers. 404 when the id does
not exist.
12. Segment deliverability health
GET /api/v1/contacts/segments/{id}/deliverability-healthoverallHealth is the raw deliverability blend over the cohort;
sendableHealth is the same blend after the consent-suppression overlay — the
honest “78–88% reachable, rest consent-blocked” split for the segment card.
truncated turns true when the cohort slice hits the member cap.
13. Segment totals
GET /api/v1/contacts/segments/statsGET /segments rows, which understates totals once a tenant has more than one
page. membersCapped is true when any segment’s member count hit the counting
cap.
Writes — consent, GDPR chain, notes, tags, blocks, bulk, opt-outs
14. Record consent
POST /api/v1/contacts/{id}/consent15. Read back the consent records
GET /api/v1/contacts/{id}/consent16. GDPR re-auth challenge
POST /api/v1/contacts/{id}/gdpr/delete/challengeX-Reauth-Challenge, DELETE /{id}/gdpr/delete
answers 401 REAUTH_REQUIRED and erases nothing.
17. Cancel a pending erasure request
POST /api/v1/contacts/{id}/gdpr/erasure-request/{requestId}/cancelexecuting or executed, cancel answers 409
CONFLICT — the cooling-off window is the only cancellable phase.
18. Export personal data (DSAR)
POST /api/v1/contacts/{id}/gdpr/exportinclude_messages=true the body collapses to contact +
exported_at only. Every call is audit-logged.
19. Create a note
POST /api/v1/contacts/{id}/notes20. Add tags
POST /api/v1/contacts/{id}/tags21. Remove one tag
DELETE /api/v1/contacts/{id}/tags/{tag}22. Unblock a contact
POST /api/v1/contacts/{id}/unblockPOST /{id}/block is the inverse and mirrors the
audit pair (contact.blocked / contact.unblocked).
23. Bulk create contacts
POST /api/v1/contacts/bulkjob_id set); poll
GET /contacts/import-jobs/{id} for progress. Dedup hits count under skipped.
24. Ad-hoc blast to a contact selection
POST /api/v1/contacts/bulk/send25. Opt a contact out of a channel
POST /api/v1/contacts/optoutsdata is the contact with the suppression applied plus
already_opted_out; a repeat opt-out answers 200 (not 201) with
already_opted_out: true so your UI can toast “already opted out” distinctly.
26. Re-opt a contact in for a channel
DELETE /api/v1/contacts/optouts/{id}/{channel}data is the contact record with the
suppression cleared.
27. Bulk contact actions
POST /api/v1/contacts/actionsaction is one of tag, untag, stage_change, delete, add_to_list;
failed lists the ids that did not apply and partial flips true when it is
non-empty.
28. Estimate a segment definition
POST /api/v1/contacts/segments/estimatePOST /segments.
29. Create a segment
POST /api/v1/contacts/segmentsin_segment / not_in_segment references answer 400 before any row is
written, so a typo can never create a segment that silently matches zero
contacts.
Typed-SDK writes — segments, bulk actions, DSAR export
The generated tabs above ship these writes as raw HTTP. Both official SDKs reach the same routes — Node wraps segments onorbit.contacts.segments.*
(list, create, get, iter) and exposes orbit.request(...) for the
rest; Python wraps the core contact surface on client.contacts.* and uses
client.request(...) for routes below it. Where a typed method exists, these
samples are the ones to copy.
30. Create a segment with the typed SDKs
POST /api/v1/contacts/segmentsdata is the
stored segment row with contact_count live immediately.
31. Read a segment’s members
GET /api/v1/contacts/segments/{id}/memberslimit identical across pages and stop when has_more is false.
32. Bulk tag and segment actions
POST /api/v1/contacts/actionsaffected, failed, and
partial. action also takes untag, stage_change, delete, and
add_to_list; add_to_list is how a bulk action applies a segment.
33. Export personal data (DSAR) from the SDKs
POST /api/v1/contacts/{id}/gdpr/exportcontact, messages when requested, and
exported_at. Without include_messages=true it collapses to contact +
exported_at.
Worked sequence: build a segment and read its members
The full loop in one pass, ported from the API recipes guide in typed-SDK form: create the segment, then page its membership for the contacts behind it. Create the segment201 returns the stored row — data.contact_count is live immediately,
not a scheduler estimate.
Read its members
meta.pagination.cursor back as cursor while has_more is true; keep
limit identical across pages. To preview the audience size before creating
anything, run the filter through POST /segments/estimate (item 28) first.