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":2,"data":[{"id":"362165066720200","template_name":"hello_world","language_code":"en_US","status":"APPROVED","category":"UTILITY","quality_score":{"score":"UNKNOWN","date":1757248902},"components":[{"type":"HEADER","format":"TEXT","text":"Hello World"},{"type":"BODY","text":"Welcome and congratulations!! This message demonstrates your ability to send a WhatsApp message notification from the Cloud API, hosted by Meta. Thank you for taking the time to test with us."},{"type":"FOOTER","text":"WhatsApp Business Platform sample message"}]},{"id":"680074291665140","template_name":"otp_message","language_code":"en_US","status":"APPROVED","category":"AUTHENTICATION","quality_score":{"score":"UNKNOWN","date":1757248902},"components":[{"type":"BODY","text":"*{{1}}* is your verification code. For your security, do not share this code.","add_security_recommendation":true,"example":{"body_text":[["123456"]]}},{"type":"BUTTONS","buttons":[{"type":"URL","text":"Copy code","url":"https://www.whatsapp.com/otp/code/?otp_type=COPY_CODE&code=otp{{1}}","example":["https://www.whatsapp.com/otp/code/?otp_type=COPY_CODE&code=otp123456"]}]}]}]}
PARAMS
instance_idYour instance ID
access_tokenYour access token
POST

Send template

API endpoint:

https://waclient.com/api/send_meta_template
Example (JSON):
{"number":"20100981XXXX","language_code":"en_US","template_name":"otp_message","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","data":{"messaging_product":"whatsapp","contacts":[{"input":"20100981XXXX","wa_id":"20100981XXXX"}],"messages":[{"id":"wamid.HBgMMjAxMDExNTExMDg5FQIAERgSODQ5NkVCQkMwMDdEMzgzRjZEAA==","message_status":"accepted"}]}}
PARAMS
numberRecipient phone (e.g. 20100981XXXX)
language_codeTemplate locale (e.g. en_US). Default: en_US
template_nameApproved template name in your WhatsApp Cloud account (e.g. otp_message)
componentsJSON for template variables (body/header/button → parameters). Required only if the template has variables and must match the approved template schema.
instance_idYour instance ID
access_tokenYour access token