Contacts API

Profiles, custom attributes, consent and opt-outs. 9 ops: list_contacts, get_contact, upsert_contact, delete_contact, record_consent, set_contact_opt_out, track_contact_event, import_contacts, export_contacts.

Profiles, custom attributes, consent and opt-outs.

List contacts · POST /api/v1/list_contacts · scope contacts:read or GET …?input=

Contacts, newest first: search q (name, phone digits, email), filter by tag or by segment (a segment id or builtin:<name>). Returns contacts and total.

curl -X POST https://getwabi.dev/api/v1/list_contacts \  -H "Authorization: Bearer wabi_…"

Get a contact · POST /api/v1/get_contact · scope contacts:read or GET …?input=

A contact's profile by id, wa_id or external_id: identity, attributes, language, timezone, and the separate states (messaging: free_form / template_only / blocked with the window; consent per purpose; engagement; support; campaign eligibility), consent history, conversations and recent business events.

curl -X POST https://getwabi.dev/api/v1/get_contact \  -H "Authorization: Bearer wabi_…"

Create or update a contact · POST /api/v1/upsert_contact · scope contacts:write

Finds the contact by wa_id (phone), external_id or email and updates it, or creates it. Attributes merge (null removes a key); tags replace the list. Use it to sync customers from your CRM or app. Returns the contact and whether it was created.

curl -X POST https://getwabi.dev/api/v1/upsert_contact \  -H "Authorization: Bearer wabi_…"

delete_contact

writeowner or admin

Delete a contact · POST /api/v1/delete_contact · scope contacts:write

Removes a contact from lists, segments and campaigns (a data subject request). Their message history stays for your records. Admins only.

curl -X POST https://getwabi.dev/api/v1/delete_contact \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"contact":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Opt a contact out or back in · POST /api/v1/set_contact_opt_out · scope contacts:write

opted_out true: nothing more is sent to this contact (every purpose they granted is revoked), as when they reply STOP. false: they may receive messages again (as when they reply START); marketing still needs fresh consent. Emits contact.opted_out / contact.opted_in.

curl -X POST https://getwabi.dev/api/v1/set_contact_opt_out \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"opted_out":false}'

Track a business event · POST /api/v1/track_contact_event · scope contacts:write

Records something that happened to a customer in your business (booking_created, payment_failed, order.shipped…), for segments (event.<name> counts) and automations. Creates the contact when wa_id is new. Pass idempotency_key to record an event once. Returns the event id.

curl -X POST https://getwabi.dev/api/v1/track_contact_event \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"name":"Support"}'

Import contacts (CSV) · POST /api/v1/import_contacts · scope contacts:write

Imports up to 5000 contacts from CSV text. Columns: wa_id or phone (international format), name, email, locale, timezone, external_id, tags (; separated), opted_out (yes/no), consent_<purpose> (yes/no), and any other column becomes an attribute. consent applies one consent record (purpose, status, evidence: where and when it was collected) to every row without its own consent column. dry_run counts what would happen. Returns created, updated, skipped, consents recorded and per-row errors.

curl -X POST https://getwabi.dev/api/v1/import_contacts \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"csv":"csv"}'

Export contacts (CSV) · POST /api/v1/export_contacts · scope contacts:read or GET …?input=

Exports contacts as CSV (or JSON rows): all of them or one segment's members, with attributes, tags, opt-out and each consent purpose's state. From the API, MCP and CLI this needs the Scale plan (data export API); the dashboard exports on every plan.

curl -X POST https://getwabi.dev/api/v1/export_contacts \  -H "Authorization: Bearer wabi_…"