Mastering Webhooks for Real-Time Automation
Webhooks eliminate the need for constant API polling by pushing events to your application in real-time. This guide shows you how to set up, secure, and scale webhook integrations.
What Are Webhooks?
Instead of your app repeatedly asking "any new messages?", webhooks flip the model — we notify your app the instant something happens.
Setting Up Your First Webhook
- 1.Create an endpoint in your application
- 2.Subscribe to events via our API
- 3.Verify the webhook signature
- 4.Process events and respond with 200
Available Events
message.received— New fan messagemessage.sent— Outgoing message confirmedsubscription.created— New subscribersubscription.expired— Subscription endedpayment.received— New paymentpost.created— Content published
Security Best Practices
Always verify webhook signatures to ensure requests come from The Only API. Each webhook includes an X-Webhook-Signature header that you should validate using your webhook secret.
Handling Failures
Implement idempotent processing — if you receive the same event twice, your system should handle it gracefully. We retry failed deliveries with exponential backoff for up to 24 hours.