Before messaging someone — or to build your own "new chat" screen — check whether their phone number has a WhatsApp account.
POST
https://api.waconnect.ai/v1/contacts/lookupcurl https://api.waconnect.ai/v1/contacts/lookup \
-H "Authorization: Bearer wc_live_your_key" \
-H "Content-Type: application/json" \
-d '{"numberId":"YOUR_NUMBER_ID","phone":"+14155550123"}'{ "phone": "+14155550123", "onWhatsapp": true }FieldTypeRequirementDescription
numberIdstring (uuid)required- A connected number of yours; WhatsApp is asked through it.
phonestringrequired- The phone number in international format.
Good to know#
- Lookups are free — no credits are used.
- The number you ask through must be connected, otherwise you get
409. - WhatsApp usually answers in under a second. If it doesn't answer within 10 seconds, you get
503— retry shortly. - You don't need to look up before sending:
POST /v1/messageschecks new recipients itself and answers422if they aren't on WhatsApp.
Best practice#
Look a number up at the moment someone is about to be messaged — for example when a user types it into your "new chat" screen. WhatsApp treats large batches of lookups as list validation, so checking whole contact lists in one go is best avoided.