Skip to content

Callbacks

A callback is a webhook registered on a converter. When a workflow reaches a subscribed event, the service calls your endpoint with a JSON body. You do not poll runs.

Endpoints

Method Path Description Scope
GET /converters/{converter}/callbacks List paginated callbacks callbacks:read
POST /converters/{converter}/callbacks Register a callback callbacks:write
GET /callbacks/{callback} Get a callback callbacks:read
PUT/PATCH /callbacks/{callback} Update a callback callbacks:write
DELETE /callbacks/{callback} Delete a callback callbacks:write

Registering a callback

curl -s -X POST "https://api.infomaniak.com/1/public_clouds/media_conversion/converters/<converter-id>/callbacks" \
  -H "Authorization: Bearer $MC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "label": "My pipeline",
    "url": "https://example.com/hooks/media-conversion",
    "method": "POST",
    "auth": {
      "type": "bearer",
      "config": { "token": "<your-webhook-token>" }
    },
    "retry_max": 3,
    "retry_backoff_ms": 1000,
    "timeout_ms": 10000,
    "subscriptions": [
      { "event": "started",  "workflow": "TranscodeMedia" },
      { "event": "completed", "workflow": "TranscodeMedia" },
      { "event": "progress", "activity": "TranscodeMedia" }
    ]
  }'
Field Description
url Target URL (max 2048 chars)
method GET, POST, PUT or PATCH
auth.type none, basic, bearer or api_key
auth.config Credentials: token (bearer), user + pass (basic), key_name + key_value (api key)
headers Extra headers sent with every call
retry_max Max retries on failure (0–10)
retry_backoff_ms Backoff between retries (100–60000 ms)
timeout_ms Timeout of a single call (1000–300000 ms)
active Inactive callbacks are ignored
subscriptions Events to subscribe to

Subscriptions

Each subscription targets an event on a workflow or an activity:

Event Target
started a workflow
completed a workflow
failed a workflow
progress an activity (percentage, current step, ETA)

Workflow types include TranscodeMedia, CreateThumbnailStrip, CreateAudioPreviewClip, CreateVideoPreviewClip, DetectSceneChanges, RenderAudioWaveform, TranscribeAudio, TranslateSubtitle, EnrichMediaMetadata. See the full list in Workflows & Runs. Activity names follow the same catalog (TranscodeMedia is also the activity that encodes).

Payload

The webhook body is a JSON object. It carries the event, the converter id and an event-specific data:

{
  "event": "completed",
  "resource_id": "7b2e8a1c-9f4d-4c3a-b1e2-0d5f6a7b8c9d",
  "fired_at": "2026-11-20T10:35:42Z",
  "data": {
    "duration": "PT5M42S",
    "outputs": [
      {
        "type": "video",
        "location": "s3://my-bucket/converted/video_720p.mp4",
        "mime_type": "video/mp4"
      }
    ]
  }
}

Other shapes:

  • started: data: { "workflow_type": "TranscodeMedia", "context": "..." }
  • progress: data: { "percentage": 42.5, "current_step": "TranscodeMedia", "elapsed": "PT2M10S", "eta": "PT3M" }
  • failed: data: { "error_type": "workflow_failed", "message": "...", "failed_step": "TranscodeMedia", "details": "..." }

Durations use ISO-8601 (PT5M42S). A failed delivery is retried up to retry_max times. The backoff between attempts is retry_backoff_ms.