Webhooks are automatically enabled by the existence of the
SVIX_TOKEN
environment variable.How it works
JTBDOS uses the Svix API in a stateless manner. The organization ID from the authenticated user is used as the Svix application UID, which is created automatically when the first message is sent.Usage
Send a webhook
To send a webhook, simply use thesend
function from the @repo/webhooks
package:
Add webhook endpoints
Svix provides a pre-built consumer application portal, where users add endpoints and manage everything related to their webhooks subscriptions. App portal access is based on short-lived sessions using special magic links, and can be embed in an iframe in your dashboard. To get access to the application portal, use thegetAppPortal
function from @repo/webhooks
and use the returned URL in an iframe
on your dashboard.
/webhooks
that you can use as a starting point.