Communicate with WhatsApp through messaging, media sharing, and contact management using the WhatsApp Cloud API
The WhatsApp API allows you to integrate WhatsApp messaging into your applications. You can send text messages, share media files, use pre-approved templates, check message delivery status, and manage contacts through your WhatsApp Business account.
Required:
action
- The action to perform (send_text, send_media, send_template, get_status, manage_contacts)to
- Recipient phone number (for messaging actions)message_content
- Content of the message to sendOptional:
media_url
- URL for media filescaption
- Caption for media messagestemplate_name
- Name of the template to uselanguage_code
- Language code for templatesSend a text message to a user’s WhatsApp number.
Parameters:
to
(required) - Recipient phone numbermessage
(required) - Text message contentExample:
Response:
Send an image, document, or other media file to a user’s WhatsApp number.
Parameters:
to
(required) - Recipient phone numbermedia_type
(required) - Type of media (image, document, video, audio)media_url
(required) - URL link to the media filecaption
(optional) - Caption for the mediaExample:
Response:
Send a pre-approved template message to a user’s WhatsApp number.
Parameters:
to
(required) - Recipient phone numbertemplate_name
(required) - Name of the approved templatelanguage_code
(required) - Language code (e.g., “en_US”)parameters
(optional) - Template parameters if neededExample:
Response:
Check the delivery status of a previously sent message.
Parameters:
message_id
(required) - ID of the message to checkExample:
Response:
Add or validate contacts in your WhatsApp business account.
Parameters:
phone_number
(required) - Contact phone numberwhatsapp_id
(optional) - WhatsApp ID if knownExample:
Response:
Requires a WhatsApp Business account and approved phone number. Template messages must be pre-approved by WhatsApp before use. Media files should be hosted on publicly accessible URLs. Phone numbers should include country code. Message delivery status includes: sent, delivered, read, and failed.