Documentation ›
Status webhook › Status webhook — WhatsApp Meta
POST
Status webhook — WhatsApp Meta
POSThttps://app.sendapp.ai/api/whatsapp-meta/set_webhook
Register (POST) a URL on your server to receive Meta message status events (sent, delivered, read, failed) and inbound events in real time. Each Meta webhook event is forwarded as-is to your URL via HTTP POST. Use DELETE to remove the registered webhook.
Your server must respond with HTTP 200 within 5 seconds. Errors on your endpoint are silently ignored.
Parameters
apikey
required
Your API Key.
token
required
Account token.
url
optional
Your server URL (HTTPS). Not needed for DELETE.
Request
# Register the webhook
curl -X POST 'https://app.sendapp.ai/api/whatsapp-meta/set_webhook' \
-H 'Content-Type: application/json' \
-d '{ "apikey": "YOUR_API_KEY", "token": "YOUR_ACCOUNT_TOKEN", "url": "https://your-server.com/webhook" }'
# Remove the webhook
curl -X DELETE 'https://app.sendapp.ai/api/whatsapp-meta/set_webhook' \
-H 'Content-Type: application/json' \
-d '{ "apikey": "YOUR_API_KEY", "token": "YOUR_ACCOUNT_TOKEN" }'<?php
// Register the webhook
$ch = curl_init('https://app.sendapp.ai/api/whatsapp-meta/set_webhook');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'apikey' => 'YOUR_API_KEY',
'token' => 'YOUR_ACCOUNT_TOKEN',
'url' => 'https://your-server.com/webhook',
]),
]);
echo curl_exec($ch);
curl_close($ch);// Register the webhook
const res = await fetch('https://app.sendapp.ai/api/whatsapp-meta/set_webhook', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
apikey: 'YOUR_API_KEY',
token: 'YOUR_ACCOUNT_TOKEN',
url: 'https://your-server.com/webhook'
})
});
console.log(await res.json());Response (200 OK)
{
"status": "success",
"message": "Webhook URL saved successfully."
}Error
{
"status": "error",
"message": "Instance not found"
}