The WhatsApp Web 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/create_instance?access_token=EMCUH3NQQK8YXXXX
Generates a new instance_id to connect WhatsApp Web (QR / Pair Code).
curl -X POST 'https://waclient.com/api/create_instance' -H 'Content-Type: application/json' --data '{"access_token":"EMCUH3NQQK8YXXXX"}'
{"status":"success","message":"Instance ID generated successfully","instance_id":"609ACF283XXXX"}
access_token | Your access token |
API endpoint:
https://waclient.com/api/logout?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
Logout from a WhatsApp Web instance.
curl -X POST 'https://waclient.com/api/logout' -H 'Content-Type: application/json' --data '{"instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
{"status":"success","message":"Logout successful"}
instance_id | The instance ID to logout |
access_token | Your access token |
API endpoint:
https://waclient.com/api/reconnect?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
Reconnect to a WhatsApp Web instance if it was disconnected.
curl -X POST 'https://waclient.com/api/reconnect' -H 'Content-Type: application/json' --data '{"instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
{"status":"success","message":"Success","data":{"id":"20100981XXXX:[email protected]","name":"WA Client","avatar":"https://pps.whatsapp.net/v/t61.24694-24/490584451_1111613597488917_713041130332559901797_n.jpg"}}
instance_id | The instance ID to reconnect |
access_token | Your access token |
API endpoint:
https://waclient.com/api/delete_instance?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
Delete a WhatsApp Web instance and all related data.
curl -X POST 'https://waclient.com/api/delete_instance' -H 'Content-Type: application/json' --data '{"instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
{"status":"success","message":"instance ID was successfully deleted"}
instance_id | The instance ID to delete |
access_token | Your access token |
API endpoint:
https://waclient.com/api/set_webhook?webhook_url=https%3A%2F%2Fwebhook.site%2Fxxxx&enable=true&instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
Enable or disable webhook for a specific instance.
curl -X POST 'https://waclient.com/api/set_webhook' -H 'Content-Type: application/json' --data '{"webhook_url":"https://webhook.site/xxxx","enable":true,"instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
{"status":"success","message":"Webhook URI Saved"}
webhook_url | Target webhook endpoint (URL encoded) |
enable | true or false to enable/disable |
instance_id | The instance ID to configure |
access_token | Your access token |
API endpoint:
https://waclient.com/api/get_qrcode?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
Retrieve a QR code to log in to WhatsApp Web.
curl -X GET 'https://waclient.com/api/get_qrcode?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX'
{"status":"success","message":"Success","base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVkAAAFZCAAAAAAXmQMHAAAGjElEQVR42..."}
instance_id | Your instance ID |
access_token | Your access token |
API endpoint:
https://waclient.com/api/get_paircode?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX&phone=62815xxxxxxxx
Generate a pairing code to log in to WhatsApp Web using your phone number.
curl -X GET 'https://waclient.com/api/get_paircode?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX&phone=62815xxxxxxxx'
{"status":"success","message":"Success","code":"CSK8-RSF9"}
instance_id | Your instance ID |
access_token | Your access token |
phone | Phone number (with country code) |
API endpoint:
https://waclient.com/api/send?number=20100981XXXX&type=text&message=test+message&instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
Send a text message to a WhatsApp user, group, or channel.
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"text","message":"test message","instance_id":"609ACF283XXXX","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 / chat_id | Recipient phone (e.g. 20100981XXXX ) or chat_id ([email protected] for group, xxxx@newsletter for channel) |
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=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
Send a media message (image / video / audio) or file (PDF / DOCX / etc.) to a WhatsApp user, group, or channel.
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":"609ACF283XXXX","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 / chat_id | Recipient phone (e.g. 20100981XXXX ) or chat_id ([email protected] for group, xxxx@newsletter for channel) |
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
Send a list message to a WhatsApp user, group.
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"list","template":"templateids","instance_id":"609ACF283XXXX","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":"609ACF283XXXX","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 / chat_id | Recipient phone number (e.g. 20100981XXXX ) or chat_id (group: [email protected] ) |
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
Send a poll message to a WhatsApp user, group, or channel.
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"poll","template":"templateids","instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
{"number":"20100981XXXX","type":"poll","message":{"name":"What’s your favorite?","values":["Option 1","Option 2","Option 3"],"selectableCount":1},"instance_id":"609ACF283XXXX","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 / chat_id | Recipient phone number (e.g. 20100981XXXX ) or chat_id (group: [email protected] , channel: xxxx@newsletter ) |
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
Send a location message to a WhatsApp user, group
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"location","template":"templateids","instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
{"number":"20100981XXXX","type":"location","message":{"name":"Cairo Downtown","degreesLatitude":30.0595,"degreesLongitude":31.223},"instance_id":"609ACF283XXXX","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 / chat_id | Recipient phone number (e.g. 20100981XXXX ) or chat_id (group: [email protected] ) |
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
Send a contact (vCard) message to a WhatsApp user, group.
curl -X POST 'https://waclient.com/api/send' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","type":"contact","template":"templateids","instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
{"number":"20100981XXXX","type":"contact","message":{"firstName":"Mohamed","lastName":"Ali","phoneNumber":"+20100981XXXX","organization":"WA Client"},"instance_id":"609ACF283XXXX","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 / chat_id | Recipient phone number (e.g. 20100981XXXX ) or chat_id (group: [email protected] ) |
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_groups?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
Retrieve a list of all groups for the given WhatsApp instance.
curl -X GET 'https://waclient.com/api/get_groups?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX'
{"status":"success","message":"Success","data":[{"id":"[email protected]","name":"WA Client Team","size":12},{"id":"[email protected]","name":"Support Group","size":34},{"id":"[email protected]","name":"Marketing Updates","size":57}]}
instance_id | Your instance ID |
access_token | Your access token |
API endpoint:
https://waclient.com/api/get_channels?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
Retrieve a list of all channels for the given WhatsApp instance.
curl -X GET 'https://waclient.com/api/get_channels?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX'
{"status":"success","message":"Success","data":[{"id":"120987234987654321@newsletter","name":"Tech News Channel","size":1520},{"id":"120123456789876543@newsletter","name":"Daily Updates","size":845},{"id":"120555444333222111@newsletter","name":"Marketing Insights","size":432}]}
instance_id | Your instance ID |
access_token | Your access token |
API endpoint (single number):
https://waclient.com/api/check_number?number=20100981XXXX&instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
API endpoint (multiple numbers):
https://waclient.com/api/check_number?numbers=20100981XXXX,201234567890,9665XXXXXXX&instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX
Check if one or more phone numbers are registered on WhatsApp.
curl -X POST 'https://waclient.com/api/check_number' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
{"status":"success","message":"WhatsApp number is valid","data":{"number":"20100981XXXX","valid":true}}
curl -X POST 'https://waclient.com/api/check_number' -H 'Content-Type: application/json' --data '{"numbers":["20100981XXXX","201234567890","9665XXXXXXX"],"instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
{"status":"success","message":"Processed 3 numbers","data":[{"number":"20100981XXXX","valid":true},{"number":"201234567890","valid":false},{"number":"9665XXXXXXX","valid":true}]}
number | Single phone number (with country code) |
numbers | Multiple numbers, comma-separated (e.g. 2010...,2012...,9665... ) |
instance_id | The instance ID to use |
access_token | Your access token |