WhatsApp Cloud API Documentation

The WhatsApp Cloud API provides a simple and powerful way to integrate WhatsApp into your applications. With just a few endpoints, you can send and receive messages, share media, manage chats, and build automated workflows.

  • Send text, media (images, videos, audio), files (PDF, DOCX, etc.), contacts (vCard), locations, polls, and interactive messages (buttons & lists).
  • Receive and process incoming messages in real-time via webhooks, enabling automation and chatbots.
  • Check if a phone number is registered on WhatsApp before sending.
  • Manage groups and channels with dedicated endpoints.

To get started, you will need two credentials:

  • Access Token: A secure key used to authenticate API requests.
  • WhatsApp Instance ID: A unique identifier linked to your WhatsApp account session.

Don’t have credentials yet? Subscribe here to get your Access Token and Instance ID.

Messaging

POST

Send Text

API endpoint:

https://waclient.com/api/send?number=20100981XXXX&type=text&message=test+message&instance_id=META68B6ED90CXXXX&access_token=EMCUH3NQQK8YXXXX
Example:
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"text","message":"test message","instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Response:
{"status":"success","message":{"key":{"remoteJid":"[email protected]","fromMe":true,"id":"MSG-TEXT-001"},"message":{"extendedTextMessage":{"text":"test message"}},"messageTimestamp":"1757163259","status":"SUCCESS"}}
PARAMS
numberRecipient phone (e.g. 20100981XXXX)
typeMust be text
messageThe text message to send
instance_idYour instance ID
access_tokenYour access token
POST

Send Media & File

API endpoint:

https://waclient.com/api/send?number=20100981XXXX&type=media&message=test+message&media_url=https%3A%2F%2Fi.pravatar.cc&filename=file_test.jpg&instance_id=META68B6ED90CXXXX&access_token=EMCUH3NQQK8YXXXX
Example:
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"media","message":"test message","media_url":"https://i.pravatar.cc","filename":"file_test.jpg","instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Response:
{"status":"success","message":{"key":{"remoteJid":"[email protected]","fromMe":true,"id":"MSG-MEDIA-001"},"message":{"documentMessage":{"fileName":"file_test.jpg","caption":"test message"}},"messageTimestamp":"1757163300","status":"SUCCESS"}}
PARAMS
numberRecipient phone (e.g. 20100981XXXX)
typeMust be media
messageOptional caption or text message
media_urlPublic file URL, e.g. https://i.pravatar.cc
filenameFile name to display in WhatsApp (Required for documents only), e.g. file_test.pdf
instance_idYour instance ID
access_tokenYour access token
POST

Send Button

API endpoint:

