Webhooks
The host listens on 127.0.0.1:<port>, with the port in webhook.json (47811 by default, falling back if taken).
Every request needs the header Authorization: Bearer <token>. Browsers can’t send that header cross-origin
without a preflight, and the server never answers preflights, so web pages can’t reach it.
| Route | Body | Effect |
|---|---|---|
GET /v1/health |
none | {ok: true, version} |
POST /v1/blips |
a payload, or an array of payloads | Pushed straight into the store as source webhook. An id without a / gets the webhook/ prefix (a missing one is made from the title: webhook/hello-blipbar), and a missing seq is stamped. All or nothing: one bad payload is a 400 naming it and its field ({"error": "invalid payload at [1]: \"data.value.amount\" should be a number"}). ?from=<name> says who it’s from, shown beside the camera and in its drop-down instead of “Webhook” (at most 40 characters; Claude Code, Codex and Cursor lend their own icon and colour). |
POST /v1/blips?await=<seconds> |
one payload with buttons | A question: the response is held (at most 600 seconds) until one of its buttons is pressed, then 200 {"id", "action", "label", "input"?} (input is what was typed into a "text" button), and the blip leaves the notch. No press in time: 204, and it leaves. Ended, removed, dismissed or asked again under the same id meanwhile: 410 {"error": "gone"}. Hanging up takes it out of the notch too. It needs a button that can answer: one without url or copy. |
POST /v1/blips/<id>/end |
{state?, dismissAfter?} |
ends the blip |
DELETE /v1/blips/<id> |
none | removes the blip |
POST /v1/hooks/<extension-id> |
any JSON | → extension.event {type: "webhook"}. With ?await=<seconds> (at most 600), the response is held until the extension calls ctx.respond(...) or the wait runs out (then 204). This is how “approve from the notch” works for agent permission hooks. |
webhook.json lives in ~/Library/Application Support/Blipbar/. Blipbar writes a new token each
time it launches, so read the file on every run instead of copying the token.
A pushed blip needs a title, a layout and that layout’s data, the same shapes the SDK’s
builders make. v, emittedAt and seq are filled in when they’re left out. Post the same id
again to update it. The end and DELETE routes take the id either way (backup or
webhook/backup). While the notch is open, a pushed blip shows at the end of the
panel.
config=~/Library/Application\ Support/Blipbar/webhook.jsonport=$(plutil -extract port raw -o - "$config")token=$(plutil -extract token raw -o - "$config")
# Show a backup running, 40% through. Post again with the same id to move it on.curl -s "http://127.0.0.1:$port/v1/blips" \ -H "Authorization: Bearer $token" -H "Content-Type: application/json" \ -d '{"id": "backup", "title": "Backup", "icon": "externaldrive.fill", "state": "running", "layout": "progress", "data": {"fraction": 0.4, "step": "Copying Photos"}}'
# When it's done.curl -s -X POST "http://127.0.0.1:$port/v1/blips/webhook/backup/end" \ -H "Authorization: Bearer $token" -H "Content-Type: application/json" \ -d '{"state": "success"}'
# Ask, and wait up to five minutes for the answer: {"action": "yes", ...}, or a 204.curl -s "http://127.0.0.1:$port/v1/blips?await=300&from=Deploy" \ -H "Authorization: Bearer $token" -H "Content-Type: application/json" \ -d '{"id": "deploy-ask", "title": "api", "subtitle": "Deploy to production?", "state": "attention", "layout": "session", "data": {"startedAt": "2026-10-03T10:00:00Z"}, "actions": [{"id": "yes", "label": "Deploy", "role": "primary"}, {"id": "no", "label": "Not now"}]}'The blip command (docs/blip-command.md) does all of this for you: blip ./backup.sh shows a
command while it runs, and blip ask "Deploy to production?" waits for the click.