Skip to main content

Webhooks

Outbound webhooks let you route Roboticks events into anything that accepts HTTP — internal dashboards, ticketing systems, data warehouses, custom Slack apps your security team has standardised on, or your own tooling.

Set up

1

Add a webhook

Settings → Integrations → Webhooks → Add. Paste your endpoint URL (HTTPS only). Pick a name.
2

Generate a signing secret

Roboticks generates a 32-byte secret. Copy it once — it’s never shown in plaintext again. Store it where your receiver can read it.
3

Pick events

Toggle which event types route here. Defaults: all test_run.* and evidence_pack.* events.
4

Send a test

Hit Send test event. The endpoint receives a synthetic test_run.completed payload.

Payload envelope

Every webhook delivery has the same envelope:

Event types

test_run.completed

requirement.gap_opened

reason is one of: test_deleted, test_renamed, test_failing, requirement_added, staleness_window_exceeded.

evidence_pack.generated

standard.amendment_published

runner_pool.offline

Signatures

Every delivery includes an HMAC-SHA256 signature in the X-Roboticks-Signature header:
t is the Unix timestamp the signature was minted (use to defeat replay); v1 is the HMAC.

Verify

Compute HMAC-SHA256 over "{t}.{raw_body}" with your signing secret. Compare to v1 in constant time.
Always reject deliveries outside the 5-minute timestamp tolerance to defeat replay attacks.

Retry semantics

Failed deliveries (non-2xx response, timeout > 10 s, connection error) retry with exponential backoff: After 6 failed attempts, the delivery is marked failed and a webhook.delivery_failed event fires (you can wire that to Slack to know you’re losing data). Replays from the dashboard: Settings → Integrations → Webhooks → Delivery log → ⋯ → Resend.

Idempotency

Use the envelope id for idempotency. The same event will never appear under two different id values; the same id may appear more than once if your endpoint timed out and we retried.

Best practice

  • Acknowledge fast: return 2xx within 5 s, then process async. Don’t do heavy work in the request handler.
  • Verify the signature before parsing JSON.
  • Log the envelope id for every delivery; correlate with the delivery log on triage.
  • Reject deliveries whose org.id doesn’t match your expectation (defence-in-depth).

Troubleshooting

Most often the endpoint takes > 10 s to respond. Move processing to a queue and ack immediately.
You’re parsing JSON before computing the HMAC. Compute the HMAC over the raw bytes of the request body — even whitespace differences invalidate the signature.
Use webhook.site or ngrok http 4000 for local development. Both surface the exact headers and body Roboticks sends.