Joinotify

Sync a site's contacts

POSThttps://api.joinotify.com/contacts/sync

A connected site's customers, up to 500 per call. It is what the WordPress plugin calls to bring in the site's users, customers and leads — and any custom platform holding a connected site's API key can call it too. The answer is 200 even when rows fail: each row's outcome comes in results, in the order sent.

POST /contacts/batch is a spreadsheet uploaded once. This route is the opposite: a system reporting the same people again and again, so its rules only add, never destroy:

  • a contact is found first by who they are on the site (ref: WordPress user 42), then by phone. Someone who changed their number is still the same contact; if the new number already belongs to another contact, nothing is merged and the row comes back with phone_conflict;
  • with no phone and no link to the site, nobody is created (no_phone, invalid_phone);
  • tags only come in, by name, and missing ones are created. To take one off, use removeTags;
  • names, e-mail and custom fields only fill what is empty: what someone typed in the dashboard wins over what the site reports. The fields the site computes itself (WooCommerce's wc_…) overwrite — unless occurredAt is older than the last one applied for that link (stale_snapshot);
  • an opt-out given on the site always applies. Consent only moves from unknown to opted_in, with evidence, and never over an opt-out (kept_opt_out) or a suppression (kept_suppression);
  • a value for a field the account does not have, or of the wrong type, is dropped and listed in warnings — the rest of the row is applied;
  • new contacts count against the plan's cap (contact_limit_reached).

With options.triggers set to false — the default, what a backfill sends — nothing fires: no flow starts and no contact.created webhook goes out. A backfill of ten thousand customers must not greet ten thousand people. Send true for what just happened on the site.

Idempotency. With the Idempotency-Key header, a batch retried after a dropped connection returns the first result, with Idempotent-Replayed: true, instead of being applied twice. The same key with another body is refused with 422 idempotency_key_reused; while the first request is still running, the repeat gets 409 idempotency_in_progress.

Only a connected site's API key syncs — it comes with the contacts:sync permission. A regular API key gets 404 site_not_found, and an API key limited to some numbers, 403.

Headers

1 optional

stringoptional

An identifier for the operation, chosen by you — 8 to 128 characters from letters, digits, _, -, . and :. Repeating the call with the same value and the same body returns the first answer instead of running again. Valid for 24 hours, per account.

min. 8 charactersmax. 128 characterspattern ^[A-Za-z0-9_.:-]{8,128}$

Body Paramsapplication/json

1 required1 optional

array of objectsrequired

An empty string counts as absent.

up to 500 items

Item 1
objectrequired

Who the person is on the site — the link that finds the same contact even after a change of number.

stringrequired

wp_user: a WordPress user. wc_customer: a WooCommerce customer. wc_guest: a purchase without an account. lead: someone known only by a form or a cart.

Allowed values:wp_userwc_customerwc_guestlead

stringrequired

The person's id on the site. Someone without an account (wc_guest, lead) goes by the sha256 of their e-mail.

min. 1 charactersmax. 191 characters

stringoptional

In any format; it is normalized to E.164. Without the country code, country or options.defaultCountry applies.

max. 40 charactersnullable

stringoptional

Country of the billing address (ISO 3166 alpha-2) — it is how a number typed without its country code is read.

exactly 2 charactersnullable

stringoptional

max. 80 charactersnullable

stringoptional

max. 80 charactersnullable

stringoptional

max. 254 charactersnullable

stringoptional

nullablepattern ^[a-z]{2}(-[A-Z]{2})?$

objectoptional

Custom fields, by key. They only fill what is empty — except the fields the site computes itself, which overwrite.

array of stringsoptional

Names of tags to add. Missing ones are created.

up to 20 items

array of stringsoptional

Names of tags to take off the contact.

up to 20 items

objectoptional

The consent the person gave or withdrew on the site. An opt-out always applies; an opt-in only moves a contact from unknown to opted_in, never over an opt-out or a suppression.

One of these shapes:
stringrequired

Allowed values:opted_in

stringrequired

What the person agreed to and where: the ticked box's text, the order, the site.

min. 3 charactersmax. 500 characters

string<date-time>optional

When the person agreed.

string<date-time>required

When the site read these values — it is what orders two snapshots of the same person.

objectoptional

Responses