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.
To get started, you will need two credentials:
Don’t have credentials yet? Subscribe here to get your Access Token and Instance ID.
API endpoint:
https://waclient.com/api/send?number=20100981XXXX&type=text&message=test+message&instance_id=META68B6ED90CXXXX&access_token=EMCUH3NQQK8YXXXX
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"}'
{"status":"success","message":{"key":{"remoteJid":"[email protected]","fromMe":true,"id":"MSG-TEXT-001"},"message":{"extendedTextMessage":{"text":"test message"}},"messageTimestamp":"1757163259","status":"SUCCESS"}}
| number | Recipient phone (e.g. 20100981XXXX) |
| type | Must be text |
| message | The text message to send |
| instance_id | Your instance ID |
| access_token | Your access token |
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
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"}'
{"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"}}
| number | Recipient phone (e.g. 20100981XXXX) |
| type | Must be media |
| message | Optional caption or text message |
| media_url | Public file URL, e.g. https://i.pravatar.cc |
| filename | File name to display in WhatsApp (Required for documents only), e.g. file_test.pdf |
| instance_id | Your instance ID |
| access_token | Your access token |
API endpoint:
https://waclient.com/api/send
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"}'
{"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"}
{"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"}}
| number | Recipient phone (e.g. 20100981XXXX) |
| type | Must be list |
| message / template | Provide either JSON message (custom list) or template ID (Dashboard) |
| instance_id | Your instance ID |
| access_token | Your access token |
API endpoint:
https://waclient.com/api/send
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"}'
{"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"}
selectableCount defines how many options a user can select (usually 1).{"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"}}
| number | Recipient phone (e.g. 20100981XXXX) |
| type | Must be poll |
| message / template | Provide either a JSON message (custom poll) or a template ID (Dashboard) |
| instance_id | Your instance ID |
| access_token | Your access token |
API endpoint:
https://waclient.com/api/send
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"}'
{"number":"20100981XXXX","type":"location","message":{"name":"Cairo Downtown","degreesLatitude":30.0595,"degreesLongitude":31.223},"instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}
{"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"}}
| number | Recipient phone (e.g. 20100981XXXX) |
| type | Must be location |
| message / template | Provide either JSON message (location details) or a template ID (Dashboard) |
| instance_id | Your instance ID |
| access_token | Your access token |
API endpoint:
https://waclient.com/api/send
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"}'
{"number":"20100981XXXX","type":"contact","message":{"firstName":"Mohamed","lastName":"Ali","phoneNumber":"+20100981XXXX","organization":"WA Client"},"instance_id":"META68B6ED90CXXXX","access_token":"EMCUH3NQQK8YXXXX"}
{"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"}}
| number | Recipient phone (e.g. 20100981XXXX) |
| type | Must be contact |
| message / template | Provide either a JSON message (contact details) or a template ID (Dashboard) |
| instance_id | Your instance ID |
| access_token | Your access token |
API endpoint:
https://waclient.com/api/get_meta_template?instance_id=META68B6ED90CXXXX&access_token=EMCUH3NQQK8YXXXX
curl -X GET 'https://waclient.com/api/get_meta_template?instance_id=META68B6ED90CXXXX&access_token=EMCUH3NQQK8YXXXX'
{"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":[]}]}
| instance_id | Your instance ID |
| access_token | Your access token |
API endpoint:
https://waclient.com/api/send
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"}'
{"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"}
{ "status": "success", "message": "Success", "message_payload": { "messaging_product": "whatsapp", "contacts": [ { "input": "[email protected]", "wa_id": "20100981XXXX" } ], "messages": [ { "id": "wamid.HBgMMjAxMDExNTExMDg5FQIAERgSMDM5NDg4M0M2NUUwRjAzNzhEAA==", "message_status": "accepted" } ] } }
| 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:
|
| instance_id | Your instance ID |
| access_token | Your access token |