Getting Started

The WhatsApp Web API provides a simple and powerful way to integrate WhatsApp into your applications.

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.

Base paths:
https://wonotify.com/api/...
https://wonotify.com/whatsapp_api/...
Both base paths are supported and return the same response.

Instances

Create Instance
POST

Create a new Instance ID to connect WhatsApp Web.

API endpoint:
https://wonotify.com/api/create_instance?access_token=6881c11f741a1
Parameters:
ParameterTypeRequiredDescription
access_tokenstringYesYour API access token
Example:
curl -X POST 'https://wonotify.com/api/create_instance?access_token=6881c11f741a1'
Reboot Instance
POST

Logout WhatsApp web and do a fresh scan.

API endpoint:
https://wonotify.com/api/reboot?instance_id=609ACF283XXXX&access_token=6881c11f741a1
Parameters:
ParameterTypeRequiredDescription
instance_idstringYesWhatsApp instance ID
access_tokenstringYesYour API access token
Reset Instance
POST

This will logout WhatsApp web, change Instance ID, and delete all old instance data.

API endpoint:
https://wonotify.com/api/reset_instance?instance_id=609ACF283XXXX&access_token=6881c11f741a1
Reconnect
POST

Re-initiate connection from app to WhatsApp web when lost connection.

API endpoint:
https://wonotify.com/api/reconnect?instance_id=609ACF283XXXX&access_token=6881c11f741a1
Logout Instance
POST

Logout from a WhatsApp Web instance.

API endpoint:
https://wonotify.com/api/logout?instance_id=609ACF283XXXX&access_token=EMCUH3NQQK8YXXXX

WhatsApp Login

Get QR Code
POST

Display QR code to login to WhatsApp web. You can get the results returned via Webhook.

API endpoint:
https://wonotify.com/api/get_qrcode?instance_id=609ACF283XXXX&access_token=6881c11f741a1
Parameters:
ParameterTypeRequiredDescription
instance_idstringYesWhatsApp instance ID
access_tokenstringYesYour API access token

Messaging

Send Text Message
POST

Send a text message to a phone number through the app.

Method 1: GET Request:
https://wonotify.com/api/send?number=84933313xxx&type=text&message=test+message&instance_id=609ACF283XXXX&access_token=6881c11f741a1
Method 2: POST Request:
https://wonotify.com/api/send
POST Body Structure:
Content-Type: application/json
{
  "number": "84933313xxx",
  "type": "text",
  "message": "test message",
  "instance_id": "609ACF283XXXX",
  "access_token": "6881c11f741a1"
}
Parameters:
ParameterTypeRequiredDescription
numberstringYesPhone number (without +)
typestringYesMessage type: "text"
messagestringYesText message content
instance_idstringYesWhatsApp instance ID
access_tokenstringYesYour API access token
Send Media & Files
POST

Send a media or file with message to a phone number through the app.

Method 1: GET Request:
https://wonotify.com/api/send?number=84933313xxx&type=media&message=test+message&media_url=https%3A%2F%2Fi.pravatar.cc&filename=file_test.jpg&instance_id=609ACF283XXXX&access_token=6881c11f741a1
Method 2: POST Request:
https://wonotify.com/api/send
POST Body Structure:
Content-Type: application/json
{
  "number": "84933313xxx",
  "type": "media",
  "message": "test message",
  "media_url": "https://i.pravatar.cc",
  "instance_id": "609ACF283XXXX",
  "access_token": "6881c11f741a1"
}
Parameters:
ParameterTypeRequiredDescription
numberstringYesPhone number (without +)
typestringYesMessage type: "media"
messagestringYesCaption for the media
media_urlstringYesURL of the media file
filenamestringNoFilename (for documents: file_test.pdf)
instance_idstringYesWhatsApp instance ID
access_tokenstringYesYour API access token
Send Template Button/List
POST

Send a Template message to a phone number through the app.

