Finding someone
GET /v1/contacts?phone=+919876543210 finds the contact who has that number now, or
had it — a number someone moved away from stays theirs, so their history follows them.
q searches names and numbers; tag filters by a tag.
Adding and changing
- A number without a country code is read in your account’s country.
- One number, one contact: adding a number someone already has is refused with
contact_exists, naming them — update them instead. fieldsare checked against the custom fields your account has set up (a number field takes numbers, a date field dates). A key with no field set up is kept as text.- Tags you name that don’t exist yet are made.
PATCH /v1/contacts/{contact_id} changes only what you send. In fields, a null
clears that field and the rest stay. tags replaces their tags. A new phone keeps the
old one as theirs.
Consent
POST /v1/contacts/{contact_id}/consent records that someone must never be contacted
— for good, or until a time — or lifts it:
not_permitted, and calls aren’t placed. It is recorded as given through the API, with
your reason, and shown on their contact page.
Separately, people opt out themselves — replying STOP, or a channel’s own opt-out — and
OMNI honours it on that channel or everywhere, as they asked. consent.opted_out_at in a
contact shows when.
Their quiet hours hold messages until the hours end; their time zone decides when
that is.