Prompt Library 💻 Coding & Dev Build a Webhook System
Any 💻 Coding & Dev Advanced

Build a Webhook System

Design and implement a complete webhook delivery system for any application.
👁 6 views ⎘ 0 copies ♥ 0 likes

The Prompt

Build a complete webhook system for the following:

Application type: [SaaS platform / API / marketplace / other]
Language/framework: [Node.js/Express / Python/FastAPI / other]
Database: [PostgreSQL / MySQL / MongoDB / other]
Events to support: [list the events that trigger webhooks]
Expected volume: [low under 1000/day / medium / high millions/day]
Reliability requirement: [best effort / at-least-once / exactly-once]
Customer authentication: [HMAC signatures / shared secret / other]

Provide a complete webhook implementation:

SYSTEM DESIGN:
- Webhook delivery architecture
- Synchronous vs asynchronous delivery decision
- Queue system recommendation
- Retry strategy design
- Database schema for webhook subscriptions and delivery log

CUSTOMER-FACING API:
- Endpoint registration (create / update / delete / list subscriptions)
- Event filtering per endpoint
- Subscription authentication
- Test event sending
- Full API documentation for each endpoint

EVENT DISPATCH SYSTEM:
- Event trigger integration points
- Event payload schema design
- Event serialisation
- Routing events to subscriptions
- Queue publishing

DELIVERY WORKER:
- Queue consumer setup
- HTTP delivery with timeout
- Success and failure handling
- Retry logic (exponential backoff with jitter)
- Dead letter queue handling
- Delivery logging

SECURITY:
- HMAC signature generation and verification
- Signature header format
- Customer verification code examples (multiple languages)
- Replay attack prevention (timestamp in signature)
- IP allowlist option

DEVELOPER EXPERIENCE:
- Webhook testing endpoint
- Delivery log API (see recent attempts)
- Debug mode for a subscription
- Webhook documentation template

MONITORING:
- Delivery success rate tracking
- Failing endpoint alerting
- Queue depth monitoring
- Customer-visible delivery status

TESTING:
- Local webhook testing setup
- Unit tests for signature verification
- Integration tests for delivery flow

📝 Fill in the blanks

Replace these placeholders with your own content:

[SaaS platform / API / marketplace / other]
[Node.js/Express / Python/FastAPI / other]
[PostgreSQL / MySQL / MongoDB / other]
[list the events that trigger webhooks]
[low under 1000/day / medium / high millions/day]
[best effort / at-least-once / exactly-once]
[HMAC signatures / shared secret / other]

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into Any

Open your preferred AI assistant and paste the prompt to get started.