curl --request POST \
--url https://api.kapso.ai/platform/v1/whatsapp/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.config.created",
"whatsapp.config.deleted"
]
}
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"kind": "kapso",
"events": [
"<string>"
],
"active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number_id": "<string>",
"secret_key": "<string>",
"headers": {},
"buffer_enabled": true,
"buffer_window_seconds": 123,
"max_buffer_size": 123,
"buffer_events": [
"<string>"
],
"inactivity_minutes": 123,
"payload_version": "<string>"
}
}Create a webhook for WhatsApp events.
Two scoping options:
phone_number_id to receive events from all phone numbersphone_number_id to scope to a specific numberTwo webhook types:
curl --request POST \
--url https://api.kapso.ai/platform/v1/whatsapp/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.config.created",
"whatsapp.config.deleted"
]
}
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>",
"kind": "kapso",
"events": [
"<string>"
],
"active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"phone_number_id": "<string>",
"secret_key": "<string>",
"headers": {},
"buffer_enabled": true,
"buffer_window_seconds": 123,
"max_buffer_size": 123,
"buffer_events": [
"<string>"
],
"inactivity_minutes": 123,
"payload_version": "<string>"
}
}Was this page helpful?