Skip to main content

Webhooks

Webhooks are a way to receive notifications about things that happened in seats.io.

Why webhooks?

Webhooks allow you to react to changes that your users made through the chart designer and the event manager. E.g. when someone updates a chart, a webhook gets fired, and you can use our API to sync the categories.

There used to be only a client-side solution for that: pass in onChartUpdated to the designer, after which you would do a REST call to your server. Or use onSubmitSucceeded for the event manager.

But this is not ideal, since it's the browser communicating with your server. If the network connection is flaky, the REST call might not reach the server at all.

Also, you don't receive notifications when the user is working directly on https://app.seats.io instead of on your own website.

Webhooks solve both these issues.

Enabling webhooks

  1. Webhooks are currently available as a beta feature. Get in touch if you'd like to try them.
  2. On your company settings page, you'll find a link to the webhooks dashboard.
  3. On the dashboard, specify the endpoint on your server that will receive webhook events.

Security

We use Svix to deliver webhooks. Please refer to their docs for instructions on how to verify invocations.

It is important to ensure the events you receive were sent by seats.io to maintain the security of your system.

Polling the API for events

If you prefer periodically polling our API for new events, check out our event log documentation.

Supported webhook event types

Charts

  • chart.created: a new chart was created
  • chart.published:
    • a draft chart version was published
    • a chart was saved (and there are no events yet)
    • a chart was saved (and drafts are disabled on your account)

Payload

{
"id": 169,
"type": "chart.created",
"timestamp": "2024-01-10T10:03:02.147433Z",
"data": {
"workspaceKey": "<workspace key>",
"key": "<chart key>"
}
}

Events

  • event.for.sale.config.updated: some objects were made not for sale (or for sale)
  • event.channels.updated: channels were added or removed, or the objects assigned to the channels changed
  • event.categories.updated: objects were assigned to a category for the event
  • event.table.booking.config.updated: the table booking config changed

Payload

{
"id": 169,
"type": "event.for.sale.config.updated",
"timestamp": "2024-01-10T10:03:02.147433Z",
"data": {
"workspaceKey": "<workspace key>",
"key": "<event key>"
}
}