WhatsApp Web API Documentation

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.

  • 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.

Instances

POST

Create Instance

API endpoint:

https://waclient.com/api/create_instance?access_token=EMCUH3NQQK8YXXXX

Generates a new instance_id to connect WhatsApp Web (QR / Pair Code).

Example:
curl -X POST 'https://waclient.com/api/create_instance' -H 'Content-Type: application/json' --data '{"access_token":"EMCUH3NQQK8YXXXX"}'
Response:
{"status":"success","message":"Instance ID generated successfully","instance_id":"609ACF283XXXX"}
PARAMS
access_tokenYour access token
POST

Logout Instance

API endpoint:

https://waclient.com/api/logout?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX

Logout from a WhatsApp Web instance.

Example:
curl -X POST 'https://waclient.com/api/logout' -H 'Content-Type: application/json' --data '{"instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Response:
{"status":"success","message":"Logout successful"}
PARAMS
instance_idThe instance ID to logout
access_tokenYour access token
POST

Reconnect Instance

API endpoint:

https://waclient.com/api/reconnect?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX

Reconnect to a WhatsApp Web instance if it was disconnected.

Example:
curl -X POST 'https://waclient.com/api/reconnect' -H 'Content-Type: application/json' --data '{"instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Response:
{"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"}}
PARAMS
instance_idThe instance ID to reconnect
access_tokenYour access token
POST

Delete Instance

API endpoint:

https://waclient.com/api/delete_instance?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX

Delete a WhatsApp Web instance and all related data.

Example:
curl -X POST 'https://waclient.com/api/delete_instance' -H 'Content-Type: application/json' --data '{"instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Response:
{"status":"success","message":"instance ID was successfully deleted"}
PARAMS
instance_idThe instance ID to delete
access_tokenYour access token
POST

Set Webhook

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.

Example:
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"}'
Response:
{"status":"success","message":"Webhook URI Saved"}
PARAMS
webhook_urlTarget webhook endpoint (URL encoded)
enabletrue or false to enable/disable
instance_idThe instance ID to configure
access_tokenYour access token

WhatsApp Login

GET

Get QR Code

API endpoint:

https://waclient.com/api/get_qrcode?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX

Retrieve a QR code to log in to WhatsApp Web.

Example:
curl -X GET 'https://waclient.com/api/get_qrcode?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX'
Response:
{"status":"success","message":"Success","base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVkAAAFZCAAAAAAXmQMHAAAGjElEQVR42..."}
PARAMS
instance_idYour instance ID
access_tokenYour access token
GET

Get Pairing Code

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.

Example:
curl -X GET 'https://waclient.com/api/get_paircode?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX&phone=62815xxxxxxxx'
Response:
{"status":"success","message":"Success","code":"CSK8-RSF9"}
PARAMS
instance_idYour instance ID
access_tokenYour access token
phonePhone number (with country code)

Messaging

POST

Send Text

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.

Example:
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"}'
Response:
{"status":"success","message":{"key":{"remoteJid":"[email protected]","fromMe":true,"id":"MSG-TEXT-001"},"message":{"extendedTextMessage":{"text":"test message"}},"messageTimestamp":"1757163259","status":"SUCCESS"}}
PARAMS
number / chat_idRecipient phone (e.g. 20100981XXXX) or chat_id ([email protected] for group, xxxx@newsletter for channel)
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=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX

Send a media message (image / video / audio) or file (PDF / DOCX / etc.) to a WhatsApp user, group, or channel.

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":"609ACF283XXXX","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
number / chat_idRecipient phone (e.g. 20100981XXXX) or chat_id ([email protected] for group, xxxx@newsletter for channel)
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

Send a button message to a WhatsApp user, group.

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":"609ACF283XXXX","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":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}
Example (URL, Call & Copy via JSON):
{"number":"20100981XXXX","type":"button","message":{"templateButtons":[{"index":1,"urlButton":{"display_text":"Visit","url":"https://example.com"}},{"index":2,"callButton":{"display_text":"Call","phoneNumber":"+201234567890"}},{"index":3,"copyButton":{"display_text":"Copy","copyCode":"ABC123"}}],"footer":"Optional Footer","caption":"Optional Caption","document":{"url":"https://yourdomain.com/file.pdf"}},"instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}
In JSON mode you may optionally attach image or document. For documents use {"url":"https://..."} only.
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
number / chat_idRecipient phone number (e.g. 20100981XXXX) or chat_id (group: [email protected])
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

Send a list message to a WhatsApp user, group.

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":"609ACF283XXXX","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":"609ACF283XXXX","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
number / chat_idRecipient phone number (e.g. 20100981XXXX) or chat_id (group: [email protected])
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

Send a poll message to a WhatsApp user, group, or channel.

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":"609ACF283XXXX","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":"609ACF283XXXX","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
number / chat_idRecipient phone number (e.g. 20100981XXXX) or chat_id (group: [email protected], channel: xxxx@newsletter)
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

Send a location message to a WhatsApp user, group

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":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Example (JSON):
{"number":"20100981XXXX","type":"location","message":{"name":"Cairo Downtown","degreesLatitude":30.0595,"degreesLongitude":31.223},"instance_id":"609ACF283XXXX","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
number / chat_idRecipient phone number (e.g. 20100981XXXX) or chat_id (group: [email protected])
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

Send a contact (vCard) message to a WhatsApp user, group.

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":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Example (JSON):
{"number":"20100981XXXX","type":"contact","message":{"firstName":"Mohamed","lastName":"Ali","phoneNumber":"+20100981XXXX","organization":"WA Client"},"instance_id":"609ACF283XXXX","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
number / chat_idRecipient phone number (e.g. 20100981XXXX) or chat_id (group: [email protected])
typeMust be contact
message / templateProvide either a JSON message (contact details) or a template ID (Dashboard)
instance_idYour instance ID
access_tokenYour access token

Groups

GET

Get Groups

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.

Example:
curl -X GET 'https://waclient.com/api/get_groups?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX'
Response:
{"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}]}
PARAMS
instance_idYour instance ID
access_tokenYour access token

Channels

GET

Get Channels

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.

Example:
curl -X GET 'https://waclient.com/api/get_channels?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX'
Response:
{"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}]}
PARAMS
instance_idYour instance ID
access_tokenYour access token

Utilities

POST

Check WhatsApp Number

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.

Example (single):
curl -X POST 'https://waclient.com/api/check_number' -H 'Content-Type: application/json' --data '{"number":"20100981XXXX","instance_id":"609ACF283XXXX","access_token":"EMCUH3NQQK8YXXXX"}'
Response (single):
{"status":"success","message":"WhatsApp number is valid","data":{"number":"20100981XXXX","valid":true}}
Example (multiple):
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"}'
Response (multiple):
{"status":"success","message":"Processed 3 numbers","data":[{"number":"20100981XXXX","valid":true},{"number":"201234567890","valid":false},{"number":"9665XXXXXXX","valid":true}]}
PARAMS
numberSingle phone number (with country code)
numbersMultiple numbers, comma-separated (e.g. 2010...,2012...,9665...)
instance_idThe instance ID to use
access_tokenYour access token