Getting started
Create a hook URL for your first source and receive its first event on your machine.
briefkasten receives webhooks for you, checks their signatures, keeps every event for a few days, and hands the events to your servers and agents. Your side connects out to collect them, so it needs no public address.
1. Sign in
Install the CLI, then sign in with your email address. You get a code by mail; there is no password.
npm install -g @briefkasten/cli
briefkasten login you@example.comThe first sign-in creates your account; the CLI asks you to accept the terms of use and the privacy policy first (--accept-terms in scripts). On a machine without a browser this works the same. For CI, use a token instead: see the CLI.
2. Create a project and a source
A project groups the webhook senders of one app. A source is one sender, with its own hook URL and secret.
briefkasten project add acme-shop
briefkasten source add github --project acme-shopThe second command prints the source's hook URL and its secret, once:
✓ created acme-shop/github: paste into GitHub → Webhooks
https://briefkasten-inbox.example/t/t_4k2m9q/hooks/acme-shop/github
whsec_9fK2wQ7dLx… (the secret is shown once)Paste both into the provider's webhook settings. Each adapter's page says where: GitHub, Linear, Sentry and more.
3. Send a test event
You don't have to wait for the provider. A test event is a realistic sample, signed like the real thing, that goes through verification and delivery like any other event:
briefkasten source test github --project acme-shop --event pull_request.opened4. Receive the events on your machine
Follow them in a terminal:
briefkasten events --follow --project acme-shopOr receive them in your app with the SDK, over a WebSocket your app opens:
import { connect } from "briefkasten";
const inbox = connect({
url: "https://briefkasten.example",
token: process.env.BRIEFKASTEN_TOKEN,
});
inbox.on("github:pull_request.opened", async (event) => {
console.log(event.body);
});If your app is offline for a while, it gets everything it missed when it reconnects, in order. Events are kept for three days on the free plan.
Next steps
- Ways to receive events: the CLI, the SDK connected from your app, or the SDK handling webhooks inside your app.
- Concepts: projects, sources, routes, subscribers and events.
- The HTTP API and MCP, for scripts and agents.