Customers
A customer is the person who receives messages. Customers are subscribed to subscriptions through /links. In the Subscription business pack a customer is, for example, “Hawa Kollie”.
POSTCreate a customer
Requires contacts:write. A name and a way to reach them are enough. A customer needs a phone number or an email address, never neither. Whether this instance takes customers with no phone number at all is its own setting, off unless it was turned on, and not something the API tells you: where it is off, a create with no number comes back 400 — “This organisation does not allow contacts without a phone number. Add a phone number, or allow it in Settings.” Unknown keys inside attributes are refused with 400.
201 with the customer. 400 when the body would leave somebody nobody can reach, in a sentence naming the rule: a number or an address, a reference where there is no number, no WhatsApp number in place of a phone number, email as the preferred channel. 409 conflict if the number is already on file in this instance: find it with ?phone_e164 and update that record instead. 409 if the reference is already on file — “That reference already belongs to someone else on file. Find them with ?external_ref= and update that record instead.”
One customer: the same fields in every pack. Press Response on the sample to see one whole.
On failure the body is { error, code } instead.