What are Webhooks?

Webhooks allow your application to receive real-time notifications when events occur in the Bluma platform, eliminating the need to poll for status updates.

How Webhooks Work

1

Register Endpoint

Configure a URL where Bluma should send event notifications
2

Event Occurs

An event happens (e.g., video completes generation)
3

Webhook Fired

Bluma sends an HTTP POST request to your endpoint
4

Process Event

Your server receives and processes the webhook payload

Supported Events

Video Events

Credit Events

Webhook Payload

All webhooks include a consistent structure:

Example: Video Completed

Example: Video Failed

Registering Webhooks

Create a Webhook

The webhook secret is shown only once during creation. Save it securely - you’ll need it to verify webhook signatures.

List Your Webhooks

Delete a Webhook

Security

Verifying Signatures

All webhooks include an X-Bluma-Signature header with an HMAC-SHA256 signature. Always verify this signature to ensure the webhook is genuine.

Node.js Example

Python Example

Webhook Headers

Each webhook request includes:

Delivery & Retries

Retry Schedule

If your endpoint fails to respond with a 2xx status code:
  1. First retry: 3 seconds
  2. Second retry: 30 seconds
  3. Third retry: 5 minutes
  4. Fourth retry: 1 hour
After 4 failed attempts, the webhook delivery is marked as failed.

Automatic Disabling

Webhooks are automatically disabled after 10 consecutive failures to prevent unnecessary load. Re-enable them once your endpoint is fixed.

Monitoring Deliveries

Check webhook delivery logs:

Best Practices

Respond Quickly

Return a 200 status immediately, then process the event asynchronously

Handle Duplicates

Use the event_id to deduplicate events (store processed IDs)

Verify Signatures

Always validate the HMAC signature before processing

Monitor Failures

Track delivery failures and fix issues promptly to avoid auto-disable

Idempotency Example

Testing Webhooks

Using webhook.site

  1. Create a temporary endpoint at webhook.site
  2. Register the URL as your webhook endpoint
  3. Trigger an event (generate a test video)
  4. View the webhook payload in real-time

Local Testing with ngrok

Troubleshooting

Possible causes:
  • Your endpoint is returning non-2xx status codes
  • Firewall blocking Bluma’s servers
  • SSL certificate issues
Solutions:
  • Check delivery logs for error messages
  • Verify your endpoint returns 200 OK
  • Ensure HTTPS is properly configured
This is normal behavior. Implement idempotency using the event_id to safely handle duplicates.
Check that:
  • You’re using the correct webhook secret
  • You’re computing the HMAC on the raw request body (not parsed JSON)
  • The secret hasn’t been regenerated or changed
Fix the issues causing failures, then re-enable by creating a new webhook subscription. Review delivery logs to identify root cause.

Next Steps

Webhook Setup Guide

Complete step-by-step integration guide

API Reference

View webhooks API documentation

Error Handling

Handle webhook delivery failures

Best Practices

Build reliable webhook integrations