POST
/
whatsapp_configs
/
{whatsapp_config_id}
/
whatsapp_webhooks
Create a WhatsApp webhook
curl --request POST \
  --url https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id}/whatsapp_webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "whatsapp_webhook": {
    "url": "https://example.com/webhook",
    "secret_key": "your-secret-key-here",
    "events": [
      "messages",
      "status_updates",
      "templates"
    ],
    "active": true,
    "headers": {
      "X-Custom-Header": "custom-value"
    },
    "retry_config": {
      "max_attempts": 3,
      "backoff_seconds": 60
    }
  }
}'
{
  "data": {
    "id": "webhook-123abc",
    "url": "https://example.com/webhook",
    "secret_key": "your-secret-key",
    "events": [
      "messages",
      "status_updates",
      "templates"
    ],
    "active": true,
    "headers": {
      "X-Custom-Header": "custom-value"
    },
    "retry_config": {
      "max_attempts": 3,
      "backoff_seconds": 60
    },
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

API key required for all endpoints

Path Parameters

whatsapp_config_id
string
required

Body

application/json

Response

201
application/json

Webhook created successfully

The response is of type object.