Check Contact

posthttps://api.telnyx.com/v2/whatsapp_contacts

Verify that a phone number belongs to a valid WhatsApp account. You must ensure that the status is valid before you can message a user, and you'll get their WhatsApp ID to use for messaging.

curl -X POST \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --header "Authorization: Bearer YOUR_API_KEY" \ --data-raw '{ "whatsapp_user_id": "15125551212", "blocking": "wait", "contacts": ["15125551000","+1 512 555 1001","5125551002","+1 (512) 555-1004","1-512-555-1005"] }' \ https://api.telnyx.com/v2/whatsapp_contacts

Parameters

In Body (application/json)
whatsapp_user_id
string
()
required
The sender's WhatsApp ID.
contacts
array of string
()
required
Array of contact phone numbers. The numbers can be in any standard telephone number format.
blocking
string
()
optional
Blocking determines whether the request should wait for the processing to complete (synchronous) or not (asynchronous).
Default:
"no_wait"
Options: [ "no_wait", "wait" ]

Responses

200
Successful response with details about WhatsApp contact(s).
default
Unexpected error

Success Response

{
  "data": {
    "id": "15125551234",
    "input": "+1 (512) 555-1234",
    "record_type": "whatsapp_contact",
    "status": "valid"
  }
}
Was this page helpful?