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.
Step 1: Configure webhook (one-time setup) → https://api-platform.memories.ai/webhooksStep 2: Call an async endpoint → Returns { "data": { "task_id": "abc123" } }Step 3: Wait for webhook callback → MAVI POSTs results to your webhook URLStep 4: Match task_id to correlate request and response → callback body contains the same 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.
All webhook callbacks follow this general structure:
Copy
{ "code": 200, "message": "SUCCESS", "data": { // Result data varies by endpoint — see each endpoint's // "Callback Response" section for details }, "task_id": "1e8ae1075e054e8abb58e7598c53cbf1"}
Field
Type
Description
code
integer
Status code. 200 indicates success.
message
string
Status message (e.g., "SUCCESS").
data
object
The processing result. Structure varies by endpoint.
task_id
string
The task ID from the original async request. Use this to match callbacks to your requests.