> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Contact Message

> Share one or more contact cards with a WhatsApp recipient.

Share one or more contact cards containing details such as a person's name, phone numbers, email addresses, postal addresses, organisation, and URLs.

## Endpoint

POST `/api/whatsapp/{Sender Hash}/messages`

**Sandbox base URL:** `https://testqa.cpaas.globeteleservices.com`

Replace `{Sender Hash}` with the registered sender hash from the WhatsApp channel's **Numbers** section in the CPaaS+ Portal.

## Headers

Include the following headers in the request.

| Header | Value |
| - | - |
| `Accept` | `application/json` |
| `Content-Type` | `application/json` |
| `Authorization` | `Bearer <token>` |

Generate the Bearer token from the **API** tab in the CPaaS+ Portal.

## Request parameters

| Parameter | Required | Description |
| - | - | - |
| `messaging_product` | Yes | Set to `"whatsapp"`. |
| `to` | Yes | Recipient's WhatsApp number in international format, without a leading `+`. |
| `type` | Yes | Set to `"contacts"`. |
| `contacts[].name` | Yes | Contact name object containing `formatted_name` and supported name fields. |
| `contacts[].phones` | No | Array of phone objects containing `phone`, `type`, and optionally `wa_id`. |
| `contacts[].emails` | No | Array of email objects containing `email` and `type`. |
| `contacts[].addresses` | No | Array of address objects containing `street`, `city`, `state`, `zip`, `country`, and `type`. The example also includes `country_code`. |
| `contacts[].org` | No | Organisation object containing `company`, `department`, and `title`. |
| `contacts[].urls` | No | Array of URL objects containing `url` and `type`. |

The `contacts[].name` object supports the following fields:

* `formatted_name`
* `first_name`
* `last_name`
* `middle_name`
* `prefix`
* `suffix`

## Request example

The following example shares a contact card with name, phone, email, address, organisation, and URL details.

```json theme={null}
{
  "messaging_product": "whatsapp",
  "to": "919373084880",
  "type": "contacts",
  "contacts": [
    {
      "name": {
        "formatted_name": "Barbara Johnson",
        "first_name": "Barbara",
        "last_name": "Johnson",
        "middle_name": "Joana",
        "prefix": "Dr.",
        "suffix": "Esq."
      },
      "phones": [
        {
          "phone": "+16505559999",
          "type": "Landline"
        },
        {
          "phone": "+19175559999",
          "type": "Mobile",
          "wa_id": "19175559999"
        }
      ],
      "emails": [
        {
          "email": "bjohnson@luckyshrub.com",
          "type": "Work"
        }
      ],
      "addresses": [
        {
          "street": "1 Lucky Shrub Way",
          "city": "Menlo Park",
          "state": "CA",
          "zip": "94025",
          "country": "United States",
          "country_code": "US",
          "type": "Office"
        }
      ],
      "org": {
        "company": "Lucky Shrub",
        "department": "Legal",
        "title": "Lead Counsel"
      },
      "urls": [
        {
          "url": "https://www.luckyshrub.com",
          "type": "Company"
        }
      ]
    }
  ]
}
```

Replace the example recipient number and contact details with values for your integration. The top-level `to` value does not include a leading `+`; phone numbers inside the contact card follow the format shown in the example.

## Responses and errors

See [Common HTTP Status Codes](/docs/status-codes.md) for documented status meanings and possible causes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.