Skip to main content

Contacts

The Contacts API lets you verify phone numbers on WhatsApp, retrieve contact information, and fetch profile pictures. This is especially useful for validating numbers before sending messages and enriching your contact data. All contact endpoints are scoped to a specific instance:

Check if a Number Exists

Verify whether a phone number is registered on WhatsApp before sending a message. This prevents failed deliveries and wasted API calls.
Response (number exists):
Response (number does not exist):
Use this endpoint to validate numbers before sending messages. It saves on message quota and prevents message.failed webhook events.

Get All Contacts

Retrieve the full contact list for the connected WhatsApp account.
Response:

Contact Fields

The name field comes from your phone’s address book. If the contact is not saved, only push_name (set by the contact themselves) will be available.

Get Contact Info

Retrieve detailed information about a specific contact.
Response:

Get Profile Picture

Retrieve a contact’s WhatsApp profile picture URL.
Response:
Profile picture URLs are temporary and expire after some time. Do not store them permanently — fetch a fresh URL when needed.
If the contact has no profile picture or has restricted visibility in their privacy settings, the profile_picture_url will be null:

Common Patterns

Validate Before Sending

Always check if a number exists on WhatsApp before sending a message to avoid unnecessary failures:

Build a Contact Directory

Fetch all contacts and enrich them with profile pictures:
When fetching profile pictures for many contacts, add a delay between requests to stay within rate limits. The example above uses a 200ms delay.

Endpoint Reference


Error Handling