Skip to content

Webhooks

When a service can send a webhook but can’t be taught Pocketbell’s API, make a webhook Source in the app. It gets its own URL:

https://api.pocketbell.dev/v1/hooks/pbw_…

Paste it wherever the service asks for a webhook URL. The URL is the secret: keep it private, and replace it in the app if it leaks.

A POST of up to 64 KB, as JSON, a form (application/x-www-form-urlencoded) or plain text. There is nothing to sign and no key to send.

With no template, the notification reads as a summary of the event’s top-level fields: status: down · server: api-2.

Set a title and message template in the app to choose the words yourself. A {{field}} is replaced with that field’s value, and dots reach inside objects and lists:

Template Event Result
{{check.name}} is {{status}} {"check": {"name": "api-2"}, "status": "down"} api-2 is down
First item: {{items.0.id}} {"items": [{"id": "A-17"}]} First item: A-17

A field that isn’t there is left empty. There are no expressions or logic: a field is there, or it isn’t.

While you set up the Source, the app shows the latest event it received and a live preview of the notification, so send one test event first.

Send an Idempotency-Key header, if the service can, and a retried delivery of the same event won’t notify you twice.