API endpoint:
https://wonotify.com/api/send_template?instance_id=609ACF283XXXX&access_token=6881c11f741a1
Interactive Message Structure (Recommended):
Content-Type: application/json
{
  "number": "84933313xxx",
  "type": "interactive",
  "message": {
    "text": "This is an Interactive message!",
    "title": "Test Title",
    "subtitle": "subtitle",
    "footer": "test footer",
    "interactiveButtons": [
      {
        "name": "quick_reply",
        "buttonParamsJson": "{\"display_text\":\"Test\",\"id\":\"685250bce39ca\"}"
      },
      {
        "name": "cta_url",
        "buttonParamsJson": "{\"display_text\":\"Click me!\",\"url\":\"https://baceoin.com\"}"
      },
      {
        "name": "cta_call",
        "buttonParamsJson": "{\"display_text\":\"Call Us\",\"phone_number\":\"+1234567890\"}"
      },
      {
        "name": "cta_copy",
        "buttonParamsJson": "{\"display_text\":\"Copy Code\",\"copy_code\":\"PROMO2024\"}"
      }
    ]
  }
}
Legacy Template Format (Deprecated):
Content-Type: application/json
{
  "number": "84933313xxx",
  "type": "template",
  "message": {
    "text": "This is a template message!",
    "footer": "test footer",
    "templateButtons": [
      {
        "index": 1,
        "quickReplyButton": {
          "displayText": "Test",
          "id": "685250bce39ca"
        }
      }
    ]
  }
}
List Message Structure:
Content-Type: application/json
{
  "number": "84933313xxx",
  "type": "list",
  "message": {
    "text": "hello",
    "footer": "test footer",
    "title": "test title",
    "buttonText": "bay",
    "sections": [
      {
        "title": "hello",
        "rows": [
          {
            "title": "hello",
            "rowId": "685410595972e",
            "description": "hello"
          }
        ]
      }
    ]
  }
}

Groups

Send Group Text
POST

Send a text message to a WhatsApp group.

Method 1: GET Request:
https://wonotify.com/api/send_group?group_id=120363023285171234@g.us&type=text&message=group+message&instance_id=609ACF283XXXX&access_token=6881c11f741a1
Method 2: POST Request:
https://wonotify.com/api/send_group
POST Body Structure:
Content-Type: application/json
{
  "group_id": "120363023285171234@g.us",
  "type": "text",
  "message": "group message",
  "instance_id": "609ACF283XXXX",
  "access_token": "6881c11f741a1"
}
Parameters:
ParameterTypeRequiredDescription
group_idstringYesWhatsApp group ID (ends with @g.us)
typestringYesMessage type: "text"
messagestringYesText message content
instance_idstringYesWhatsApp instance ID
access_tokenstringYesYour API access token
Send Group Media
POST

Send media or files with a caption to a WhatsApp group.

Method 1: GET Request:
https://wonotify.com/api/send_group?group_id=120363023285171234@g.us&type=media&message=group+message&media_url=https%3A%2F%2Fi.pravatar.cc&filename=file_test.jpg&instance_id=609ACF283XXXX&access_token=6881c11f741a1
Method 2: POST Request:
https://wonotify.com/api/send_group
POST Body Structure:
Content-Type: application/json
{
  "group_id": "120363023285171234@g.us",
  "type": "media",
  "message": "group message",
  "media_url": "https://i.pravatar.cc",
  "filename": "file_test.jpg",
  "instance_id": "609ACF283XXXX",
  "access_token": "6881c11f741a1"
}
Parameters:
ParameterTypeRequiredDescription
group_idstringYesWhatsApp group ID (ends with @g.us)
typestringYesMessage type: "media"
messagestringYesCaption for the media
media_urlstringYesURL of the media file
filenamestringNoFilename (for documents: file_test.pdf)
instance_idstringYesWhatsApp instance ID
access_tokenstringYesYour API access token

Webhooks

Set Receiving Webhook
POST

Get all return values from WhatsApp. Like connection status, Incoming message, Outgoing message, Disconnected, Change Battery,...

API endpoint:
https://wonotify.com/api/set_webhook?webhook_url=https%3A%2F%2Fwebhook.site%2F1b25464d6833784f96eef4xxxxxxxxxx&enable=true&instance_id=609ACF283XXXX&access_token=6881c11f741a1
Parameters:
ParameterTypeRequiredDescription
webhook_urlstringYesYour webhook URL (URL encoded)
enablebooleanYesEnable/disable webhook (true/false)
instance_idstringYesWhatsApp instance ID
access_tokenstringYesYour API access token
Webhook Events:
  • message: New incoming message
  • message_status: Message delivery status
  • presence: User online/offline status