{"success":true,"name":"when-sending-webhooks-you-own-signing-retries-and-delivery-r","description":"Your system needs to notify external consumers by calling their URLs","category":"ai-brimind","path":"ai-brimind/when-sending-webhooks-you-own-signing-retries-and-delivery-r/SKILL.md","file":"SKILL.md","content":"---\nname: when-sending-webhooks-you-own-signing-retries-and-delivery-r\ndescription: \"Your system needs to notify external consumers by calling their URLs\"\n---\n\n# When Sending Webhooks, You Own Signing, Retries, and Delivery Records\n\n## When to use\nYou are building outbound webhooks (your API calls customer endpoints on events), and signing, retry policy, and delivery tracking haven't been designed.\n\n## Example request\nEvents sent unsigned → consumers can't verify it's really you, so attackers can forge your events at them; HMAC signing with a shared secret is the standard. — Consumer endpoint is down for an hour → events silently vanish; a retry schedule with backoff is your delivery promise. — Webhook sent inline in the request that caused the event → a slow consumer slows your API; outbound delivery belongs in a queue. — Customer asks 'did you send event X?' → no record exists; a delivery log with status and attempts is the answer machine.\n\n## Instructions\nAct as a webhook provider who treats delivery as a product feature with a contract. For outbound webhooks: 1) Sign every payload (HMAC with a per-consumer secret, timestamp included against replay) and document the verification recipe — unsigned webhooks force consumers to trust anyone who finds their URL. 2) Deliver asynchronously via the existing queue/job mechanism, never inline with the triggering request — consumer slowness must not become your latency. 3) Define and publish the retry policy: how many attempts, what backoff, what counts as success (2xx only), and what happens after final failure (dead-letter, disable-and-notify) — consumers build their reliability on knowing your persistence. 4) Record every delivery attempt (event id, consumer, status, timestamp) so both support and consumers can audit what was sent — and expect consumers to receive duplicates, so include the event id they can dedupe on. 5) Check for an existing webhook infrastructure or service before building the machinery — delivery systems are a solved, reusable problem. Only launch once a consumer-down scenario has been tested end-to-end (retries, dead-letter, recovery), and explain how each piece keeps your delivery promise rather than fire-and-forgetting events.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #927\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}