Skip to main content

Contact messages

A contact message shares one or more contact cards. The user can save each contact to their address book or start a chat with it directly.

To receive contact cards from users, see WhatsApp inbound.

Contact message

Contacts array​

Add a contacts item to richContent.conversation. Each element of the array is one contact card.

FieldTypeRequiredDescription
nameobjectYesName of the contact. See Name.
phonesarrayNoPhone numbers of the contact.
emailsarrayNoEmail addresses of the contact.
addressesarrayNoPostal addresses of the contact.
orgobjectNoOrganisation details of the contact.
urlsarrayNoWebsites of the contact.
birthdaystringNoBirthday in YYYY-MM-DD format.

Name​

Required name fields

formatted_name is required, and at least one of first_name, last_name, middle_name, prefix or suffix.

FieldDescription
formatted_nameFull name as displayed in WhatsApp.
first_nameFirst name.
last_nameLast name.
middle_nameMiddle name.
prefixName prefix, for example Dr.
suffixName suffix, for example Jr.

Other objects​

ObjectFields
phones[]phone, type (for example WORK, HOME, MOBILE)
emails[]email, type (for example WORK, HOME)
addresses[]street, city, zip, country, country_code, type
orgcompany, department, title
urls[]url, type (for example WORK, HOME)

Example​

Contact message
{
"messages": {
"authentication": {
"productToken": "YOUR_PRODUCT_TOKEN"
},
"msg": [
{
"from": "00316098765432",
"to": [
{ "number": "00316012345678" }
],
"body": {
"type": "auto",
"content": "Fallback text"
},
"allowedChannels": ["WhatsApp"],
"richContent": {
"conversation": [
{
"contacts": [
{
"name": {
"formatted_name": "CM.com HQ",
"first_name": "CM.com",
"last_name": "HQ"
},
"phones": [
{ "phone": "+31 76 123 4567", "type": "WORK" }
],
"emails": [
{ "email": "[email protected]", "type": "WORK" }
],
"addresses": [
{
"street": "Konijnenberg 30",
"city": "Breda",
"zip": "4825 BD",
"country": "Netherlands",
"country_code": "NL",
"type": "WORK"
}
],
"org": {
"company": "CM.com",
"department": "Development",
"title": "Developer"
},
"urls": [
{ "url": "https://www.cm.com", "type": "WORK" }
],
"birthday": "2000-01-01"
}
]
}
]
}
}
]
}
}