Skip to Content
Create a directive
post

Creates a new directive that defines which Robots workflows should run against Mux assets, and under what resource conditions.

Request body params
name
string

Human-readable directive name.

Mux asset lifecycle subject. Live streams are not supported.

subject.type
string
Possible values: "video.asset"

Resources required by dependent workflow bindings.

post
201
https://api.mux.com/robots/v1/directives
Request
(application/json)
{
  "name": "Moderate new assets",
  "subject": {
    "type": "video.asset"
  },
  "bindings": [
    {
      "reference_id": "moderation",
      "workflow": "moderate",
      "parameters": {
        "on_flagged": {
          "action": "delete_playback_ids"
        }
      }
    }
  ]
}