API & Webhooks Documentation
Welcome to the WaRespond API & Webhooks! You can use our API to access WaRespond API endpoints & receive incoming Webhooks, which can be used to create new WaRespond instance, retrieve QR code, trigger on new WhatsApp messages received, reboot, reset or reconnect instance as well as sending out WhatsApp text and file messages to individual or group chats.
The main endpoint is:
https://warespond.xyz/api
Authentication
WaRespond uses access tokens to allow access to the API. You can register for a developer account here.
WaRespond expects for the access token to be included in all API requests to the server in a header that looks like the following:
access_token=ACCESS_TOKEN
Instance API
POST Create Instance
https://warespond.xyz/api/createinstance.php?access_token=ACCESS_TOKEN
Create a new Instance ID
Parameters
POST Get QR Code
https://warespond.xyz/api/getqrcode.php?instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Create a new Instance ID
Parameters
POST Set Receiving Webhook
https://warespond.xyz/api/setwebhook.php?webhook_url=https://webhook.site/xxxxxxxx&enable=true&instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Get all return values from WhatsApp such as connection status, Incoming message, Outgoing message, Disconnected, Change Battery, etc.
Parameters
POST Reboot Instance
https://warespond.xyz/api/reboot.php?instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Logout of WhatsApp Web and do a fresh scan.
Parameters
POST Reset Instance
https://warespond.xyz/api/resetinstance.php?instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Logout of WhatsApp Web, Change Instance ID, Delete all old instance data
Parameters
POST Reconnect Instance
https://warespond.xyz/api/reconnect.php?instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Re-initiate connection from app to WhatsApp Web when connection is lost
Parameters
Send Direct Message API
POST Send Text
https://warespond.xyz/api/send.php?number=xxxxxxxx&type=text&message=test%20message&instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Send a text message to a phone number through the app
Parameters
POST Send Text with Button
https://warespond.xyz/api/send.php?number=xxxxxxxx&type=text&message=text%20message%0A_%5Ebutton%20name%201_button%20text%201_%5E_%0A_%5Ebutton%20name%202_button%20text%202_%5E_%0A_%5Ebutton%20name%203_button%20text%203_%5E_&instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Send a text message with a button to a phone number through the app. Selecting the button will trigger a message reply.
Parameters
POST Send Text with Link Button
https://warespond.xyz/api/send.php?number=xxxxxxxx&type=text&message=text%20message%0A_%5Ebutton%20name_button%20text_https%3A%2F%2Furllinkbutton.com_%5E_&instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Send a text message with a button to a phone number through the app. Selecting the button will trigger a message reply.
Parameters
POST Send Media
https://warespond.xyz/api/send.php?number=xxxxxxxx&type=media&message=test%20message&media_url=https://mediahosting.com/file&filename=FILENAME.jpg&instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Send a media or file with message to a phone number through the app
Parameters
POST Send Media with Button & Link
For a better idea on how to use this API, please also refer to Send Text with Button and Send Text with Button Link
https://warespond.xyz/api/send.php?number=xxxxxxxx&type=media&message=test%20message%0A_%5Ebutton%20name_button%20text_https%3A%2F%2Furllinkbutton.com_%5E_&media_url=https://mediahosting.com/file&filename=FILENAME.jpg&instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Send a media or file with message to a phone number through the app
Parameters
Send Group Message API
POST Send Text to Group
https://warespond.xyz/api/sendgroupmsg.php?group_id=xxxxxxxx@g.us&type=text&message=test%20message&instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Send a text message to a group through the app
Parameters
POST Send Media & Files to Group
https://warespond.xyz/api/sendgroupmsg.php?group_id=xxxxxxxx@g.us&type=media&message=test%20message&media_url=https://mediahosting.com/file&filename=FILENAME.jpg&instance_id=INSTANCE_ID&access_token=ACCESS_TOKEN
Send a media or file with message to a group through the app