@shortcut/client
    Preparing search index...

    Class ShortcutWebhookClient

    Verifies Shortcut webhook requests and dispatches them to typed handlers.

    const webhooks = new ShortcutWebhookClient(process.env.WEBHOOK_SECRET);
    const handler = webhooks.createHandler();
    handler.on('mentioned', async (payload) => { ... });
    export default { fetch: handler };
    Index

    Constructors

    Methods

    • Creates a request handler for Fetch runtimes ((request) => Response) and Node.js HTTP ((req, res) => void). Register handlers with .on(). Every verified delivery is acknowledged with 200 once its handlers settle; a throwing handler yields 500, which Shortcut retries.

      Returns ShortcutWebhookHandler