Webhook

On this page you will learn about webhook configuration.

"A webhook in web development is a method of augmenting or altering the behavior of a web page, or web application, with custom callbacks. These callbacks may be maintained, modified, and managed by third-party users and developers who may not necessarily be affiliated with the originating website or application." Wikipedia

You can setup webhook configuration with REST API.

Setup Webhook URL

POST https://api.wapim.io/api/v1/whatsapp/webhook

Headers

NameTypeDescription

Token*

YOUR_WAPIM_TOKEN

Request Body

NameTypeDescription

webhook_url*

String

https://CALLBACK_URL

{
    "status": true,
    "code": 200,
    "data": {
        "webhook_url": "https://webhook.site/904cf34c-****"
    }
}

Let's fetch the active webhook url;

Get Webhook URL

GET https://api.wapim.io/api/v1/whatsapp/webhook

Headers

NameTypeDescription

Token*

YOUR_WAPIM_TOKEN

{
    "status": true,
    "code": 200,
    "data": {
        "webhook_url": "https://webhook.site/904cf34c-****"
    }
}
curl
    -X GET https://api.wapim.io/api/v1/whatsapp/webhook
    -H 'Token: YOUR_WAPIM_TOKEN'

Last updated