Skip to content

WhatsApp Contacts

Access and query the WhatsApp contacts associated with your connected session.

List Contacts

GET /v1/whatsapp/contacts

Returns the synced contact list for a session, including profile pictures where available.

Query Parameters

ParameterTypeRequiredDescription
session_idstringYesThe session whose contacts to retrieve.
pageintegerNoPage number (default: 1).
per_pageintegerNoResults per page (default: 25, max: 100).
bash
curl "https://sendapi.co/v1/whatsapp/contacts?session_id=sess_01H8BKF...Z2T" \
  -H "Authorization: Bearer sk_live_123456789"
javascript
const contacts = await client.whatsapp.contacts.list({
  session_id: 'sess_01H8BKF...Z2T'
});
python
contacts = client.whatsapp.contacts.list(session_id="sess_01H8BKF...Z2T")

Response

json
{
  "data": [
    {
      "phone": "+447700900000",
      "name": "Alice Smith",
      "profile_picture_url": "https://pps.whatsapp.net/v/t61.24694-24/...",
      "is_whatsapp_user": true
    }
  ],
  "meta": { "total": 128, "page": 1, "per_page": 25 }
}

Check WhatsApp Registration

GET /v1/whatsapp/contacts/{phone}/check

Check whether a phone number is registered on WhatsApp. Useful for validating recipients before sending messages.

Path Parameters

ParameterTypeRequiredDescription
phonestringYesPhone number in E.164 format (e.g., +447700900000).

Query Parameters

ParameterTypeRequiredDescription
session_idstringYesThe session to use for the lookup.
bash
curl "https://sendapi.co/v1/whatsapp/contacts/+447700900000/check?session_id=sess_01H8BKF...Z2T" \
  -H "Authorization: Bearer sk_live_123456789"
javascript
const result = await client.whatsapp.contacts.check('+447700900000', {
  session_id: 'sess_01H8BKF...Z2T'
});

if (result.is_whatsapp_user) {
  console.log('Safe to send a WhatsApp message');
}

Response

json
{
  "phone": "+447700900000",
  "is_whatsapp_user": true,
  "whatsapp_id": "447700900000@s.whatsapp.net"
}

Validate Before Bulk Sending

Use this endpoint to pre-validate your recipient list before running a bulk send. Messages sent to non-WhatsApp numbers will fail and may count toward your session's error rate.

Released under the MIT License.