---
title: "POST robots.v1.directive_run.completed"
method: POST
path: "robots.v1.directive_run.completed"
---

# POST robots.v1.directive_run.completed

`POST robots.v1.directive_run.completed` (webhook)

## Payload

- object
  - `type` 'robots.v1.directive_run.completed', required: Type for the webhook event
  - `id` string, required: Unique identifier for the event
  - `created_at` string, date-time, required: Time the event was created
  - `object` object, required
    - `type` string, required
    - `id` string, required
  - `environment` object, required
    - `name` string, required: Name for the environment
    - `id` string, required: Unique identifier for the environment
  - `attempts` object[], required: Attempts for sending out the webhook event
    - `webhook_id` integer: Unique identifier for the webhook
    - `response_status_code` integer: HTTP response status code for the webhook attempt
    - `response_headers` object: HTTP response headers for the webhook attempt
    - `response_body` string, nullable: HTTP response body for the webhook attempt
    - `max_attempts` integer: Max attempts number for the webhook attempt
    - `id` string: Unique identifier for the webhook attempt
    - `created_at` string, date-time: Time the webhook request was attempted
    - `address` string: URL address for the webhook attempt
  - `data` object, required: Version 1 directive run delivered in the Mux webhook event data field.
    - `id` string, required: Opaque run identifier (drvrun_...).
    - `directive_id` string, required: Opaque parent directive identifier (drv_...).
    - `subject_id` string, required: Bare Mux asset ID targeted by the run.
    - `status` 'pending' | 'dispatching' | 'running' | 'waiting' | 'completed' | 'partial' | 'errored', required
    - `node_states` union[], required: Per-binding state in configuration order. Failed nodes retain their reason diagnostic.
      - union
        - object
          - `reference_id` string, required: Declared binding reference_id from directive.bindings[].
          - `status` 'dispatched', required
          - `job_id` string, required: Workflow job ID (rjob_...).
          - `workflow` 'analyze-structure' | 'summarize' | 'generate-contextual-text' | 'moderate' | 'generate-chapters' | 'edit-captions' | 'translate-captions' | 'translate-audio' | 'ask-questions' | 'find-key-moments' | 'generate-engagement-insights' | 'generate-premium-captions' | 'find-best-thumbnails', required: The Robots workflow for this binding.
        - object
          - `reference_id` string, required: Declared binding reference_id from directive.bindings[].
          - `status` 'failed', required
          - `reason` string, required: Human-readable diagnostic explaining why the binding didn't dispatch.
        - object
          - `reference_id` string, required: Declared binding reference_id from directive.bindings[].
          - `status` 'waiting_for_resources', required
          - `workflow` 'analyze-structure' | 'summarize' | 'generate-contextual-text' | 'moderate' | 'generate-chapters' | 'edit-captions' | 'translate-captions' | 'translate-audio' | 'ask-questions' | 'find-key-moments' | 'generate-engagement-insights' | 'generate-premium-captions' | 'find-best-thumbnails', required: The Robots workflow for this binding.
        - object
          - `reference_id` string, required: Declared binding reference_id from directive.bindings[].
          - `status` 'waiting_for_source_bindings', required
          - `workflow` 'analyze-structure' | 'summarize' | 'generate-contextual-text' | 'moderate' | 'generate-chapters' | 'edit-captions' | 'translate-captions' | 'translate-audio' | 'ask-questions' | 'find-key-moments' | 'generate-engagement-insights' | 'generate-premium-captions' | 'find-best-thumbnails', required: The Robots workflow for this binding.
          - `source_bindings` string[], required: reference_ids of producer bindings within this directive that must complete before this binding can dispatch.
    - `started_at` integer, required: Run start Unix timestamp in seconds.
    - `completed_at` integer, nullable, required: Terminal Unix timestamp in seconds, or null while in progress.

## Acknowledgement `200`

Return a 200 to indicate that the data was received successfully

---

[API](https://skmtc.dev/muxinc/apis/mux-api.md) - [All operations](https://skmtc.dev/muxinc/apis/mux-api/llms.txt) - [OpenAPI document](https://skmtc.dev/muxinc/apis/mux-api/revisions/75b4251a1d96?raw)
