Webhook

Splitbee allows you to call webhooks when a user does a specific action. This is useful to trigger internal logic or to connect Splitbee to other services like Zapier or Slack.

How to create a Webhook action

To get started, create new automation and select an event that triggers the automation.

Then, add a new Webhook Action and enter the endpoint of your server. This endpoint will receive a POST request with the payload described below, every time the event is fired.

You attach custom data as well, which will be included as payload. This is helpful to differentiate between multiple webhooks.

Example Webhook Action
Example Webhook Action

Webhook Payload

This is an example of the POST payload the webhook receives.

{
"payload": "", // Data defined in the action
"user": {
"id": "ff4afofe54nbdg4i8l4jacblmk6moj",
"userId": "[email protected]",
"country": "US",
"deviceType": "desktop",
"browser": "Chrome",
"data": {},
"createdAt": "2020-08-16T18:44:43.878Z",
"lastSeen": "2020-08-16T19:31:35.806Z"
},
"trigger": {
"type": "event", // event or pageView
"event": "Select Range", // the selected event from trigger
"data": {} // custom event data
}
}