Skip to main content

Overview

Many MAVI API endpoints process tasks asynchronously. When you call an async endpoint, it immediately returns a task_id. Once processing completes, the API sends the results to your configured webhook URL via an HTTP POST request.
You must configure a webhook endpoint before using any async API. Without a webhook, you will not receive processing results.

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 2xx status 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 a task_id on call and deliver results via webhook callback:

How Async Tasks Work

Example Flow

1. Call an async endpoint:
2. Receive immediate response with task_id:
3. Receive webhook callback when processing completes: Your webhook URL will receive a POST request with the results. The 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 2xx status 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_id field to correlate callbacks with your original requests