Webhooks
Receive real-time HTTP notifications when events happen in your BeeCastly account.
Available Events
message.sentA message was sent successfullymessage.deliveredA message was delivered to the recipientmessage.readA message was read by the recipientmessage.failedA message delivery failedmessage.receivedAn inbound message was receivedcontact.createdA new contact was createdcontact.updatedA contact was updatedcampaign.sentA campaign finished sendingcampaign.completedAll delivery reports received for a campaignform.submittedA form submission was receivedpayment.receivedA payment was received on an invoiceWebhook Payload
POST https://your-server.com/webhooks/beecastly
Content-Type: application/json
X-BeeCastly-Signature: sha256=abc123...
{
"event": "message.delivered",
"timestamp": "2025-03-26T10:00:00Z",
"data": {
"messageId": "msg_abc123",
"conversationId": "conv_def456",
"contactId": "contact_ghi789",
"channel": "WHATSAPP",
"status": "DELIVERED",
"deliveredAt": "2025-03-26T10:00:00Z"
}
}Setup
- Go to Settings → Webhooks (or use the API)
- Add your endpoint URL (must be HTTPS)
- Select which events to subscribe to
- Save — BeeCastly will send a test ping to verify your endpoint
- Your endpoint should return
200 OKwithin 5 seconds
Signature Verification
Every webhook includes an X-BeeCastly-Signature header for verification.
Compute HMAC-SHA256(webhook_secret, request_body) and compare with the header value.
// Node.js verification example
const crypto = require('crypto');
function verifyWebhook(body, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(body)
.digest('hex');
return `sha256=${expected}` === signature;
}Retry Policy
If your endpoint returns a non-2xx status, BeeCastly will retry up to 3 times with exponential backoff (1min, 5min, 30min). After 3 failures, the webhook is paused.