Overview
Many MAVI API endpoints process tasks asynchronously. When you call an async endpoint, it immediately returns atask_id. Once processing completes, the API sends the results to your configured webhook URL via an HTTP POST request.
Setup
Step 1: Open the Webhooks Settings
Go to the Webhooks Settings page in the MAVI Console.Step 2: Add Your Webhook URL
Enter your callback URL. It must be:- A publicly accessible HTTPS endpoint
- Able to accept POST requests with JSON body
- Returns a
2xxstatus code on success
Step 3: Save
After saving, all async task results will be automatically delivered to your configured URL.Webhook configuration is a one-time setup. Once configured, all async tasks across all API endpoints will send results to the same URL.
Async Endpoints That Require Webhooks
The following endpoints are asynchronous — they return atask_id on call and deliver results via webhook callback:
How Async Tasks Work
Example Flow
1. Call an async endpoint:task_id in the callback matches the one from step 2.
Callback Payload Format
All webhook callbacks follow this general structure:Handling Webhook Callbacks
Here is an example webhook handler:Important Notes
- Your webhook URL must be a publicly accessible HTTPS endpoint
- The callback request method is always POST with a JSON body
- Return a
2xxstatus code to acknowledge receipt; non-2xx responses may trigger retries - You can view callback history and debug failed deliveries at Webhooks Settings
- Use the
task_idfield to correlate callbacks with your original requests
