curl --location 'https://api.weya.live/backend/api/whatsapp/update-whatsapp-webhook' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"token": "YOUR_AISENSY_API_TOKEN"
}'
{
"status": true,
"code": 200,
"message": "Webhook updated successfully!",
"errorMessage": null,
"data": {}
}
WhatsApp
Update WhatsApp Webhook
Point your AiSensy account’s webhook at Weya.
POST
/
api
/
whatsapp
/
update-whatsapp-webhook
curl --location 'https://api.weya.live/backend/api/whatsapp/update-whatsapp-webhook' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"token": "YOUR_AISENSY_API_TOKEN"
}'
{
"status": true,
"code": 200,
"message": "Webhook updated successfully!",
"errorMessage": null,
"data": {}
}
Overview
Set the webhook of your AiSensy account to Weya’s WhatsApp webhook address, so incoming WhatsApp messages and events reach Weya. You can’t choose the address: it is always Weya’s. Assigning an agent with Assign Agent to WhatsApp Number already sets the webhook up, so you only need this endpoint to repair it.Prerequisites
- An API key for your workspace
- Your AiSensy API token
Request
curl --location 'https://api.weya.live/backend/api/whatsapp/update-whatsapp-webhook' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"token": "YOUR_AISENSY_API_TOKEN"
}'
Response
{
"status": true,
"code": 200,
"message": "Webhook updated successfully!",
"errorMessage": null,
"data": {}
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
token is required, or AiSensy rejected the token. - 401 Unauthorized – Missing or invalid API key.
- 429 Too Many Requests – More than 1,000 WhatsApp requests in 15 minutes from your IP address.
- 500 Internal Server Error – Unexpected server error, or AiSensy couldn’t be reached.
Was this page helpful?

