Webhooks

Receive a webhook every time a booking transitions into a new state

With Timekit webhooks, you can be notified as bookings move through different states in the booking engine. Just tell Timekit which states are important for your application and we'll let you know.
For each flows relevant states, please see the relevant graph Booking flows

Setting up webhooks

Webhooks are configured on an app level. As an example, we can setup a webhook that notifies us when a new booking is created or when a booking has timed out because the payment didn't go through for some reason. There are endless use cases for webhooks.

You setup webhooks through our admin panel:
https://admin.timekit.io/a/webhooks

🚧

If you can't spot the "Webhooks" tab in the admin panel, just enable Developer Mode in the profile dropdown.

You can setup as many webhooks as you want for different graphs and different actions.

Webhook payloads

When a webhook is triggered, the payload of the request looks similar to the JSON response you get when calling the /bookings/:id endpoint. It includes the booking, calendar, customer and event resources:

{
  "id": "c3c071de-6901-422f-bde6-86f5eaaf8476",
  "state": "confirmed",
  "graph": "instant",
  "completed": false,
  "created_at": "2016-11-24T13:34:54+0100",
  "updated_at": "2016-11-24T13:34:54+0100",
  "customers": [
    {
      "id": "65edeffb-410d-4286-9591-27548a9f31a2",
      "name": "Marty McFly",
      "email": "[email protected]",
      "phone": "",
      "voip": "",
      "timezone": "Europe\/Copenhagen",
      "meta": "{}"
    }
  ],
  "event": {
    "id": "bb1817fe-8dd6-4bfc-8606-a36a5871a82b",
    "what": "what",
    "where": "where",
    "description": "",
    "rsvp": "accepted",
    "allDay": false,
    "start": "2016-01-01T10:00:00+0100",
    "end": "2016-01-01T11:00:00+0100",
    "created_at": "2016-11-24T13:34:54+0100",
    "updated_at": "2016-11-24T13:34:54+0100"
  },
  "calendar": {
    "id": "d3bbcb33-2551-4806-8330-ecdec85c0c83",
    "provider_id": "provider_id",
    "provider_access": "owner",
    "provider_primary": false,
    "provider_sync": false,
    "name": "Quia nostrum voluptas quae aspernatur.",
    "description": "Quis et nam dolor recusandae ut eos.",
    "foregroundcolor": "#d9bfef",
    "backgroundcolor": "#22273e",
    "created_at": "2016-11-17T11:06:43+0100",
    "updated_at": "2016-11-17T11:06:43+0100"
  }
}

Testing webhooks

An easy way to test and inspect the webhook payload we send is to use a service like requestb.in - it allows you to quickly create a HTTP endpoint that you can give us and then inspect all requests made to it, straight from your browser!


At this point, if you have any questions about how to set up webhooks for your bookings, don't hesitate to hit us up on the chat.