Authorizations
Path Parameters
Body
application/json
Response
Created
curl --request POST \
--url https://api.kapso.ai/platform/v1/whatsapp/phone_numbers/{phone_number_id}/webhooks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"whatsapp_webhook": {
"url": "https://api.acme.com/webhooks/whatsapp",
"secret_key": "wh_sec_3kfj9dmfkg8s2",
"events": [
"whatsapp.message.received",
"whatsapp.message.sent"
],
"active": true
}
}'{
"data": {
"id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8f7e6d5c4b",
"url": "https://api.acme.com/webhooks/whatsapp",
"events": [
"whatsapp.message.received",
"whatsapp.message.sent"
],
"active": true,
"secret_key": "wh_sec_3kfj9dmfkg8s2",
"headers": {
"X-Webhook-Source": "kapso"
},
"buffer_enabled": false,
"buffer_window_seconds": null,
"max_buffer_size": null,
"buffer_events": [],
"inactivity_minutes": 60,
"project_id": "1d6ca0a3-91c2-4f13-8a94-28ddb0d5f2f3",
"whatsapp_config_id": "4a5b6c7d-8e9f-0a1b-2c3d-4e5f6a7b8c9d",
"created_at": "2025-07-14T15:00:00Z",
"updated_at": "2025-07-14T15:00:00Z"
}
}Subscribe to WhatsApp events for this number.
Use buffering to batch high-volume events like inbound messages. Without buffering, each message triggers an immediate webhook delivery.
curl --request POST \
--url https://api.kapso.ai/platform/v1/whatsapp/phone_numbers/{phone_number_id}/webhooks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"whatsapp_webhook": {
"url": "https://api.acme.com/webhooks/whatsapp",
"secret_key": "wh_sec_3kfj9dmfkg8s2",
"events": [
"whatsapp.message.received",
"whatsapp.message.sent"
],
"active": true
}
}'{
"data": {
"id": "9e8d7c6b-5a4f-3e2d-1c0b-9a8f7e6d5c4b",
"url": "https://api.acme.com/webhooks/whatsapp",
"events": [
"whatsapp.message.received",
"whatsapp.message.sent"
],
"active": true,
"secret_key": "wh_sec_3kfj9dmfkg8s2",
"headers": {
"X-Webhook-Source": "kapso"
},
"buffer_enabled": false,
"buffer_window_seconds": null,
"max_buffer_size": null,
"buffer_events": [],
"inactivity_minutes": 60,
"project_id": "1d6ca0a3-91c2-4f13-8a94-28ddb0d5f2f3",
"whatsapp_config_id": "4a5b6c7d-8e9f-0a1b-2c3d-4e5f6a7b8c9d",
"created_at": "2025-07-14T15:00:00Z",
"updated_at": "2025-07-14T15:00:00Z"
}
}Show child attributes
Created
Show child attributes
Was this page helpful?