An HTTP POST message is used to push relevant booking or conversation data to the Webhook URL, and is triggered whenever the defined lifecycle event occurs. The data is sent as JSON key-value pairs (KVPs) to your receiving server when a booking lifecycle event occurs in your OnceHub account. For example, you can create a Webhook that sends customer details whenever a new booking is scheduled.
Managing your Webhooks
Webhook subscriptions can be created, deleted, and retrieved via the Webhooks API. You can also view and delete your Webhooks from the API Integration page
Webhook event triggers
Booking lifecycle events
When you create a Webhook subscription, you must define the set of events that will trigger POST messages to your URL endpoint. These events represent the booking lifecycle scenarios you wish to receive notifications about.
Specific and composite event triggers
- Specific triggers are based on an individual event (e.g. a booking is scheduled, or a booking is canceled, or a conversation is closed).
- The composite
booking
event trigger includes all of the booking lifecycle event triggers.
Specific booking event triggersbooking.scheduled
booking.rescheduled
booking.canceled_then_rescheduled
booking.canceled_reschedule_requested
booking.canceled
booking.completed
booking.no_show
Specific conversation event triggersconversation.reached_out
conversation.started
conversation.closed
conversation.abandoned
Composite booking event triggersbooking
(includes all of the specific booking event triggers listed above)
Managing Webhook subscriptions via the API
The Webhook API allows you to create, retrieve, and delete your Webhook subscriptions.
Create a webhook
POST: https://api.oncehub.com/v2/webhooks
Creates a webhook subscription.
Input parameters
When creating the webhook, you should provide
- a
name
- a
url
for receiving POST messages - an array of
events
in the request body.
You may specify specific booking lifecycle events you wish to subscribe to, or you can pass the booking
event to trigger the POST payload message whenever any of the supported booking lifecycle events occurs.
Make sure that you pass the full URL. For security reasons, only HTTPS URLs are accepted.
Returns the webhook object if the call succeeded. Returns an error if something goes wrong.
https://developers.oncehub.com/reference/create-a-webhook
Leave a Reply