Validating Contacts
To send a template message outside the customer care time window, you should validate the Contact number first. This is a WhatsApp procedure to validate the WhatsApp ID before approaching your customers. With API, you can do: Verify that a phone number in your database belongs to a valid WhatsApp account. You must ensure that the status is valid before you can message a user.
Get the WhatsApp ID for a phone number. WhatsApp IDs are needed to send messages and use notifications.
Authorization
bearerAuth JWT access token returned by Signing In (POST /auth/v1/tokens/).
In: header
Response Body
application/json
application/json
curl -X POST "https://example.com/conversation/v1/contacts""{\n \"contacts\": [ {\n \"wa_id\": \"12345678910\",\n \"input\": \"12345678910\",\n \"status\": \"valid\"\n },\n {\n \"wa_id\": \"12345678910\",\n \"input\": \"+1 234 567 8910\",\n \"status\": \"processing\" # Only applicable when request is non-blocking\n },\n {\n \"input\": \"+201003155512\",\n \"status\": \"invalid\"\n },\n {\n \"input\": \"456464566446\",\n \"status\": \"failed\"\n }\n}"Uploading Media (file) POST
Use the media node to upload, retrieve, or delete media. If you use the media upload process rather than linking to a media URL, the file must be uploaded to the media volume. Once the upload is complete, you can send a message using the media ID. The **POST** body of the API request must contain the binary media data and the Content-Type header must be set to the type of the media being uploaded. See the Supported Content-Types section below for information about supported Content-Types you can upload.
Sending Message (Text or Media) POST
Send a WhatsApp text or media message. The documentation presents *Sending Text Message* and *Sending Media Message* as separate pages for the same endpoint; both payloads are accepted here. --- Text --- Use the messages node to send text messages to your customers. --- Media --- Use this API to send messages containing audio, documents, images, stickers, or videos to your customers.