Skip to main content

Getting Started

To start using webhooks, you’ll need to:
  1. Set up an endpoint - Create a URL that can receive POST requests
  2. Configure the webhook - Add your endpoint in the Consumer App Portal
  3. Verify signatures - Implement signature verification for security
  4. Handle events - Process the incoming webhook data

Adding Endpoints

Animus uses Svix for processing webhook events. You will be given a portal link by the Animus team where you can use this portal to set up webhook endpoints and subscribe to events. In order to start listening to messages, you will need to configure your endpoints. To add an endpoint, select the “Endpoints” tab from the left sidebar. From there you can add a new endpoint and set the events you want to be notified about. If you don’t specify any event types, by default, your endpoint will receive all events, regardless of type. You can also edit any existing endpoints. You’ll be able to view and inspect webhooks sent to your Svix Play URL, making it effortless to get started. Adding a webhook endpoint

Events

The following is a list of events you can subscribe to. Webhook events selection

Available Event Types

  • media.completed - A video processing job has finished successfully or with a failure.

Event Payload Structure

When a webhook event is triggered, you’ll receive a POST request to your configured endpoint with a JSON payload containing:

Verifying Webhook Signatures

Webhook signatures let you verify that webhook messages are actually sent by us and not a malicious actor. For a more detailed explanation, check out this article on why you should verify webhooks. Our webhook partner Svix offers a set of useful libraries that make verifying webhooks very simple:
For detailed information on how to use the Svix portal to manage your webhooks, refer to the Svix documentation.
For more instructions and examples of how to verify signatures, check out their webhook verification documentation.

Complete Webhook Handler Examples

Here are complete examples of webhook handlers in different frameworks:

Advanced Webhook Handling

Retry Logic and Idempotency

Implement proper retry handling and idempotency:

Webhook Queue Processing

For high-volume applications, consider using a queue:

Best Practices

  1. Always verify signatures - This ensures the webhook is actually from Animus and not a malicious actor
  2. Respond quickly - Return a 200 status code as soon as possible. Do heavy processing asynchronously
  3. Handle retries - If your endpoint is down, we’ll retry the webhook. Make sure your handler is idempotent
  4. Log events - Keep logs of received webhooks for debugging and monitoring
  5. Use HTTPS - Always use HTTPS endpoints for security
  6. Handle failures gracefully - Your webhook handler should be robust and handle unexpected data
  7. Implement rate limiting - Protect your endpoint from potential abuse
  8. Monitor webhook health - Set up alerts for failed webhook deliveries

Testing Webhooks

You can test your webhook integration by sending sample webhook events to your endpoints. This allows you to verify that your application correctly processes the webhook events before deploying to production. Testing webhook deliveries During development, you can also use tools like:
  • ngrok - To expose your local development server to the internet
  • Svix Play - A webhook testing tool that provides a temporary URL for testing
  • Webhook.site - Another testing service for inspecting webhook payloads

Local Development Setup

Troubleshooting

Common issues and solutions:
  • Webhook not received: Check that your endpoint is publicly accessible and returns a 200 status code
  • Signature verification fails: Ensure you’re using the correct webhook secret and the raw request body
  • Timeouts: Make sure your webhook handler responds within 30 seconds
  • Duplicate events: Implement idempotency checks using the event ID or timestamp
  • Missing events: Check your webhook endpoint configuration and ensure it’s subscribed to the correct event types

Monitoring and Observability

Implement proper monitoring for your webhook endpoints:

Next Steps

Vision

Learn about video processing that triggers webhook events

Text Generation

Understand the core API functionality

Moderation

Implement content moderation workflows

API Reference

Complete API documentation and reference