WAMANAGER

Search Documentation

Search through pages and content

Contact Message

Contact Message

Example of a contact message on WhatsApp

Contact messages allow you to share a person’s contact details, such as name, phone number, and organization, directly within WhatsApp. When sent, the recipient can easily save or message the shared contact.

cURL
curl -X POST '<BASE_URL>/api/whatsapp/contact' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '{
  "recipients": ["<WHATSAPP_USER_PHONE_NUMBER>"],

  // πŸ‘₯ Contact details list β€” supports up to 257 contacts
  "contact_details": [
    {
      "addresses": [
        {
          "street": "1 Lucky Shrub Way",
          "city": "Menlo Park",
          "state": "CA",
          "zip": "94025",
          "country": "United States",
          "country_code": "US",
          "type": "Office"
        },
        {
          "street": "1 Hacker Way",
          "city": "Menlo Park",
          "state": "CA",
          "zip": "94025",
          "country": "United States",
          "country_code": "US",
          "type": "Pop-Up"
        }
        
         // βž• Additional addresses objects go here, if using 
      ],
      "birthday": "1999-01-23",
      "emails": [
        { "email": "[email protected]", "type": "Work" },
        { "email": "[email protected]", "type": "Work (old)" }
        
        // βž• Additional emails objects go here, if using 
      ],
      "name": {
        "formatted_name": "Barbara J. Johnson",
        "first_name": "Barbara",
        "last_name": "Johnson",
        "middle_name": "Joana",
        "suffix": "Esq.",
        "prefix": "Dr."
      },
      "org": {
        "company": "Lucky Shrub",
        "department": "Legal",
        "title": "Lead Counsel"
      },
      "phones": [
        { "phone": "+16505559999", "type": "Landline", "wa_id": "16505559999" },
        { "phone": "+19175559999", "type": "Mobile", "wa_id": "19175559999" }
        
        // βž• Additional phones objects go here, if using
      ],
      "urls": [
        { "url": "https://www.luckyshrub.com", "type": "Company" },
        { "url": "https://www.facebook.com/luckyshrubplants", "type": "Company (FB)" }
        
        // βž• Additional URLs go here, if using
      ]
    }

    // βž• Add as many contacts as you want (up to 257)
  ]
}'

Button behavior

If you include the contact's WhatsApp ID in the message (via the wa_id property), the message will include a Message and a Save contact button:

Contact Message

Example of a contact message ans save contact button on WhatsApp

If the WhatsApp user taps the Message button, it will open a new message with the contact. If the user taps the Save contact button, they will be given the option to save the contact as a new contact, or to update an existing contact.

If you omit the wa_id property, both buttons will be replaced with an Invite to WhatsApp button:

Contact Message

Example of a contact invite to whatsapp button on WhatsApp

Parameters

ParameterTypeDescriptionExample
ACCESS_TOKENString
Required
Whatsapp external api authorization token provided by business account.
ERYHCDIRMWORYFFEXESJDKR6SAZABA
RECIPIENTSArray
Required
Array of WhatsApp user phone numbers with country code.
["<WHATSAPP_USER_PHONE_NUMBER>"]
BIRTHDAYString
Optional
Contact's birthday. Must be in YYYY-MM-DD format.
1999-01-23
CITYString
Optional
City where the contact resides.
Menlo Park
COMPANY_OR_ORG_NAMEString
Optional
Name of the company where the contact works.
Lucky Shrub
COUNTRY_CODEString
Optional
ISO two-letter country code.
US
COUNTRY_NAMEString
Optional
Country name.
United States
DEPARTMENT_NAMEString
Optional
Department within the company.
Legal
EMAIL_ADDRESSString
Optional
Email address of the contact.
EMAIL_TYPEString
Optional
Type of email, such as personal or work
Work
FIRST_NAMEString
Optional
Contact's first name.
Barbara
FORMATTED_NAMEString
Required
Contact's formatted name. This will appear in the message alongside the profile arrow button.
Barbara J. Johnson
JOB_TITLEString
Optional
Contact's job title.
Lead Counsel
LAST_NAMEString
Optional
Contact's last name.
Johnson
MIDDLE_NAMEString
Optional
Contact's middle name.
Joana
PHONE_NUMBERString
Optional
WhatsApp user phone number.
+16505559999
PHONE_NUMBER_TYPEString
Optional
Type of phone number. For example, cell, mobile, main, iPhone, home, work, etc.
Home
PREFIXString
Optional
Prefix for the contact's name, such as Mr., Ms., Dr., etc.
Dr.
STATE_CODEString
Optional
Two-letter state code.
CA
STREET_NUMBER_AND_NAMEString
Optional
Street address of the contact.
1 Lucky Shrub Way
SUFFIXString
Optional
Suffix for the contact's name, if applicable.
Esq.
WEBSITE_TYPEString
Optional
Type of website. For example, company, work, personal, Facebook Page, Instagram, etc.
Company
WEBSITE_URLString
Optional
Website URL associated with the contact or their company.
https://www.luckyshrub.com
WHATSAPP_USER_IDString
Optional
WhatsApp user ID. If omitted, the message will display an Invite to WhatsApp button instead of the standard buttons.
19175559999
ZIP_CODEString
Optional
Postal or ZIP code.
94025