callback_url when calling Run Agent to receive webhook POSTs for run lifecycle events.
Authentication
If you have a webhook secret configured, every webhook includes anX-Mosaic-Signature header containing the secret as a plaintext string. Validate with a direct comparison:
Common Fields
Every webhook payload contains these fields:| Field | Type | Description |
|---|---|---|
flag | string | "RUN_STARTED", "RUN_PROGRESS", or "RUN_FINISHED" |
agent_id | string | Agent UUID |
run_id | string | Run UUID |
status | string | Current run status |
node_status_counts | object | { completed, in_progress, failed } |
triggered_by | object | null | What initiated the run (see below) |
RUN_STARTED
Sent when the run begins.inputs — array of { video_url, thumbnail_url } for the input videos.
RUN_PROGRESS
Sent when one or more nodes change status. Useful for progress tracking without polling.| Field | Type | Description |
|---|---|---|
updated_nodes[].original_node_id | string | null | Template node ID — use to map back to your agent |
updated_nodes[].status | string | completed, running, queued, failed, blocked, partial_complete |
updated_nodes[].status_message | string | null | Human-readable message |
updated_nodes[].outputs | array | Outputs produced by this node (if any) |
RUN_FINISHED
Sent when the run reaches a terminal state. Contains all final outputs.| Field | Type | Description |
|---|---|---|
status | string | completed, partial_complete, or failed |
status_message | string | null | Human-readable detail on failure |
inputs | array | { video_url, thumbnail_url } for each input |
outputs | array | Final rendered outputs (see below) |
| Field | Type | Description |
|---|---|---|
id | string | Render ID — use for chaining runs via node_render_ids |
video_url | string | Signed download URL (valid 7 days) |
thumbnail_url | string | null | Signed thumbnail URL |
completed_at | string | ISO 8601 timestamp |
original_node_id | string | null | Template node that produced this output |
triggered_by
Present when the run was started by a trigger or YouTube URL. null for standard API runs.
type is one of "youtube", "schedule", or "manual".
Run Status Values
| Status | Meaning |
|---|---|
running | Processing in progress |
completed | All outputs generated successfully |
partial_complete | Some outputs succeeded, others failed |
failed | No outputs generated |
cancelled | Cancelled by user |