Introduction
Webhooks are how services notify each other of events. At its core, a webhook is simply a POST request to a pre-determined endpoint. The endpoint can be any URL you want, such as a Zapier webhook trigger or your own API. You can use Tightknit’s webhooks to tell inform another service that something has happened, such as a user registering for a Calendar Event, in order to trigger an external process. Webhooks can be managed through the webhooks portal, which you can access through the Webhooks module.Adding an Endpoint
Adding an endpoint is as simple as providing a URL that you control and selecting the event types that you want to listen to. If you don’t specify any event types, by default, your endpoint will receive all events, regardless of type. While this is helpful for getting started and for testing, we recommend changing this later on to the minimum required subset of events in order to avoid receiving extraneous messages. If you don’t have an endpoint ready yet, you can press the “with Svix Play” button to have a unique testing URL generated for you. You’ll be able to view and inspect webhooks sent to your Svix Play URL, making it effortless to get started.It’s important to disable CSRF protection for your endpoint if the framework
you use enables them by default.
Testing endpoints
Once you’ve added an endpoint, you’ll want to make sure its working. The “Testing” tab lets you send test events to your endpoint. After sending an example event, you can click into the message to view the message payload, all of the message attempts, and whether it succeeded or failed.If successful, the endpoint is expected to respond with with a 2xx (status
code 200-299) response within a reasonable time-frame (15s).
Verifying Webhooks
Webhook signatures let you verify that webhook messages are actually sent by Tightknit and not a malicious actor. For a more detailed explanation, check out this article on why you should verify webhooks. Our webhook partner Svix offers a set of useful guides that make verifying webhooks very simple. Check it out here: https://docs.svix.com/receiving/verifying-payloads/howRetries
If a webhook message delivery results in failure, messages are sent based on a retry schedule with exponential backoff. Each message is attempted based on the following schedule, where each period is started following the failure of the preceding attempt:- Immediately
- 5 seconds
- 5 minutes
- 30 minutes
- 2 hours
- 5 hours
- 10 hours
- 10 hours (in addition to the previous)
Manual Retries
You can also use the webhooks portal to manually retry each message at any time, or automatically retry (“Recover”) all failed messages starting from a given date.
You can also use the webhooks portal to manually retry each message at any time, or automatically retry (“Recover”) all failed messages starting from a given date.