Skip to content

Contacts

A contact is a person you talk to on WhatsApp. Create and update contacts, tag them, and keep your own fields on them.

Scopes: contacts:read to read, contacts:write to change.

Keep contacts in sync Handle errors and limits

A person you talk to on WhatsApp.

Attributes

id string · uuid

phone string · nullable

The number as + and its digits. null for a contact known only by a WhatsApp username.

whatsapp_user_id string · nullable

The ID WhatsApp gives a contact who uses a WhatsApp username. null if WhatsApp hasn’t given Soosh one.

name string · nullable

The name your business gave the contact, in the app or through the API. null if nobody has. A new WhatsApp profile name never replaces it.

whatsapp_name string · nullable

The contact’s own WhatsApp profile name.

whatsapp_username string · nullable

The contact’s WhatsApp username, without the @, as their messages last gave it. null if they haven’t given one. For a contact known only by a username, it’s the name to show.

attributes object

Your own fields on the contact. Names are 1 to 64 letters, digits or underscores.

A map; each value is a string or number or boolean.

tags array of strings

marketing_opt_out boolean

Whether the contact opted out of marketing messages from every one of your numbers. Your team sets it, or you do through the API or an import.

marketing_opt_out_numbers array of strings

The numbers (by ID, see GET /numbers) the contact opted out of marketing messages from, one by one: by replying STOP to the number, by turning marketing off in WhatsApp, or by your team. A campaign or marketing template from one of these numbers isn’t sent to them; your other numbers still can. Empty when there are none.

number_id string · uuid · nullable

The WhatsApp number the contact is usually messaged from.

chat object

The contact’s chat. last_inbound_at covers any number. The 24-hour window is per number, so don’t work it out from this field.

Show 4 child attributesHide child attributes

chat.status string

One of open closed.

chat.assigned_agent_id string · uuid · nullable

chat.last_message_at string · date-time · nullable

chat.last_inbound_at string · date-time · nullable

created_at string · date-time

updated_at string · date-time

tags_not_added object

Only on the answer to POST /contacts, and only when it happened: the tags new to your workspace that weren’t added because it reached its plan’s tags limit. The contact is saved without them.

Show 2 child attributesHide child attributes

tags_not_added.count integer

How many of the tags you sent weren’t added.

tags_not_added.limit integer

Your workspace’s tags limit.