Docs

Webhooks

Start a routine when something happens elsewhere.

Inbound: start a routine

  1. Add a Webhook trigger to a routine. You get its address and a signing secret, shown once.
  2. Point the sender at the address and give it the secret.
  3. Each signed request starts one run. The body reaches the agent as outside data, never as instructions.

Signing. HMAC-SHA256 of the raw body, sent as X-Hub-Signature-256: sha256=<hex>.

body='{"order":"1042"}'
sig=$(printf '%s' "$body" | openssl dgst -sha256 -hmac "$SECRET" | sed 's/^.* //')
curl -X POST "$ADDRESS" -H "content-type: application/json" \
  -H "X-Hub-Signature-256: sha256=$sig" -d "$body"
AnswerMeans
2xxAccepted. A repeat of the same Idempotency-Key (or X-GitHub-Delivery) for this trigger is recorded once and starts no second run.
400The body is not valid JSON
401Missing or bad signature
404Unknown address, a disabled trigger or a routine that is off
413Body over 256 KiB

Send an Idempotency-Key with each event so a retried delivery never runs twice.

Every delivery is kept 30 days on the routine's Deliveries list, where you can replay one.

Coming: the v1 address /api/webhooks/v1/routines/{trigger} with no secret in it, and Standard Webhooks signing. Today's address carries a token; treat it as a secret.

Outbound

Coming: subscribe to workspace events (routine runs, Work items, messages) and receive them signed at your own address.