Skip to main content
close
Font size options
Increase or decrease the font size for this website by clicking on the 'A's.
Contrast options
Choose a color combination to give the most comfortable contrast.

Webhooks 

You can use webhooks to receive a notification when an action is performed within Communico, for example when an event is created or updated or when an appointment is created, updated or cancelled. 

How it works

An HTTP POST is submitted to each subscription URL with relevant data, in JSON format, when a hook is triggered.

Payloads contain different data depending on the hook being triggered but all are arranged in the following format.


Processing and order

Hooks are batched and processed every 5 seconds, ordering is not guaranteed and the time stamp should be checked by the subscription handler.

Usage limits

There is no limit to the number of subscriptions or hooks that can be created but creating a large amount of subscriptions to the same hook can result in a delay.

Failed subscriptions

If a subscription fails, such as the URL being unavailable, retries are not made. If a URL consistently fails it may be grey listed for a short period of time, start at 1 minute and doubling each time until 1 day is reached.

Creating webhook subscriptions

New webhook subscriptions can be added via the control panel under Settings.

1. Click the Webhooks setting and then click the   new webhook button.


2. Give the webhook a name.

3. Enter the url the notification will be sent to.

4. Select the hooks you want in the subscription. (You can add multiple hooks in the same subscription).

5. Save the webhook.


Available hooks

Below is a table of the currently available hooks and their payloads. The id, recurringId or eventId may be used in conjunction with the Communico API to pull new or updated details about the appointment, room booking or event.


eventAdded

Called when an event is added

{

recurringId: Integer

}

eventSeriesCanceled Called when a whole event series is canceled

{

recurringId: Integer,

reason: String

}

eventCanceled Called when a single event or a single date in a series is canceled

{

eventId: Integer,

reason: String

}

eventSeriesDeleted Called when a whole event series is deleted

{

recurringId: Integer

}

eventDeleted Called when a single event or a single date in a series is deleted

{

eventId: Integer,

}

eventSeriesStatusChanged Called each time an events status is changed, for example when an event is submitted for review or when an event is published

{

recurringId: Integer,

newStatus: String

}

eventRescheduled Called when an event is rescheduled

{

oldEventId: Integer,

newEventId: Integer,

reason: String

}

userRegisteredForEvent Called when a user registers for an event

{

registrationId: Integer,

eventId: Integer

}

roomBookingNoShow Called when a room booking is marked no show

{

bookingId: Integer

}

roomBookingCreated Called when a room booking is created

{

bookingId: Integer

}

roomBookingUpdated Called when a room booking is updated

{

bookingId: Integer

}

roomBookingDeleted Called when a room booking is deleted

{

bookingId: Integer

}

roomBookingStatusChanged Called when the status is changed on a room booking

{

bookingId: Integer,

status: String,

statusText: String

}

appointmentCreated Called when a new appointment is created

{

Id: Integer

}

appointmentUpdated Called when an existing appointment is updated

{

Id: Integer

}

appointmentCancelled Called when an appointment is cancelled

{

Id: Integer

}