Skip to main content
A webhook is a POST request that Tightknit sends to a URL you choose when something happens in your community, such as a member registering for an event. The URL can be your own API or a service like a Zapier webhook trigger, so you can use webhooks to start an external process. Manage webhooks in the webhooks portal in Tightknit Studio.

Add an endpoint

Add a URL you control and select the event types to receive. If you don’t select any event types, your endpoint receives all events. That helps while you get started and test, but narrow the endpoint to the event types you need afterwards to avoid receiving extra messages. If you don’t have an endpoint ready yet, select “with Svix Play” to generate a unique testing URL. You can view and inspect the webhooks sent to your Svix Play URL.
If your framework enables CSRF protection by default, disable it for your webhook endpoint.

Test an endpoint

Use the “Testing” tab to send test events to your endpoint. Select a sent event to view its message payload, all of its delivery attempts, and whether each succeeded or failed.
To count as successful, the endpoint must respond with a 2xx status code (200 to 299) within a reasonable time frame (15s).

IDs in payloads

Payloads carry each object’s Admin API v1 ID next to the ID they have always carried. Store the v1 IDs to look the objects up with the v1 API:

Verify webhooks

Webhook signatures let you verify that a webhook message was sent by Tightknit and not a malicious actor. Tightknit’s webhook partner, Svix, explains why you should verify webhooks and how to verify them.

Retries

If a delivery fails, Tightknit retries the message on a schedule with exponential backoff. Each period starts after the preceding attempt fails:
  • Immediately
  • 5 seconds
  • 5 minutes
  • 30 minutes
  • 2 hours
  • 5 hours
  • 10 hours
  • 10 hours (in addition to the previous)
For example, a message that fails three times before succeeding is delivered roughly 35 minutes and 5 seconds after the first attempt. If you remove or disable an endpoint, delivery attempts to that endpoint stop as well.
You can also use the webhooks portal to retry any message manually at any time, or to retry (“Recover”) all failed messages from a given date.

Troubleshooting

The most common cause is not using the raw request body. Tightknit signs the raw string body of the message. If you parse the JSON and convert it back to a string, for example with JSON.stringify, the result can differ from the original, and the signature won’t match. Verify the body exactly as it was sent, byte for byte.
Tightknit treats any 2xx response as a successful delivery, even if the response body reports a failure. Return a non-2xx status code when your endpoint fails to process a message.
A message that doesn’t receive a response in time counts as failed. If your endpoint runs long processing before it responds, have it add the message to a queue to process asynchronously, and respond right away.