Skip to content
briefkastencloud

Concepts

Tenants, projects, sources, routes, subscribers and events, and how long events are kept.

Tenants

Every account has one tenant: its own space on the gateway, with its own config, secrets, limits and events. A token only ever sees its own tenant's events. Hook URLs carry the tenant id: https://briefkasten-inbox.example/t/t_4k2m9q/….

Projects

A project groups the sources of one app or team, and its routes. Names are lower-case letters, digits and dashes: acme-shop.

Every account has the project default. It exists from the start, cannot be deleted, and is the one a command or an API call acts on when it names no project: briefkasten source add github adds the source to default. Its hook URLs name it like any other project's: …/t/<tenant>/hooks/default/<source>. Commands that read across projects (briefkasten events, briefkasten listen, a subscriber token) read every project when they name none.

Sources

A source is one webhook sender: a GitHub organisation, a Linear workspace, a Sentry integration. Each has

  • an adapter, which knows the provider's signature scheme and event names (GitHub, Linear, …, or generic for anything else);
  • a hook URL, …/t/<tenant>/hooks/<project>/<source>, to paste into the provider;
  • a secret, generated by briefkasten (shown once) or made by the provider and pasted in.

A delivery whose signature doesn't check out is refused with the reason, logged for you, and never delivered.

Events

Each verified delivery becomes an event:

{
  "id": "evt_00mx96rsq00001",
  "tenant": "t_4k2m9q",
  "project": "acme-shop",
  "adapter": "github",
  "source": "github",
  "target": "acme/shop",
  "event": "pull_request.opened",
  "at": "2026-12-04T12:00:00.000Z",
  "body": { "action": "opened", "number": 42 }
}

The target is what the event is about: a repository, a Linear team, a Sentry project. Together the parts make the event's address, which filters and routes match with globs:

<project>:<adapter>:<source>:<target>:<event>
acme-shop:github:github:acme/shop:pull_request.opened

* matches one part, ** any number of them (a target can contain :).

Subscribers

A subscriber is a server, a laptop, a CI job or an agent that receives events, with a subscriber token. A token can be limited to one project and to address globs. Subscribers connect out, over a WebSocket or SSE, and get events in milliseconds.

Routes

Routes decide which subscriber gets which events of a project. Each route has a match (globs for source, event and target) and the subscribers it goes to:

{
  "routes": [
    { "match": { "source": "github", "event": "pull_request.*" }, "to": ["review-bot"] },
    { "match": { "event": "issue.*" }, "to": ["my-server"] }
  ]
}

Without routes, every subscriber gets every event it may see.

Retention and catch-up

Events are kept for the plan's retention, three days on the free plan, then deleted. Ids sort by time: a subscriber that was offline reconnects with the last id it saw (since) and gets everything after it, in order. Delivery is at least once, so an event can arrive twice; its id never changes.

Every event can be opened (headers, body, verification, delivery attempts) and redelivered, to all subscribers or one, while it is kept.

Test events

A test event is a realistic sample of an adapter, signed with the source's real secret, sent through verification, routing and delivery like a provider's delivery, and marked test: true. Send one from a source's row in the dashboard, with briefkasten source test, or with POST /api/v1/projects/{project}/sources/{source}/test. Each adapter's page lists its samples.

Limits

Free plan
Events100,000 a month
Sources20
Subscribers10
Retention3 days
Rate600 a minute per source

Over the monthly budget, providers get a 429 with a reason. At the source or subscriber limit, the API answers plan_limit.