//Event Streaming & Webhooks

Event Streaming & Webhooks

A modern SaaS is asynchronous. When a long-running AI task completes, or a payment succeeds, your application needs to know immediately without constantly polling the API.

ButtrBase provides a built-in Webhook Delivery System for real-time event streaming.

Registering a Webhook

You can register Webhook URLs for specific organizations or globally for your entire app. When an event occurs (e.g., user.created, subscription.upgraded, agent.task_completed), ButtrBase reliably streams that JSON payload directly to your backend server.

Endpoint:
POST /api/v2/webhooks

Example Request:

curl -X POST https://api.buttrbase.com/api/v2/webhooks   -H "Authorization: Bearer my_token"   -H "Content-Type: application/json"   -d '{ "url": "https://api.my-saas.com/webhooks/buttrbase", "events": ["user.created", "agent.task_completed"] }'

Security and Verification

ButtrBase signs all outgoing webhook payloads with a cryptographic signature. Your server should verify the ButtrBase-Signature header using the secret returned when you registered the webhook.

The system also includes built-in retry logic, automatically retrying failed deliveries with exponential backoff if your server is temporarily unreachable.