https://waclient.com/api/send
Example (using template from Dashboard):
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"button","template":"templateids","instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Example (Quick Reply via JSON):
{"number":"20100981XXXX","type":"button","message":{"templateButtons":[{"index":1,"quickReplyButton":{"display_text":"Reply","id":"reply_123"}}],"footer":"Optional Footer","caption":"Optional Caption","image":{"url":"https://yourdomain.com/image.jpg"}},"instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}
Response:
{"status":"success","message":{"key":{"remoteJid":"[email protected]","fromMe":true,"id":"MSG-BUTTON-001"},"message":{"buttonsMessage":{"contentText":"Test Title","footerText":"test footer","buttons":[{"buttonId":"reply_123","buttonText":{"displayText":"Reply"}}]}},"messageTimestamp":"1757163259","status":"SUCCESS"}}
PARAMS
numberRecipient phone (e.g. 20100981XXXX)
typeMust be button
message / templateProvide either JSON message (custom button) or template ID (Dashboard)
instance_idYour instance ID
access_tokenYour access token
POST

Send List

API endpoint:

https://waclient.com/api/send
Example (using template from Dashboard):
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"list","template":"templateids","instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Example (JSON):
{"number":"20100981XXXX","type":"list","message":{"text":"Choose from the list","footer":"List Footer","title":"Available Options","buttonText":"Open List","sections":[{"title":"Group A","rows":[{"title":"Item 1","description":"Description 1","rowId":"item_1"},{"title":"Item 2","description":"Description 2","rowId":"item_2"}]},{"title":"Group B","rows":[{"title":"Item 3","description":"Description 3","rowId":"item_3"}]}]},"instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}
Response:
{"status":"success","message":{"key":{"remoteJid":"[email protected]","fromMe":true,"id":"MSG-LIST-001"},"message":{"listMessage":{"title":"Available Options","buttonText":"Open List","description":"Choose from the list","footerText":"List Footer"}},"messageTimestamp":"1757163259","status":"SUCCESS"}}
PARAMS
numberRecipient phone (e.g. 20100981XXXX)
typeMust be list
message / templateProvide either JSON message (custom list) or template ID (Dashboard)
instance_idYour instance ID
access_tokenYour access token
POST

Send Poll

API endpoint:

https://waclient.com/api/send
Example (using template from Dashboard):
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"poll","template":"templateids","instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Example (JSON):
{"number":"20100981XXXX","type":"poll","message":{"name":"What’s your favorite?","values":["Option 1","Option 2","Option 3"],"selectableCount":1},"instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}
Tip: selectableCount defines how many options a user can select (usually 1).
Response:
{"status":"success","message":{"key":{"remoteJid":"[email protected]","fromMe":true,"id":"MSG-POLL-001"},"message":{"pollCreationMessage":{"name":"What’s your favorite?","options":[{"optionName":"Option 1"},{"optionName":"Option 2"},{"optionName":"Option 3"}],"selectableOptionsCount":1}},"messageTimestamp":"1757163359","status":"SUCCESS"}}
PARAMS
numberRecipient phone (e.g. 20100981XXXX)
typeMust be poll
message / templateProvide either a JSON message (custom poll) or a template ID (Dashboard)
instance_idYour instance ID
access_tokenYour access token
POST

Send Location

API endpoint:

https://waclient.com/api/send
Example (using template from Dashboard):
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"location","template":"templateids","instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Example (JSON):
{"number":"20100981XXXX","type":"location","message":{"name":"Cairo Downtown","degreesLatitude":30.0595,"degreesLongitude":31.223},"instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}
Response:
{"status":"success","message":{"key":{"remoteJid":"[email protected]","fromMe":true,"id":"MSG-LOCATION-001"},"message":{"locationMessage":{"name":"Cairo Downtown","degreesLatitude":30.0595,"degreesLongitude":31.223}},"messageTimestamp":"1757163400","status":"SUCCESS"}}
PARAMS
numberRecipient phone (e.g. 20100981XXXX)
typeMust be location
message / templateProvide either JSON message (location details) or a template ID (Dashboard)
instance_idYour instance ID
access_tokenYour access token
POST

Send Contact (vCard)

API endpoint:

https://waclient.com/api/send
Example (using template from Dashboard):
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"contact","template":"templateids","instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Example (JSON):
{"number":"20100981XXXX","type":"contact","message":{"firstName":"Mohamed","lastName":"Ali","phoneNumber":"+20100981XXXX","organization":"WA Client"},"instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}
Response:
{"status":"success","message":{"key":{"remoteJid":"[email protected]","fromMe":true,"id":"MSG-CONTACT-001"},"message":{"contactMessage":{"displayName":"Mohamed Ali","vcard":"BEGIN:VCARD\nVERSION:3.0\nFN:Mohamed Ali\nORG:WA Client\nTEL;type=CELL:+20100981XXXX\nEND:VCARD"}},"messageTimestamp":"1757163450","status":"SUCCESS"}}
PARAMS
numberRecipient phone (e.g. 20100981XXXX)
typeMust be contact
message / templateProvide either a JSON message (contact details) or a template ID (Dashboard)
instance_idYour instance ID
access_tokenYour access token

Meta Templates

GET

Get templates

API endpoint:

https://waclient.com/api/get_meta_template?instance_id=META68B6ED90CXXXX&access_token=EMCUH3NQQK8YXXXX
Example:
curl -X GET 'https://waclient.com/api/get_meta_template?instance_id=META68B6ED90CXXXX&access_token=EMCUH3NQQK8YXXXX'
Response:
{"status":"success","message":"Success","count":3,"data":[{"id":"712736988571082","template_name":"black_friday","language_code":"en","status":"APPROVED","category":"MARKETING","quality_score":{"score":"UNKNOWN","date":1764432062},"components":[{"type":"button","sub_type":"copy_code","index":"1","parameters":[{"type":"coupon_code","coupon_code":"BF30"}]}]},{"id":"25086889100995677","template_name":"otp","language_code":"en","status":"APPROVED","category":"AUTHENTICATION","quality_score":{"score":"UNKNOWN","date":1764373688},"components":[{"type":"body","parameters":[{"type":"text","text":"123456"}]},{"type":"button","sub_type":"url","index":"0","parameters":[{"type":"text","text":"otp123456"}]}]},{"id":"1653196952311007","template_name":"hello_world","language_code":"en_US","status":"APPROVED","category":"UTILITY","quality_score":{"score":"UNKNOWN","date":1764335176},"components":[]}]}
PARAMS
instance_idYour instance ID
access_tokenYour access token
POST

Send Template

API endpoint:

https://waclient.com/api/send
Example:
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"template","message":{"name":"otp","language":{"code":"en_US"},"components":[{"type":"body","parameters":[{"type":"text","text":"1234"}]},{"type":"button","sub_type":"url","index":"0","parameters":[{"type":"text","text":"1234"}]}]},"instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Example (JSON):
{"number":"20100981XXXX","type":"template","message":{"name":"otp","language":{"code":"en_US"},"components":[{"type":"body","parameters":[{"type":"text","text":"1234"}]},{"type":"button","sub_type":"url","index":"0","parameters":[{"type":"text","text":"1234"}]}]},"instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}
Response:
{ "status": "success", "message": "Success", "message_payload": { "messaging_product": "whatsapp", "contacts": [ { "input": "[email protected]", "wa_id": "20100981XXXX" } ], "messages": [ { "id": "wamid.HBgMMjAxMDExNTExMDg5FQIAERgSMDM5NDg4M0M2NUUwRjAzNzhEAA==", "message_status": "accepted" } ] } }
PARAMS
number Recipient phone (e.g. 20100981XXXX)
type Must be template
message.name Template name inside your Meta WhatsApp Cloud account (e.g. otp)
message.language.code Locale of the template (e.g. en_US)
message.components Array of components (body/button/header). Should match the approved template structure in Meta. Example component types:
  • body — has parameters (text)
  • buttonsub_type can be url or copy_code, includes index and optional parameters
instance_id Your instance ID
access_token Your access token