Webhooks allow third party app developers to tune in to the event feed from a Speckle Server. This enables you to build systems that trigger custom workflows whenever data is pushed to a Speckle Stream.

For example, you could build an application that for each commit created creates a cost estimate of the building and inform the user in real time of their design's value performance. Alternatively, you could run a workflow that identifies all the steel beams and produces a Bill of Materials ready to be shared with the manufacturer. Want to run a clash detection algorithm? Why not! Create PDF reports based on all the model's rooms? Sure can do. Create a custom schedule? Easy! Trigger a manufacturing workflow? Game on!

We are very excited: webhooks open up a whole new chapter in the types of applications you can build on top of Speckle.

Check out the docs below to learn how to create your first webhook manually or via the API:

Webhooks | Speckle Docs
Documentation on everything Speckle

For a more detailed example of receiving and processing webhooks, have a look at our tutorial for building a simple Discord Bot:

Use Stream Webhooks To Build a Discord Bot
Build a simple Discord integration that will send notifications when stream events occur on your Speckle Server - and learn how to use Speckle’s webhooks in the process!

FAQs

Q: Why not use just the GraphQL subscriptions?

A: While for subscriptions you need to be actively listening all the time, webhooks deliver events on demand - this has a net benefit for your application, as you do not need to keep a connection open all the time. Moreover, webhooks have a stronger guarantee of reaching your endpoints, with an exponential decay timeout.

Q: How does a user add a webhook?

A: Either manually through the web ui, or the third party app will register its required hooks for you!

Q: Can my application register webhooks dynamically?

A: Yes - but you'll need to first request the "webhook:create" permission from the end user.

Q: Can I report the results of my workflow back in Speckle?

A: Not at the moment, but this is in the pipeline as a future improvement.

Q: Can I manually add webhooks?

A: Of course - just head over to the stream's event settings page and specify an endpoint.

Q: What events types do you support?

A: We're keeping them aligned with the GraphQL Subscription events. These include: stream created/updated/deleted, commit created/updated/deleted, branch created/updated/deleted. As we integrate more features into Speckle, such as issues, we will make events around them accessible too.