Update a contact
PATCH /v1/contacts/{id}
Changes the fields you send and leaves the others alone.
Needs contacts:write.
Path parameters
Section titled “Path parameters”id string · uuid
The contact’s ID.
name string
The name your business gives the contact. An empty string takes it off, and the WhatsApp profile name shows again.
Up to 255 characters.
attributes object
Merged into the contact’s attributes. A key you send replaces its value, and a null value removes the key. Names and values follow the same rules as when you create a contact. The result can have at most 50.
A map; each value is a string or number or boolean.
number_id string · uuid
The number to message the contact from, from GET /v1/numbers.
marketing_opt_out boolean
true if the contact opted out of marketing messages from every one of your numbers, false if they opted back in. Their opt-outs from single numbers (marketing_opt_out_numbers) stay as they are.
marketing_opt_out_numbers array of strings
The numbers (IDs from GET /v1/numbers) the contact opted out of marketing messages from, one by one. The list replaces the one they have: a number you leave out is opted back in. Send [] to opt them back in to every number they opted out of one by one.
Changing tags
Section titled “Changing tags”Tags have their own endpoints: PUT /v1/contacts/{id}/tags/{tag} and DELETE /v1/contacts/{id}/tags/{tag}.
Webhooks
Section titled “Webhooks”contact.updated is sent only if something changed.
Returns
Section titled “Returns”200 The contact object. The contact as it is now.
Errors
Section titled “Errors”Besides the ones every request can get:
invalid_fieldA field breaks a rule, such as an attribute name with a space, more than 50 attributes, or a number in marketing_opt_out_numbers that isn’t in your workspace.