The messaging API provides three endpoints for sending WhatsApp messages programmatically, plus one endpoint for reading recent conversations. All endpoints useDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/rahul-baberwal/django-meta-whatsapp/llms.txt
Use this file to discover all available pages before exploring further.
POST (or GET for reads) and require the X-API-Key header. See Authentication for setup instructions.
POST /whatsapp/api/send-message/
Send a plain text WhatsApp message to any phone number.Request Body
Recipient phone number including country code, without a leading
+ prefix. Example: "919876543210" for an Indian number.The text message body to send. Supports plain text up to WhatsApp’s standard character limit.
Primary key of the
WhatsAppAccount to send from. When omitted, the view passes account=None to the send utility, which will use the default configured account.Example
Success Response
POST /whatsapp/api/send-location/
Send a location pin message. The recipient will see an interactive map card in their chat.Request Body
Recipient phone number with country code, no
+ prefix.Latitude in decimal degrees. Example:
28.6139 for New Delhi.Longitude in decimal degrees. Example:
77.2090 for New Delhi.Location name displayed as the card title in chat. Example:
"Our Office".Address text displayed below the map pin. Example:
"Connaught Place, New Delhi".Example
Success Response
POST /whatsapp/api/send-template/
Send an approved WhatsApp template message with optional variable substitution. Templates must be submitted through the dashboard and approved by Meta before use.Request Body
Recipient phone number with country code, no
+ prefix.Exact name of the approved template as registered on Meta. Must match the name shown in Templates in your dashboard.
BCP-47 language code for the template. Examples:
"en", "hi", "en_US". Defaults to "en" when omitted.Ordered list of values to substitute into the template body’s
{{1}}, {{2}}, etc. placeholders. The first element fills {{1}}, the second fills {{2}}, and so on. Passed to build_template_components(body_params=...).Ordered list of values for variables in the template header component, using the same positional convention as
body_params. Passed to build_template_components(header_params=...).Example
Success Response
GET /whatsapp/api/chats/
Retrieve the 50 most recent conversations, ordered by the time of the last message.Example
Success Response
Response Fields
List of the 50 most recent conversation objects, sorted descending by
last_message_at.