name: design-a-webhook-delivery-contract
description: Defines webhook events, signed deliveries, retries, ordering, and consumer handling. Use when the user needs an API to notify external systems about domain events.
domain: api-design
tags: [webhooks, event-delivery, signatures]
triggers: ["webhook delivery contract", "design signed webhooks", "define webhook retry behavior"]
Defines webhook events, signed deliveries, retries, ordering, and consumer handling
Purpose
Defines webhook events, signed deliveries, retries, ordering, and consumer handling.
When to use
Use when the user needs an API to notify external systems about domain events.
When NOT to use
Do not use this for internal function signatures; use software-engineering instead.
Inputs required
- The consumers and what they need
- The resources and the operations involved
- The versioning, auth and rate-limit policy
Procedure
- Define the event envelope with identifier, type, timestamp, version, and data.
- Specify delivery attempts, backoff intervals, timeout, and retry limits.
- Require a signature and publish the verification and secret-rotation procedure.
- Define acknowledgement status codes, duplicate handling, and event ordering guarantees.
- Document replay, endpoint disablement, and backward-compatible event changes.
Output contract
A documented contract with endpoints, payloads, error shapes and versioning rules.
Validation checklist
Safety notes
Never change an existing response shape without a version bump and a migration note.
Related skills
design-a-bulk-endpoint
design-a-graphql-schema
design-a-rest-resource-model
1---2name: design-a-webhook-delivery-contract3description: Defines webhook events, signed deliveries, retries, ordering, and consumer handling. Use when the user needs an API to notify external systems about domain even4---5---6name: design-a-webhook-delivery-contract7description: Defines webhook events, signed deliveries, retries, ordering, and consumer handling. Use when the user needs an API to notify external systems about domain events.8domain: api-design9tags: [webhooks, event-delivery, signatures]10triggers: ["webhook delivery contract", "design signed webhooks", "define webhook retry behavior"]11---1213# Defines webhook events, signed deliveries, retries, ordering, and consumer handling1415## Purpose1617Defines webhook events, signed deliveries, retries, ordering, and consumer handling.1819## When to use2021Use when the user needs an API to notify external systems about domain events.2223## When NOT to use2425Do not use this for internal function signatures; use software-engineering instead.2627## Inputs required2829- The consumers and what they need30- The resources and the operations involved31- The versioning, auth and rate-limit policy3233## Procedure34351. Define the event envelope with identifier, type, timestamp, version, and data.362. Specify delivery attempts, backoff intervals, timeout, and retry limits.373. Require a signature and publish the verification and secret-rotation procedure.384. Define acknowledgement status codes, duplicate handling, and event ordering guarantees.395. Document replay, endpoint disablement, and backward-compatible event changes.4041## Output contract4243A documented contract with endpoints, payloads, error shapes and versioning rules.4445## Validation checklist4647- [ ] Every error has a stable machine-readable code48- [ ] Pagination, filtering and idempotency are defined49- [ ] The contract is versioned and backward compatible5051## Safety notes5253Never change an existing response shape without a version bump and a migration note.5455## Related skills5657- `design-a-bulk-endpoint`58- `design-a-graphql-schema`59- `design-a-rest-resource-model`