{
  "openapi": "3.1.0",
  "info": {
    "title": "Motion",
    "version": "2026-10-22",
    "description": "Motion 2026-10-22 (legacy) REST API — original contract retained for existing integrations. Pass Motion-API-Version: 2026-10-22 (legacy) to select this contract explicitly."
  },
  "servers": [
    {
      "url": "https://api.motion.so/api/motion"
    }
  ],
  "security": [
    {
      "MotionApiKey": []
    }
  ],
  "paths": {
    "/projects": {
      "post": {
        "operationId": "CreateAProject",
        "summary": "Create a project",
        "tags": [
          "Projects"
        ],
        "description": "Create a project from a prompt. Set export_formats to automatically export finished compositions.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:sessions:write"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCreateProjectResponse"
                },
                "example": {
                  "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "chat_url": "https://motion.so/agent?chat=4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "status": "queued",
                  "message_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb",
                  "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource conflict. Fetch the latest state and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMotionProjectRequest"
              },
              "example": {
                "prompt": "Create a 15-second 16:9 product launch video and matching thumbnail.",
                "template_ids": [
                  "user-film-template",
                  "user-image-template"
                ],
                "brand_kit_ids": [
                  "e22e5549-dac7-4ce0-acba-b924804f2cbe",
                  "97725341-f2a3-4f12-9425-01fcf9febcdc"
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional UUID for identical REST retries. Reuse the same key and body after a lost response.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/projects/create-a-project",
          "metadata": {
            "title": "Create a project",
            "sidebarTitle": "Create a project"
          }
        }
      },
      "get": {
        "operationId": "ListProjects",
        "summary": "List projects",
        "tags": [
          "Projects"
        ],
        "description": "List your projects in this workspace.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:sessions:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionListProjectsResponse"
                },
                "example": {
                  "projects": [
                    {
                      "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "title": "Product launch",
                      "status": "completed",
                      "created_at": "2026-11-17T20:00:00Z",
                      "updated_at": "2026-11-17T20:00:00Z",
                      "chat_url": "https://motion.so/agent?chat=4f20dcdd-f63b-4898-97d6-2e05c0d37c78"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Maximum number of projects to return (1–100)."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned as next_cursor from the previous page."
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Match project titles and available legacy saved prompt context."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          },
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "mine",
                "shared",
                "all"
              ],
              "default": "mine"
            },
            "description": "Which accessible workspace projects to list: mine (default), shared, or all."
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/projects/list-projects",
          "metadata": {
            "title": "List projects",
            "sidebarTitle": "List projects"
          }
        }
      }
    },
    "/projects/{id}": {
      "get": {
        "operationId": "ReadAProject",
        "summary": "Read a project",
        "tags": [
          "Projects"
        ],
        "description": "Read project status, messages, saved compositions and exports.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:sessions:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionGetProjectResponse"
                },
                "example": {
                  "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "title": "Product launch",
                  "status": "completed",
                  "progress": {
                    "stage": "completed",
                    "percent": 100,
                    "message": "Finished"
                  },
                  "latest_turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb",
                  "error": null,
                  "created_at": "2026-11-17T20:00:00Z",
                  "updated_at": "2026-11-17T20:00:00Z",
                  "chat_url": "https://motion.so/agent?chat=4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "generations": [
                    {
                      "id": "9d2f19e2-2366-46bd-8963-869c340f723a",
                      "created_at": "2026-11-17T20:00:00Z",
                      "status": "ready",
                      "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb",
                      "compositions": [
                        {
                          "id": "9d2f19e2-2366-46bd-8963-869c340f723a:film",
                          "kind": "video",
                          "width": 1920,
                          "height": 1080,
                          "duration_seconds": 15
                        },
                        {
                          "id": "9d2f19e2-2366-46bd-8963-869c340f723a:thumbnail",
                          "kind": "image",
                          "width": 640,
                          "height": 360,
                          "duration_seconds": null
                        }
                      ],
                      "sources": []
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null,
                  "exports": [
                    {
                      "generation_id": "9d2f19e2-2366-46bd-8963-869c340f723a",
                      "id": "46ed7444-a055-462b-9c17-0a2cdd5ca393",
                      "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "format": "mp4",
                      "created_at": "2026-11-17T20:00:00Z",
                      "status": "completed",
                      "progress": 100,
                      "stage": "completed",
                      "warnings": [],
                      "error": null,
                      "download_url": "https://downloads.example.com/film.mp4",
                      "expires_at": "2026-11-17T21:00:00Z",
                      "filename": "film.mp4",
                      "origin": "api",
                      "created_by": "bfa220bc-731d-4d9a-a6bf-e7da483f52ca",
                      "content_type": "video/mp4",
                      "created_by_you": true,
                      "composition_ids": [
                        "9d2f19e2-2366-46bd-8963-869c340f723a:film"
                      ],
                      "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb"
                    },
                    {
                      "generation_id": "9d2f19e2-2366-46bd-8963-869c340f723a",
                      "id": "5a4f249a-8c2b-471f-b9b0-ff8e3e5e1aa9",
                      "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "format": "png",
                      "created_at": "2026-11-17T20:00:00Z",
                      "status": "preparing",
                      "progress": 0,
                      "stage": "preparing",
                      "warnings": [],
                      "error": null,
                      "download_url": null,
                      "expires_at": null,
                      "origin": "api",
                      "created_by": "bfa220bc-731d-4d9a-a6bf-e7da483f52ca",
                      "created_by_you": true,
                      "composition_ids": [
                        "9d2f19e2-2366-46bd-8963-869c340f723a:thumbnail"
                      ],
                      "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb"
                    }
                  ],
                  "export_formats": [
                    "mp4",
                    "png"
                  ],
                  "exports_has_more": false,
                  "exports_next_cursor": null,
                  "connectors": null,
                  "effort": "standard",
                  "messages": [
                    {
                      "id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb",
                      "role": "user",
                      "content": "Create a launch video and thumbnail.",
                      "sequence_num": 1,
                      "created_at": "2026-11-17T19:59:00Z",
                      "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb",
                      "effort": "standard",
                      "template_ids": [],
                      "brand_kit_ids": []
                    },
                    {
                      "id": "852c42fa-d891-4483-9f54-9b35ce6e51ef",
                      "role": "assistant",
                      "content": "Created the video and thumbnail.",
                      "sequence_num": 2,
                      "created_at": "2026-11-17T20:00:00Z",
                      "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb",
                      "effort": "standard",
                      "explanations": [
                        "Matched the requested colors and layout."
                      ],
                      "explanations_omitted": false
                    }
                  ],
                  "messages_has_more": false,
                  "messages_next_after_sequence": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Project UUID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Page size for both messages and generations."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "next_cursor from the preceding generation page."
          },
          {
            "name": "after_sequence",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Read messages after this sequence number."
          },
          {
            "name": "include_explanations",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Include user-visible progress explanations."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/projects/read-a-project",
          "metadata": {
            "title": "Read a project",
            "sidebarTitle": "Read a project"
          }
        }
      }
    },
    "/projects/{id}/turns": {
      "get": {
        "operationId": "ListProjectTurns",
        "summary": "List project turns",
        "tags": [
          "Projects"
        ],
        "description": "List turns for a project newest-first, including failed, cancelled, and active turns. Supports cursor pagination and optional created_after / created_before date filters.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:projects:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Project UUID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Maximum number of turns to return (1–100)."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque cursor returned as next_cursor by the previous page."
          },
          {
            "name": "created_after",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Return turns created at or after this ISO-8601 timestamp with timezone offset."
          },
          {
            "name": "created_before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Return turns created at or before this ISO-8601 timestamp with timezone offset."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionListProjectTurnsResponse"
                },
                "example": {
                  "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "turns": [
                    {
                      "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb",
                      "status": "completed",
                      "error": null,
                      "effort": "standard",
                      "created_at": "2026-11-17T20:00:00Z",
                      "completed_at": "2026-11-17T20:02:14Z",
                      "generation_id": "9d2f19e2-2366-46bd-8963-869c340f723a",
                      "export_ids": [
                        "46ed7444-a055-462b-9c17-0a2cdd5ca393"
                      ]
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, date range, or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/projects/list-project-turns",
          "metadata": {
            "title": "List project turns",
            "sidebarTitle": "List project turns"
          }
        }
      }
    },
    "/projects/{id}/messages": {
      "post": {
        "operationId": "SendAProjectMessage",
        "summary": "Send a project message",
        "tags": [
          "Projects"
        ],
        "description": "Send a prompt to continue or steer the project. Effort stays fixed at creation.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:sessions:write"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionSendProjectMessageResponse"
                },
                "example": {
                  "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "chat_url": "https://motion.so/agent?chat=4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "status": "queued",
                  "message_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb",
                  "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict (for example, a web UI session or another user's run is currently active, the project is stopping, or the Idempotency-Key was reused with different parameters).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional UUID for identical REST retries. Reuse the same key and body after a lost response.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Project UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContinueMotionProjectRequest"
              },
              "example": {
                "prompt": "Shorten the opening and update the thumbnail.",
                "template_ids": [],
                "brand_kit_ids": []
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/projects/send-a-project-message",
          "metadata": {
            "title": "Send a project message",
            "sidebarTitle": "Send a project message"
          }
        }
      },
      "get": {
        "operationId": "ListProjectMessages",
        "summary": "List project messages",
        "tags": [
          "Projects"
        ],
        "description": "List project messages incrementally using after_sequence.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:projects:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Project UUID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of messages to return (1–100)."
          },
          {
            "name": "after_sequence",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Return messages with sequence_num greater than this value."
          },
          {
            "name": "turn_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter messages to a single turn_id returned by POST /projects or POST /projects/{id}/messages."
          },
          {
            "name": "include_explanations",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Include step-by-step progress summaries on assistant messages."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionListProjectMessagesResponse"
                },
                "example": {
                  "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "messages": [
                    {
                      "id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb",
                      "role": "user",
                      "content": "Create a 15-second launch video.",
                      "sequence_num": 1,
                      "created_at": "2026-11-17T20:00:00Z",
                      "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb",
                      "effort": "standard",
                      "template_ids": [],
                      "brand_kit_ids": []
                    }
                  ],
                  "has_more": false,
                  "next_after_sequence": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/projects/list-project-messages",
          "metadata": {
            "title": "List project messages",
            "sidebarTitle": "List project messages"
          }
        }
      }
    },
    "/projects/{id}/stop": {
      "post": {
        "operationId": "StopProject",
        "summary": "Stop a project",
        "tags": [
          "Projects"
        ],
        "description": "Stop current work. Saved compositions remain available. Send another message to continue.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:sessions:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Current work interrupted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionStopProjectResponse"
                },
                "example": {
                  "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "stop_requested": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Project not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Project UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  }
                }
              },
              "example": {}
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/projects/stop-current-project-work",
          "metadata": {
            "title": "Stop a project",
            "sidebarTitle": "Stop a project"
          }
        }
      }
    },
    "/projects/{id}/exports": {
      "post": {
        "operationId": "CreateAProjectExport",
        "summary": "Create an export",
        "tags": [
          "Exports"
        ],
        "description": "Export the selected compositions. Each gets a separate export in the requested format.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:sessions:write"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCreateProjectExportResponse"
                },
                "example": {
                  "exports": [
                    {
                      "generation_id": "9d2f19e2-2366-46bd-8963-869c340f723a",
                      "id": "46ed7444-a055-462b-9c17-0a2cdd5ca393",
                      "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "format": "mp4",
                      "created_at": "2026-11-17T20:00:00Z",
                      "status": "preparing",
                      "progress": 0,
                      "stage": "preparing",
                      "warnings": [],
                      "error": null,
                      "download_url": null,
                      "expires_at": null,
                      "origin": "api",
                      "created_by": "bfa220bc-731d-4d9a-a6bf-e7da483f52ca",
                      "created_by_you": true,
                      "composition_ids": [
                        "9d2f19e2-2366-46bd-8963-869c340f723a:film"
                      ],
                      "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource conflict. Fetch the latest state and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Project UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "composition_ids",
                  "format"
                ],
                "properties": {
                  "composition_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 32,
                    "uniqueItems": true,
                    "items": {
                      "type": "string"
                    },
                    "description": "Copy composition IDs from Read a project. Each selection gets a separate export."
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "mp4",
                      "png",
                      "jpeg",
                      "psd",
                      "svg",
                      "media",
                      "premiere",
                      "after-effects",
                      "resolve",
                      "final-cut"
                    ],
                    "description": "Export format. Use image formats for images and video or editor formats for videos."
                  }
                }
              },
              "example": {
                "composition_ids": [
                  "9d2f19e2-2366-46bd-8963-869c340f723a:film"
                ],
                "format": "mp4"
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/project-exports/create-a-project-export",
          "metadata": {
            "title": "Create an export",
            "sidebarTitle": "Create an export"
          }
        }
      },
      "get": {
        "operationId": "ListProjectExportJobs",
        "summary": "List exports",
        "tags": [
          "Exports"
        ],
        "description": "List exports from the app and API, including their status and downloads.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:sessions:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionListProjectExportsResponse"
                },
                "example": {
                  "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "exports": [
                    {
                      "generation_id": "9d2f19e2-2366-46bd-8963-869c340f723a",
                      "id": "46ed7444-a055-462b-9c17-0a2cdd5ca393",
                      "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "format": "mp4",
                      "created_at": "2026-11-17T20:00:00Z",
                      "status": "completed",
                      "progress": 100,
                      "stage": "completed",
                      "warnings": [],
                      "error": null,
                      "download_url": "https://downloads.example.com/film.mp4",
                      "expires_at": "2026-11-17T20:15:00Z",
                      "filename": "film.mp4",
                      "origin": "api",
                      "created_by": "bfa220bc-731d-4d9a-a6bf-e7da483f52ca",
                      "content_type": "video/mp4",
                      "created_by_you": true,
                      "composition_ids": [
                        "9d2f19e2-2366-46bd-8963-869c340f723a:film"
                      ],
                      "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Project UUID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Maximum number of exports to return (1–100)."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque pagination cursor returned as next_cursor from the previous page."
          },
          {
            "in": "query",
            "name": "origin",
            "required": false,
            "description": "Optional request origin. Omit to include app, API and unattributed historical exports.",
            "schema": {
              "type": "string",
              "enum": [
                "app",
                "api"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/project-exports/list-project-export-jobs",
          "metadata": {
            "title": "List exports",
            "sidebarTitle": "List exports"
          }
        }
      }
    },
    "/projects/{id}/exports/{export_id}": {
      "get": {
        "operationId": "ReadAProjectExportJob",
        "summary": "Read an export",
        "tags": [
          "Exports"
        ],
        "description": "Read export status and its download link. Links expire after one hour; read again to renew.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:sessions:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionGetProjectExportResponse"
                },
                "example": {
                  "generation_id": "9d2f19e2-2366-46bd-8963-869c340f723a",
                  "id": "46ed7444-a055-462b-9c17-0a2cdd5ca393",
                  "project_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "format": "mp4",
                  "created_at": "2026-11-17T20:00:00Z",
                  "status": "completed",
                  "progress": 100,
                  "stage": "completed",
                  "warnings": [],
                  "error": null,
                  "download_url": "https://downloads.example.com/film.mp4",
                  "expires_at": "2026-11-17T20:15:00Z",
                  "filename": "film.mp4",
                  "origin": "api",
                  "created_by": "bfa220bc-731d-4d9a-a6bf-e7da483f52ca",
                  "content_type": "video/mp4",
                  "created_by_you": true,
                  "composition_ids": [
                    "9d2f19e2-2366-46bd-8963-869c340f723a:film"
                  ],
                  "turn_id": "e8c3af4c-4f37-46b7-8b0d-53b09a67d6cb"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Project UUID."
          },
          {
            "name": "export_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Export job UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/project-exports/read-a-project-export-job",
          "metadata": {
            "title": "Read an export",
            "sidebarTitle": "Read an export"
          }
        }
      }
    },
    "/assets": {
      "get": {
        "operationId": "ListLibraryAssets",
        "summary": "List assets",
        "tags": [
          "Library"
        ],
        "description": "List library assets you can access.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:assets:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionListLibraryAssetsResponse"
                },
                "example": {
                  "assets": [
                    {
                      "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "filename": "launch.mp4",
                      "status": "uploading",
                      "created_at": "2026-11-17T20:00:00Z"
                    }
                  ],
                  "total": 1,
                  "has_more": false,
                  "next_offset": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "Maximum number of Library assets to return."
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100000,
              "default": 0
            },
            "description": "Number of assets to skip for offset pagination."
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Case-insensitive filename search filter."
          },
          {
            "name": "asset_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "audio",
                "pdf",
                "file"
              ]
            },
            "description": "Filter by media category (video, image, audio, font, or document)."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/media-library/list-library-assets",
          "metadata": {
            "title": "List assets",
            "sidebarTitle": "List assets"
          }
        }
      }
    },
    "/assets/{asset_id}": {
      "get": {
        "operationId": "ReadLibraryAsset",
        "summary": "Read an asset",
        "tags": [
          "Library"
        ],
        "description": "Read an asset and its download link.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:assets:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionGetLibraryAssetResponse"
                },
                "example": {
                  "asset": {
                    "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                    "filename": "launch.mp4",
                    "status": "uploading",
                    "created_at": "2026-11-17T20:00:00Z",
                    "download_url": null,
                    "expires_at": null
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Library asset UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/media-library/read-library-asset",
          "metadata": {
            "title": "Read an asset",
            "sidebarTitle": "Read an asset"
          }
        }
      }
    },
    "/uploads": {
      "post": {
        "tags": [
          "Library"
        ],
        "operationId": "createLibraryUpload",
        "summary": "Create an upload",
        "description": "Create an upload. Send the file to upload_url using the returned form fields, then complete the upload.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:assets:write"
            ]
          },
          {
            "MotionOAuth": [
              "motion:sessions:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": false,
                    "properties": {
                      "filename": {
                        "type": "string",
                        "maxLength": 255,
                        "minLength": 1,
                        "description": "Filename only, without directory separators or control characters."
                      },
                      "content_type": {
                        "type": "string"
                      },
                      "file_size": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 536870912
                      }
                    },
                    "required": [
                      "filename",
                      "content_type",
                      "file_size"
                    ],
                    "title": "Library upload"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "filename": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "content_type": {
                        "type": "string",
                        "enum": [
                          "video/mp4",
                          "video/quicktime",
                          "video/x-msvideo",
                          "video/webm",
                          "video/x-matroska",
                          "video/x-m4v",
                          "audio/mpeg",
                          "audio/mp3",
                          "audio/wav",
                          "audio/mp4",
                          "audio/x-m4a",
                          "audio/flac",
                          "audio/ogg",
                          "audio/aac",
                          "audio/opus",
                          "audio/webm",
                          "image/png",
                          "image/jpeg",
                          "image/jpg",
                          "image/gif",
                          "image/webp",
                          "image/svg+xml"
                        ]
                      }
                    },
                    "required": [
                      "filename",
                      "content_type"
                    ],
                    "not": {
                      "required": [
                        "file_size"
                      ]
                    },
                    "additionalProperties": false,
                    "description": "Legacy temporary attachment ticket. Omit file_size; this does not create a Library asset and has no completion step. Maximum video 5 GiB, audio 500 MiB or image 50 MiB.",
                    "title": "Legacy temporary attachment"
                  }
                ]
              },
              "example": {
                "filename": "brand-guide.pdf",
                "content_type": "application/pdf",
                "file_size": 123456
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Legacy temporary attachment ticket; no Library asset is created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "upload_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "upload_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "attachment_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "content_type": {
                      "type": "string"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "upload_method": {
                      "type": "string",
                      "const": "POST"
                    },
                    "upload_fields": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "upload_url_expires_in_seconds": {
                      "type": "integer",
                      "const": 3600
                    },
                    "attachment_url_expires_in_seconds": {
                      "type": "integer",
                      "const": 604800
                    },
                    "max_file_size_bytes": {
                      "type": "integer",
                      "enum": [
                        5368709120,
                        524288000,
                        52428800
                      ]
                    }
                  },
                  "required": [
                    "upload_id",
                    "upload_url",
                    "attachment_url",
                    "content_type",
                    "filename",
                    "upload_method",
                    "upload_fields",
                    "upload_url_expires_in_seconds",
                    "attachment_url_expires_in_seconds",
                    "max_file_size_bytes"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "upload_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "upload_url": "https://uploads.motion.so/example-upload",
                  "attachment_url": "https://downloads.example.com/launch.mp4",
                  "content_type": "video/mp4",
                  "filename": "launch.mp4",
                  "upload_method": "POST",
                  "upload_fields": {},
                  "upload_url_expires_in_seconds": 3600,
                  "attachment_url_expires_in_seconds": 604800,
                  "max_file_size_bytes": 5368709120
                }
              }
            }
          },
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCreateLibraryUploadResponse"
                },
                "example": {
                  "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "status": "uploading",
                  "upload_url": "https://uploads.motion.so/example-upload",
                  "upload_method": "POST",
                  "upload_fields": {},
                  "expires_at": "2026-11-17T20:00:00Z"
                }
              }
            }
          },
          "400": {
            "description": "Invalid upload input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing asset-write permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Upload ticket limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/library/upload-a-library-asset",
          "metadata": {
            "title": "Create an upload",
            "sidebarTitle": "Create an upload"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/uploads/{id}/complete": {
      "post": {
        "tags": [
          "Library"
        ],
        "operationId": "completeLibraryUpload",
        "summary": "Complete an upload",
        "description": "Complete an upload after sending the file. The returned asset ID can be reused in projects and brand kits.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:assets:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Upload / asset UUID returned by POST /uploads."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCompleteLibraryUploadResponse"
                },
                "example": {
                  "asset": {
                    "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                    "filename": "launch.mp4",
                    "status": "uploading",
                    "created_at": "2026-11-17T20:00:00Z",
                    "download_url": null,
                    "expires_at": null
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bytes do not match the ticket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing asset-write permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Upload not found in this scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Upload the file first",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/library/complete-a-library-upload",
          "metadata": {
            "title": "Complete an upload",
            "sidebarTitle": "Complete an upload"
          }
        }
      }
    },
    "/templates/list": {
      "get": {
        "operationId": "ListTemplates",
        "summary": "List templates",
        "tags": [
          "Templates"
        ],
        "description": "List saved templates you can use.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:templates:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionListVisualTemplatesResponse"
                },
                "example": {
                  "templates": [
                    {
                      "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "title": "Product launch",
                      "kind": "video",
                      "mode": "style",
                      "editable": true,
                      "version_id": null,
                      "instructions": "Use the saved layout and adapt the text to the new brief.",
                      "width": null,
                      "height": null,
                      "duration_seconds": null,
                      "preview_status": "preparing",
                      "preview_url": null,
                      "thumbnail_url": null,
                      "brand_kit_id": null,
                      "default_brand_kit_available": true,
                      "generation_id": null,
                      "created_at": null,
                      "resource_url": "/api/motion/templates/launch-film"
                    }
                  ],
                  "next_cursor": null,
                  "has_more": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            },
            "description": "Maximum number of saved templates to return (1–60)."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 512
            },
            "description": "Opaque pagination cursor returned as next_cursor from the previous page."
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Search saved template titles and instructions."
          },
          {
            "name": "ownership",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "mine",
                "shared",
                "workspace"
              ]
            },
            "description": "Filter by ownership scope (all, mine, shared, or workspace)."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/templates/list-templates",
          "metadata": {
            "title": "List templates",
            "sidebarTitle": "List templates"
          }
        }
      }
    },
    "/templates/{slug}": {
      "get": {
        "operationId": "ReadTemplate",
        "summary": "Read a template",
        "tags": [
          "Templates"
        ],
        "description": "Read a saved template.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:templates:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionGetVisualTemplateResponse"
                },
                "example": {
                  "template": {
                    "id": "launch-film",
                    "title": "Product launch",
                    "kind": "video",
                    "mode": "style",
                    "editable": true,
                    "version_id": null,
                    "instructions": "Use the saved layout and adapt the text to the new brief.",
                    "width": null,
                    "height": null,
                    "duration_seconds": null,
                    "preview_status": "preparing",
                    "preview_url": null,
                    "thumbnail_url": null,
                    "brand_kit_id": null,
                    "default_brand_kit_available": true,
                    "generation_id": null,
                    "created_at": null,
                    "resource_url": "/api/motion/templates/launch-film"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template identifier (the id field returned by list or create templates)."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/templates/read-template",
          "metadata": {
            "title": "Read a template",
            "sidebarTitle": "Read a template"
          }
        }
      },
      "patch": {
        "operationId": "UpdateTemplate",
        "summary": "Update a template",
        "tags": [
          "Templates"
        ],
        "description": "Update a template. Supply its current version_id.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:templates:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionUpdateTemplateResponse"
                },
                "example": {
                  "template": {
                    "id": "launch-film",
                    "title": "Product launch",
                    "kind": "video",
                    "mode": "style",
                    "editable": true,
                    "version_id": null,
                    "instructions": "Use the saved layout and adapt the text to the new brief.",
                    "width": null,
                    "height": null,
                    "duration_seconds": null,
                    "preview_status": "preparing",
                    "preview_url": null,
                    "thumbnail_url": null,
                    "brand_kit_id": null,
                    "default_brand_kit_available": true,
                    "generation_id": null,
                    "created_at": null,
                    "resource_url": "/api/motion/templates/launch-film"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource conflict. Fetch the latest state and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template identifier (the id field returned by list or create templates)."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "version_id"
                ],
                "properties": {
                  "version_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "instructions": {
                    "type": "string",
                    "maxLength": 12000
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "style",
                      "layout_and_style"
                    ]
                  }
                }
              },
              "example": {
                "version_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                "title": "Updated launch template"
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/templates/update-template",
          "metadata": {
            "title": "Update a template",
            "sidebarTitle": "Update a template"
          }
        }
      },
      "delete": {
        "operationId": "DeleteTemplate",
        "summary": "Delete a template",
        "tags": [
          "Templates"
        ],
        "description": "Delete a template.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:templates:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionDeleteTemplateResponse"
                },
                "example": {
                  "id": "user-launch-film",
                  "deleted": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource conflict. Fetch the latest state and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Template identifier (the id field returned by list or create templates)."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/templates/delete-template",
          "metadata": {
            "title": "Delete a template",
            "sidebarTitle": "Delete a template"
          }
        }
      }
    },
    "/brand-kits": {
      "get": {
        "operationId": "ListBrandKits",
        "summary": "List brand kits",
        "tags": [
          "Brand kits"
        ],
        "description": "List brand kits you can use.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:brand-kits:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionListBrandKitsResponse"
                },
                "example": {
                  "kits": [
                    {
                      "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "definition": {
                        "version": 1,
                        "name": "Acme",
                        "sections": [
                          {
                            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                            "title": "Voice",
                            "text": "Clear, concise and confident.",
                            "assets": []
                          }
                        ]
                      },
                      "updated_at": "2026-11-17T20:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Filter brand kits by name."
          },
          {
            "name": "ownership",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "mine",
                "shared",
                "workspace"
              ]
            },
            "description": "Filter by ownership scope (all, mine, shared, or workspace)."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/brand-kits/list-brand-kits",
          "metadata": {
            "title": "List brand kits",
            "sidebarTitle": "List brand kits"
          }
        }
      },
      "post": {
        "operationId": "CreateABrandKit",
        "summary": "Create a brand kit",
        "tags": [
          "Brand kits"
        ],
        "description": "Create a brand kit from sections of text and library assets.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:brand-kits:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCreateBrandKitResponse"
                },
                "example": {
                  "kit": {
                    "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                    "definition": {
                      "version": 1,
                      "name": "Acme",
                      "sections": [
                        {
                          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                          "title": "Voice",
                          "text": "Clear, concise and confident.",
                          "assets": []
                        }
                      ]
                    },
                    "updated_at": "2026-11-17T20:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource conflict. Fetch the latest state and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "default": 1,
                    "type": "number",
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "sections": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "description": "Section ID to keep when updating. Generated when omitted.",
                          "type": "string",
                          "format": "uuid"
                        },
                        "title": {
                          "type": "string",
                          "maxLength": 160
                        },
                        "text": {
                          "default": "",
                          "type": "string",
                          "maxLength": 100000
                        },
                        "asset_ids": {
                          "default": [],
                          "description": "Ready Library asset IDs shown in this section, in order. Each is read through your current Library access.",
                          "maxItems": 500,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      },
                      "required": [
                        "title"
                      ],
                      "additionalProperties": false
                    },
                    "description": "Up to 50 sections, 100,000 text characters and 500 distinct Library asset IDs across the entire kit."
                  }
                },
                "required": [
                  "name",
                  "sections"
                ],
                "additionalProperties": false
              },
              "example": {
                "name": "Acme",
                "sections": [
                  {
                    "title": "Product launch"
                  }
                ]
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/brand-kits/create-a-brand-kit",
          "metadata": {
            "title": "Create a brand kit",
            "sidebarTitle": "Create a brand kit"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional UUID for identical REST retries. Reuse the same key and body after a lost response.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/brand-kits/{brand_kit_id}": {
      "get": {
        "operationId": "ReadABrandKit",
        "summary": "Read a brand kit",
        "tags": [
          "Brand kits"
        ],
        "description": "Read a brand kit.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:brand-kits:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionGetBrandKitResponse"
                },
                "example": {
                  "kit": {
                    "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                    "definition": {
                      "version": 1,
                      "name": "Acme",
                      "sections": [
                        {
                          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                          "title": "Voice",
                          "text": "Clear, concise and confident.",
                          "assets": []
                        }
                      ]
                    },
                    "updated_at": "2026-11-17T20:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "brand_kit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Brand kit UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/brand-kits/read-a-brand-kit",
          "metadata": {
            "title": "Read a brand kit",
            "sidebarTitle": "Read a brand kit"
          }
        }
      },
      "put": {
        "operationId": "UpdateABrandKit",
        "summary": "Update a brand kit",
        "tags": [
          "Brand kits"
        ],
        "description": "Update a brand kit. Supply its current updated_at.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:brand-kits:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionUpdateBrandKitResponse"
                },
                "example": {
                  "kit": {
                    "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                    "definition": {
                      "version": 1,
                      "name": "Acme",
                      "sections": [
                        {
                          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
                          "title": "Voice",
                          "text": "Clear, concise and confident.",
                          "assets": []
                        }
                      ]
                    },
                    "updated_at": "2026-11-17T20:00:00Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource conflict. Fetch the latest state and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "brand_kit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Brand kit UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "definition": {
                    "type": "object",
                    "properties": {
                      "version": {
                        "default": 1,
                        "type": "number",
                        "const": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "sections": {
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "description": "Section ID to keep when updating. Generated when omitted.",
                              "type": "string",
                              "format": "uuid"
                            },
                            "title": {
                              "type": "string",
                              "maxLength": 160
                            },
                            "text": {
                              "default": "",
                              "type": "string",
                              "maxLength": 100000
                            },
                            "asset_ids": {
                              "default": [],
                              "description": "Ready Library asset IDs shown in this section, in order. Each is read through your current Library access.",
                              "maxItems": 500,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              }
                            }
                          },
                          "required": [
                            "title"
                          ],
                          "additionalProperties": false
                        },
                        "description": "Up to 50 sections, 100,000 text characters and 500 distinct Library asset IDs across the entire kit."
                      }
                    },
                    "required": [
                      "name",
                      "sections"
                    ],
                    "additionalProperties": false
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "definition",
                  "updated_at"
                ],
                "additionalProperties": false
              },
              "example": {
                "definition": {
                  "version": 1,
                  "name": "Acme",
                  "sections": [
                    {
                      "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "title": "Product launch"
                    }
                  ]
                },
                "updated_at": "2026-11-17T20:00:00Z"
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/brand-kits/update-a-brand-kit",
          "metadata": {
            "title": "Update a brand kit",
            "sidebarTitle": "Update a brand kit"
          }
        }
      },
      "delete": {
        "operationId": "DeleteBrandKit",
        "summary": "Delete a brand kit",
        "tags": [
          "Brand kits"
        ],
        "description": "Delete a brand kit.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:brand-kits:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionDeleteBrandKitResponse"
                },
                "example": {
                  "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "deleted": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource conflict. Fetch the latest state and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "brand_kit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Brand kit UUID."
          },
          {
            "name": "updated_at",
            "in": "query",
            "required": false,
            "description": "Current updated_at ISO 8601 timestamp from the last read. Alternative to the If-Match header or JSON body.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "description": "Current updated_at ISO 8601 timestamp (optionally quoted). Alternative to the updated_at query parameter or JSON body.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "updated_at"
                ],
                "properties": {
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "example": {
                "updated_at": "2026-11-17T20:00:00Z"
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/brand-kits/delete-brand-kit",
          "metadata": {
            "title": "Delete a brand kit",
            "sidebarTitle": "Delete a brand kit"
          }
        }
      }
    },
    "/connectors": {
      "get": {
        "operationId": "ListConnectors",
        "summary": "List connectors",
        "tags": [
          "Connectors"
        ],
        "description": "List supported services and their connection requirements.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:connectors:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionConnectorCatalog"
                },
                "example": {
                  "connectors": [
                    {
                      "id": "github",
                      "name": "GitHub",
                      "scope": "organization",
                      "authentication": "oauth",
                      "available": true,
                      "unavailable_reason": null,
                      "input_schema": {
                        "type": "object",
                        "properties": {
                          "connector_id": {
                            "type": "string",
                            "const": "github"
                          }
                        },
                        "required": [
                          "connector_id"
                        ],
                        "additionalProperties": false
                      },
                      "permission_options": [
                        {
                          "id": "repositories",
                          "label": "Read repository details",
                          "write": false
                        },
                        {
                          "id": "code",
                          "label": "Read and search code",
                          "write": false
                        },
                        {
                          "id": "issues",
                          "label": "Read issues and pull requests",
                          "write": false
                        },
                        {
                          "id": "history",
                          "label": "Read commits and releases",
                          "write": false
                        }
                      ],
                      "project_usable": true,
                      "visibility": "private"
                    },
                    {
                      "id": "youtube",
                      "name": "YouTube",
                      "scope": "organization",
                      "visibility": "private",
                      "authentication": "oauth",
                      "available": true,
                      "unavailable_reason": null,
                      "input_schema": {
                        "type": "object",
                        "properties": {
                          "connector_id": {
                            "type": "string",
                            "const": "youtube"
                          }
                        },
                        "required": [
                          "connector_id"
                        ],
                        "additionalProperties": false
                      },
                      "permission_options": [
                        {
                          "id": "posts",
                          "label": "Read accounts and posts",
                          "write": false
                        },
                        {
                          "id": "prepare",
                          "label": "Prepare posts for approval",
                          "write": true
                        },
                        {
                          "id": "discard",
                          "label": "Discard pending proposals",
                          "write": true
                        }
                      ],
                      "project_usable": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider inputs or credential verification failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Required scope or current account access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Provider setup is not configured or temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/connectors/list-connectors"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/connections": {
      "get": {
        "operationId": "ListConnections",
        "summary": "List connections",
        "tags": [
          "Connectors"
        ],
        "description": "Read your private connections and their available actions. Social authorization completion is reconciled when you poll connections after approving the link.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:connectors:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionPrivateConnections"
                },
                "example": {
                  "connections": [
                    {
                      "id": "6f1c0c1e-2b8a-4c55-9a51-0b6c1f0f7d10",
                      "connector_id": "github",
                      "scope": "organization",
                      "name": "acme-dev",
                      "status": "connected",
                      "can_use": true,
                      "capabilities": {
                        "repositories": true,
                        "code": true,
                        "issues": true,
                        "history": true
                      },
                      "permission_options": [
                        {
                          "id": "repositories",
                          "label": "Read repository details",
                          "write": false
                        },
                        {
                          "id": "code",
                          "label": "Read and search code",
                          "write": false
                        },
                        {
                          "id": "issues",
                          "label": "Read issues and pull requests",
                          "write": false
                        },
                        {
                          "id": "history",
                          "label": "Read commits and releases",
                          "write": false
                        }
                      ],
                      "verified_at": "2026-11-17T20:00:00Z",
                      "created_at": "2026-11-17T20:00:00Z",
                      "updated_at": "2026-11-17T20:00:00Z",
                      "error": null,
                      "visibility": "private",
                      "organization_id": "motion-example",
                      "workspace_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider inputs or credential verification failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Required scope or current account access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Provider setup is not configured or temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/connectors/list-connections"
        },
        "parameters": [
          {
            "name": "connector_id",
            "in": "query",
            "description": "Filter by catalog service ID. Omit to list all your private organization accounts.",
            "schema": {
              "type": "string",
              "enum": [
                "github",
                "notion",
                "figma",
                "google-drive",
                "dropbox",
                "getty",
                "s3",
                "slack",
                "x"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      },
      "post": {
        "operationId": "ConnectService",
        "summary": "Connect a service",
        "tags": [
          "Connectors"
        ],
        "description": "Connect a service using its catalog ID. OAuth returns an approval link; credentials are verified before saving. New connections are private to their creator inside the organization. Social account setup requires a workspace manager.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:connectors:write"
            ]
          }
        ],
        "responses": {
          "201": {
            "description": "Connection setup started.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionConnectServiceResponse"
                },
                "example": {
                  "connector_id": "google-drive",
                  "scope": "organization",
                  "status": "pending_authorization",
                  "authorization_url": "https://connect.example.com/oauth/authorize?session=EXAMPLE",
                  "expires_at": "2026-11-17T20:30:00Z",
                  "connections_url": "/api/motion/connections?connector_id=google-drive",
                  "visibility": "private"
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider inputs or credential verification failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Required scope or current account access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Private organization connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Provider setup is not configured or temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/connectors/connect-a-service"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MotionConnectServiceRequest"
              },
              "examples": {
                "oauth": {
                  "summary": "Connect an OAuth service",
                  "value": {
                    "connector_id": "google-drive"
                  }
                },
                "getty": {
                  "summary": "Connect Getty with credentials",
                  "value": {
                    "connector_id": "getty",
                    "credentials": {
                      "api_key": "YOUR_GETTY_API_KEY",
                      "client_secret": "YOUR_GETTY_CLIENT_SECRET"
                    }
                  }
                },
                "s3": {
                  "summary": "Read-only S3 access",
                  "value": {
                    "connector_id": "s3",
                    "credentials": {
                      "access_key_id": "AKIAEXAMPLE00000000",
                      "secret_access_key": "YOUR_AWS_SECRET_ACCESS_KEY"
                    },
                    "config": {
                      "bucket": "acme-media",
                      "region": "us-east-1",
                      "prefix": "motion/",
                      "read_test_key": "motion/existing-video.mp4"
                    },
                    "actions": [
                      "files",
                      "downloads"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/connections/{connection_id}": {
      "get": {
        "operationId": "ReadConnection",
        "summary": "Read a connection",
        "tags": [
          "Connectors"
        ],
        "description": "Read your private connections and their available actions. Social authorization completion is reconciled when you poll connections after approving the link.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:connectors:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionGetConnectionResponse"
                },
                "example": {
                  "connection": {
                    "id": "6f1c0c1e-2b8a-4c55-9a51-0b6c1f0f7d10",
                    "connector_id": "github",
                    "scope": "organization",
                    "name": "acme-dev",
                    "status": "connected",
                    "can_use": true,
                    "capabilities": {
                      "repositories": true,
                      "code": true,
                      "issues": true,
                      "history": true
                    },
                    "permission_options": [
                      {
                        "id": "repositories",
                        "label": "Read repository details",
                        "write": false
                      },
                      {
                        "id": "code",
                        "label": "Read and search code",
                        "write": false
                      },
                      {
                        "id": "issues",
                        "label": "Read issues and pull requests",
                        "write": false
                      },
                      {
                        "id": "history",
                        "label": "Read commits and releases",
                        "write": false
                      }
                    ],
                    "verified_at": "2026-11-17T20:00:00Z",
                    "created_at": "2026-11-17T20:00:00Z",
                    "updated_at": "2026-11-17T20:00:00Z",
                    "error": null,
                    "visibility": "private",
                    "organization_id": "motion-example",
                    "workspace_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider inputs or credential verification failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Required scope or current account access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Private organization connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Provider setup is not configured or temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/connectors/read-a-connection"
        },
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "description": "Your organization member UUID from List connections.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      },
      "delete": {
        "operationId": "DeleteConnection",
        "summary": "Delete a connection",
        "tags": [
          "Connectors"
        ],
        "description": "Disconnect a service.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:connectors:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionDeleteConnectionResponse"
                },
                "example": {
                  "id": "6f1c0c1e-2b8a-4c55-9a51-0b6c1f0f7d10",
                  "deleted": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider inputs or credential verification failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid or revoked credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Required scope or current account access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Private organization connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Provider setup is not configured or temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/connectors/delete-a-connection"
        },
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "description": "Your organization member UUID from List connections.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/automations/capabilities": {
      "get": {
        "summary": "Automation capabilities",
        "operationId": "get_automation_capabilities",
        "tags": [
          "Automations"
        ],
        "description": "List available automation triggers.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationCapabilities"
                },
                "example": {
                  "triggers": [
                    "schedule_recurring",
                    "schedule_once",
                    "youtube_video_uploaded"
                  ],
                  "operations": [
                    "capabilities",
                    "list",
                    "get",
                    "create",
                    "update",
                    "delete",
                    "run",
                    "runs",
                    "run_detail",
                    "retry",
                    "analytics"
                  ],
                  "default_effort": "standard",
                  "execution_supported": true,
                  "update_constraints": "documented fields",
                  "run_destination": "new_chat",
                  "schedule_semantics": "elapsed_minutes",
                  "execution_engine": "gva"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/get-automation-capabilities",
          "metadata": {
            "title": "Automation capabilities",
            "sidebarTitle": "Automation capabilities"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/automations": {
      "get": {
        "summary": "List automations",
        "operationId": "list_automations",
        "tags": [
          "Automations"
        ],
        "description": "List your automations.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationList"
                },
                "example": {
                  "automations": [
                    {
                      "id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
                      "name": "Daily product update",
                      "enabled": true,
                      "prompt": "Create a 15-second 16:9 animated update summarizing the latest release notes.",
                      "trigger": {
                        "type": "schedule_recurring",
                        "platform": "schedule",
                        "label": "Every 24 hours",
                        "source": "Schedule",
                        "interval_minutes": 1440
                      },
                      "created_at": "2026-11-18T14:00:00Z",
                      "updated_at": "2026-11-19T14:02:18Z",
                      "next_run_at": "2026-11-20T14:00:00Z",
                      "runs": [
                        {
                          "id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                          "status": "completed",
                          "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                          "queued_at": "2026-11-19T14:00:00Z",
                          "started_at": "2026-11-19T14:00:03Z",
                          "completed_at": "2026-11-19T14:02:18Z",
                          "attempt": 1,
                          "result_summary": "Created the daily product update video.",
                          "error": null
                        }
                      ],
                      "memory": {
                        "remember_processed_items": true,
                        "include_previous_runs": 5,
                        "compact_after_runs": 20
                      },
                      "max_concurrent_runs": 1,
                      "max_runs_per_hour": 4
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/list-automations",
          "metadata": {
            "title": "List automations",
            "sidebarTitle": "List automations"
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of automations to return (1–100, default 50)."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            },
            "description": "Opaque next_cursor from the preceding page. Preserve the same filters."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 160
            },
            "description": "Case-insensitive name and prompt search."
          },
          {
            "name": "enabled",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Filter by active state (true for enabled, false for paused)."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      },
      "post": {
        "summary": "Create an automation",
        "operationId": "create_automation",
        "tags": [
          "Automations"
        ],
        "description": "Create an automation that runs on a schedule or channel event. Each run starts a new project.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:write"
            ]
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationEnvelope"
                },
                "example": {
                  "automation": {
                    "id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
                    "name": "Daily product update",
                    "enabled": true,
                    "prompt": "Create a 15-second 16:9 animated update summarizing the latest release notes.",
                    "trigger": {
                      "type": "schedule_recurring",
                      "platform": "schedule",
                      "label": "Every 24 hours",
                      "source": "Schedule",
                      "interval_minutes": 1440
                    },
                    "created_at": "2026-11-18T14:00:00Z",
                    "updated_at": "2026-11-19T14:02:18Z",
                    "next_run_at": "2026-11-20T14:00:00Z",
                    "runs": [
                      {
                        "id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                        "status": "completed",
                        "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                        "queued_at": "2026-11-19T14:00:00Z",
                        "started_at": "2026-11-19T14:00:03Z",
                        "completed_at": "2026-11-19T14:02:18Z",
                        "attempt": 1,
                        "result_summary": "Created the daily product update video.",
                        "error": null
                      }
                    ],
                    "memory": {
                      "remember_processed_items": true,
                      "include_previous_runs": 5,
                      "compact_after_runs": 20
                    },
                    "max_concurrent_runs": 1,
                    "max_runs_per_hour": 4
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable environment, or automation/run not owned by this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/create-automation",
          "metadata": {
            "title": "Create an automation",
            "sidebarTitle": "Create an automation"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAutomationRequest"
              },
              "example": {
                "name": "Daily update",
                "prompt": "Create a short daily title animation.",
                "trigger": {
                  "type": "schedule_recurring",
                  "platform": "schedule",
                  "label": "Every day",
                  "source": "Schedule",
                  "interval_minutes": 1440
                },
                "execution": {
                  "effort": "standard"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/automations/{automation_id}": {
      "get": {
        "summary": "Read an automation",
        "operationId": "get_automation",
        "tags": [
          "Automations"
        ],
        "description": "Read an automation and its recent runs.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationEnvelope"
                },
                "example": {
                  "automation": {
                    "id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
                    "name": "Daily product update",
                    "enabled": true,
                    "prompt": "Create a 15-second 16:9 animated update summarizing the latest release notes.",
                    "trigger": {
                      "type": "schedule_recurring",
                      "platform": "schedule",
                      "label": "Every 24 hours",
                      "source": "Schedule",
                      "interval_minutes": 1440
                    },
                    "created_at": "2026-11-18T14:00:00Z",
                    "updated_at": "2026-11-19T14:02:18Z",
                    "next_run_at": "2026-11-20T14:00:00Z",
                    "runs": [
                      {
                        "id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                        "status": "completed",
                        "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                        "queued_at": "2026-11-19T14:00:00Z",
                        "started_at": "2026-11-19T14:00:03Z",
                        "completed_at": "2026-11-19T14:02:18Z",
                        "attempt": 1,
                        "result_summary": "Created the daily product update video.",
                        "error": null
                      }
                    ],
                    "memory": {
                      "remember_processed_items": true,
                      "include_previous_runs": 5,
                      "compact_after_runs": 20
                    },
                    "max_concurrent_runs": 1,
                    "max_runs_per_hour": 4
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable environment, or automation/run not owned by this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/get-automation",
          "metadata": {
            "title": "Read an automation",
            "sidebarTitle": "Read an automation"
          }
        },
        "parameters": [
          {
            "name": "automation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "ID returned by list or create."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      },
      "patch": {
        "summary": "Update an automation",
        "operationId": "update_automation",
        "tags": [
          "Automations"
        ],
        "description": "Update an automation. Set enabled to false to pause it.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationEnvelope"
                },
                "example": {
                  "automation": {
                    "id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
                    "name": "Daily product update",
                    "enabled": false,
                    "prompt": "Create a 15-second 16:9 animated update summarizing the latest release notes.",
                    "trigger": {
                      "type": "schedule_recurring",
                      "platform": "schedule",
                      "label": "Every 24 hours",
                      "source": "Schedule",
                      "interval_minutes": 1440
                    },
                    "created_at": "2026-11-18T14:00:00Z",
                    "updated_at": "2026-11-19T14:02:18Z",
                    "next_run_at": "2026-11-20T14:00:00Z",
                    "runs": [
                      {
                        "id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                        "status": "completed",
                        "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                        "queued_at": "2026-11-19T14:00:00Z",
                        "started_at": "2026-11-19T14:00:03Z",
                        "completed_at": "2026-11-19T14:02:18Z",
                        "attempt": 1,
                        "result_summary": "Created the daily product update video.",
                        "error": null
                      }
                    ],
                    "memory": {
                      "remember_processed_items": true,
                      "include_previous_runs": 5,
                      "compact_after_runs": 20
                    },
                    "max_concurrent_runs": 1,
                    "max_runs_per_hour": 4
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable environment, or automation/run not owned by this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "409": {
            "description": "Concurrent execution edit: update_conflict. Read the automation again before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/update-automation",
          "metadata": {
            "title": "Update an automation",
            "sidebarTitle": "Update an automation"
          }
        },
        "parameters": [
          {
            "name": "automation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "ID returned by list or create."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAutomationRequest"
              },
              "example": {
                "enabled": false
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete an automation",
        "operationId": "delete_automation",
        "tags": [
          "Automations"
        ],
        "description": "Delete an automation and its history.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationDeleted"
                },
                "example": {
                  "deleted": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable environment, or automation/run not owned by this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/delete-automation",
          "metadata": {
            "title": "Delete an automation",
            "sidebarTitle": "Delete an automation"
          }
        },
        "parameters": [
          {
            "name": "automation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "ID returned by list or create."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/automations/{automation_id}/run": {
      "post": {
        "summary": "Run an automation",
        "operationId": "run_automation",
        "tags": [
          "Automations"
        ],
        "description": "Run a scheduled automation now. Channel automations run when a matching provider event arrives.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Existing invocation returned for a reused UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationInvocation"
                },
                "example": {
                  "automation": {
                    "id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
                    "name": "Daily product update",
                    "enabled": true,
                    "prompt": "Create a 15-second 16:9 animated update summarizing the latest release notes.",
                    "trigger": {
                      "type": "schedule_recurring",
                      "platform": "schedule",
                      "label": "Every 24 hours",
                      "source": "Schedule",
                      "interval_minutes": 1440
                    },
                    "created_at": "2026-11-18T14:00:00Z",
                    "updated_at": "2026-11-19T14:02:18Z",
                    "next_run_at": "2026-11-20T14:00:00Z",
                    "runs": [
                      {
                        "id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                        "status": "completed",
                        "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                        "queued_at": "2026-11-19T14:00:00Z",
                        "started_at": "2026-11-19T14:00:03Z",
                        "completed_at": "2026-11-19T14:02:18Z",
                        "attempt": 1,
                        "result_summary": "Created the daily product update video.",
                        "error": null
                      }
                    ],
                    "memory": {
                      "remember_processed_items": true,
                      "include_previous_runs": 5,
                      "compact_after_runs": 20
                    },
                    "max_concurrent_runs": 1,
                    "max_runs_per_hour": 4
                  },
                  "run": {
                    "id": "run_01j9x6a1b2c3d4e5f6g7h8j9",
                    "status": "queued",
                    "motion_agent_chat_id": null,
                    "queued_at": "2026-11-19T15:00:00Z",
                    "started_at": null,
                    "completed_at": null,
                    "attempt": 1,
                    "result_summary": null,
                    "error": null
                  },
                  "session": {
                    "id": "sess_01j9x6a1b2c3d4e5f6g7h8j9",
                    "run_id": "run_01j9x6a1b2c3d4e5f6g7h8j9",
                    "motion_agent_chat_id": null,
                    "status": "queued"
                  },
                  "deduplicated": true
                }
              }
            }
          },
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationInvocation"
                },
                "example": {
                  "automation": {
                    "id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
                    "name": "Daily product update",
                    "enabled": true,
                    "prompt": "Create a 15-second 16:9 animated update summarizing the latest release notes.",
                    "trigger": {
                      "type": "schedule_recurring",
                      "platform": "schedule",
                      "label": "Every 24 hours",
                      "source": "Schedule",
                      "interval_minutes": 1440
                    },
                    "created_at": "2026-11-18T14:00:00Z",
                    "updated_at": "2026-11-19T14:02:18Z",
                    "next_run_at": "2026-11-20T14:00:00Z",
                    "runs": [
                      {
                        "id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                        "status": "completed",
                        "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                        "queued_at": "2026-11-19T14:00:00Z",
                        "started_at": "2026-11-19T14:00:03Z",
                        "completed_at": "2026-11-19T14:02:18Z",
                        "attempt": 1,
                        "result_summary": "Created the daily product update video.",
                        "error": null
                      }
                    ],
                    "memory": {
                      "remember_processed_items": true,
                      "include_previous_runs": 5,
                      "compact_after_runs": 20
                    },
                    "max_concurrent_runs": 1,
                    "max_runs_per_hour": 4
                  },
                  "run": {
                    "id": "run_01j9x6a1b2c3d4e5f6g7h8j9",
                    "status": "queued",
                    "motion_agent_chat_id": null,
                    "queued_at": "2026-11-19T15:00:00Z",
                    "started_at": null,
                    "completed_at": null,
                    "attempt": 1,
                    "result_summary": null,
                    "error": null
                  },
                  "session": {
                    "id": "sess_01j9x6a1b2c3d4e5f6g7h8j9",
                    "run_id": "run_01j9x6a1b2c3d4e5f6g7h8j9",
                    "motion_agent_chat_id": null,
                    "status": "queued"
                  },
                  "deduplicated": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable environment, or automation/run not owned by this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "409": {
            "description": "automation_paused: resume before running.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/run-automation",
          "metadata": {
            "title": "Run an automation",
            "sidebarTitle": "Run an automation"
          }
        },
        "parameters": [
          {
            "name": "automation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "ID returned by list or create."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "New UUID for each intentional run. Reuse the same UUID after a lost response to avoid duplicate work."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/automations/{automation_id}/runs": {
      "get": {
        "summary": "List automation runs",
        "operationId": "list_automation_runs",
        "tags": [
          "Automations"
        ],
        "description": "List runs of an automation.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationRunPage"
                },
                "example": {
                  "runs": [
                    {
                      "id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                      "status": "completed",
                      "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "queued_at": "2026-11-19T14:00:00Z",
                      "started_at": "2026-11-19T14:00:03Z",
                      "completed_at": "2026-11-19T14:02:18Z",
                      "attempt": 1,
                      "result_summary": "Created the daily product update video.",
                      "error": null
                    }
                  ],
                  "total": 1,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable environment, or automation/run not owned by this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/list-automation-runs",
          "metadata": {
            "title": "List automation runs",
            "sidebarTitle": "List automation runs"
          }
        },
        "parameters": [
          {
            "name": "automation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "ID returned by list or create."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 1024
            },
            "description": "Opaque nextCursor from the previous page. Omit on the first page."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/automations/{automation_id}/runs/{run_id}": {
      "get": {
        "summary": "Read an automation run",
        "operationId": "get_automation_run",
        "tags": [
          "Automations"
        ],
        "description": "Read an automation run and its project.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationRunDetail"
                },
                "example": {
                  "automation": {
                    "id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
                    "name": "Daily product update",
                    "enabled": true,
                    "prompt": "Create a 15-second 16:9 animated update summarizing the latest release notes.",
                    "trigger": {
                      "type": "schedule_recurring",
                      "platform": "schedule",
                      "label": "Every 24 hours",
                      "source": "Schedule",
                      "interval_minutes": 1440
                    },
                    "created_at": "2026-11-18T14:00:00Z",
                    "updated_at": "2026-11-19T14:02:18Z",
                    "next_run_at": "2026-11-20T14:00:00Z",
                    "runs": [
                      {
                        "id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                        "status": "completed",
                        "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                        "queued_at": "2026-11-19T14:00:00Z",
                        "started_at": "2026-11-19T14:00:03Z",
                        "completed_at": "2026-11-19T14:02:18Z",
                        "attempt": 1,
                        "result_summary": "Created the daily product update video.",
                        "error": null
                      }
                    ],
                    "memory": {
                      "remember_processed_items": true,
                      "include_previous_runs": 5,
                      "compact_after_runs": 20
                    },
                    "max_concurrent_runs": 1,
                    "max_runs_per_hour": 4
                  },
                  "run": {
                    "id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                    "status": "completed",
                    "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                    "queued_at": "2026-11-19T14:00:00Z",
                    "started_at": "2026-11-19T14:00:03Z",
                    "completed_at": "2026-11-19T14:02:18Z",
                    "attempt": 1,
                    "result_summary": "Created the daily product update video.",
                    "error": null
                  },
                  "session": {
                    "id": "sess_01j9x5q2k7w8m4n3p6r9s1t2",
                    "run_id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                    "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                    "status": "completed"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable environment, or automation/run not owned by this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/get-automation-run",
          "metadata": {
            "title": "Read an automation run",
            "sidebarTitle": "Read an automation run"
          }
        },
        "parameters": [
          {
            "name": "automation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "ID returned by list or create."
          },
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Run ID from this automation."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/automations/{automation_id}/runs/{run_id}/retry": {
      "post": {
        "summary": "Retry an automation run",
        "operationId": "retry_automation_run",
        "tags": [
          "Automations"
        ],
        "description": "Retry a failed or blocked run.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:write"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationInvocation"
                },
                "example": {
                  "automation": {
                    "id": "auto_01j9x4m8n9p0q1r2s3t4u5v6",
                    "name": "Daily product update",
                    "enabled": true,
                    "prompt": "Create a 15-second 16:9 animated update summarizing the latest release notes.",
                    "trigger": {
                      "type": "schedule_recurring",
                      "platform": "schedule",
                      "label": "Every 24 hours",
                      "source": "Schedule",
                      "interval_minutes": 1440
                    },
                    "created_at": "2026-11-18T14:00:00Z",
                    "updated_at": "2026-11-19T14:02:18Z",
                    "next_run_at": "2026-11-20T14:00:00Z",
                    "runs": [
                      {
                        "id": "run_01j9x5q2k7w8m4n3p6r9s1t2",
                        "status": "completed",
                        "motion_agent_chat_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                        "queued_at": "2026-11-19T14:00:00Z",
                        "started_at": "2026-11-19T14:00:03Z",
                        "completed_at": "2026-11-19T14:02:18Z",
                        "attempt": 1,
                        "result_summary": "Created the daily product update video.",
                        "error": null
                      }
                    ],
                    "memory": {
                      "remember_processed_items": true,
                      "include_previous_runs": 5,
                      "compact_after_runs": 20
                    },
                    "max_concurrent_runs": 1,
                    "max_runs_per_hour": 4
                  },
                  "run": {
                    "id": "run_01j9x6a1b2c3d4e5f6g7h8j9",
                    "status": "queued",
                    "motion_agent_chat_id": null,
                    "queued_at": "2026-11-19T15:00:00Z",
                    "started_at": null,
                    "completed_at": null,
                    "attempt": 2,
                    "result_summary": null,
                    "error": null
                  },
                  "session": {
                    "id": "sess_01j9x6a1b2c3d4e5f6g7h8j9",
                    "run_id": "run_01j9x6a1b2c3d4e5f6g7h8j9",
                    "motion_agent_chat_id": null,
                    "status": "queued"
                  },
                  "deduplicated": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable environment, or automation/run not owned by this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "409": {
            "description": "automation_paused: resume before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/retry-automation-run",
          "metadata": {
            "title": "Retry an automation run",
            "sidebarTitle": "Retry an automation run"
          }
        },
        "parameters": [
          {
            "name": "automation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "ID returned by list or create."
          },
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Run ID from this automation."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/automations/{automation_id}/analytics": {
      "get": {
        "summary": "Read automation analytics",
        "operationId": "get_automation_analytics",
        "tags": [
          "Automations"
        ],
        "description": "Read daily run counts.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:automations:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationAnalytics"
                },
                "example": {
                  "days": 30,
                  "total": 4,
                  "buckets": [
                    {
                      "date": "2026-11-19",
                      "completed": 1,
                      "failed": 0,
                      "skipped": 0,
                      "in_progress": 0,
                      "total": 1
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor; read the error message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or wrong-audience credential.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "403": {
            "description": "Missing OAuth scope, account automation access, or engine access.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "404": {
            "description": "Unavailable environment, or automation/run not owned by this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable; retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutomationError"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/get-automation-analytics",
          "metadata": {
            "title": "Read automation analytics",
            "sidebarTitle": "Read automation analytics"
          }
        },
        "parameters": [
          {
            "name": "automation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "ID returned by list or create."
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 7,
              "maximum": 90,
              "default": 30
            },
            "description": "Number of trailing days to aggregate (7–90, default 30)."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/social/accounts": {
      "get": {
        "operationId": "ListSocialAccounts",
        "summary": "List social accounts",
        "tags": [
          "Social posting"
        ],
        "description": "List connected social accounts.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:social:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionListSocialAccountsResponse"
                },
                "example": {
                  "accounts": [
                    {
                      "id": "00000000-0000-4000-8000-000000000001",
                      "platform": "youtube",
                      "account_name": "Acme",
                      "avatar_url": null,
                      "agent_enabled": true,
                      "revision": 1,
                      "is_active": true
                    }
                  ],
                  "can_manage": true
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/social-posting/list-social-accounts",
          "metadata": {
            "title": "List social accounts",
            "sidebarTitle": "List social accounts"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/social/uploads": {
      "post": {
        "operationId": "CreateASocialUpload",
        "summary": "Create a social upload",
        "tags": [
          "Social posting"
        ],
        "description": "Create a presigned upload URL for custom social post media. For posts created from Motion projects, pass generation_id directly to POST /social/posts instead—Motion exports and attaches the media automatically.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:social:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCreateSocialUploadResponse"
                },
                "example": {
                  "upload_url": "https://automation.example.com/motion-events",
                  "media_url": "example"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource conflict. Fetch the latest state and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "description": "Source filename (e.g. launch.mp4)."
                  },
                  "content_type": {
                    "type": "string",
                    "description": "Image or video MIME type (e.g. video/mp4 or image/png)."
                  },
                  "file_size": {
                    "type": "integer",
                    "description": "Optional file size in bytes."
                  }
                },
                "required": [
                  "filename",
                  "content_type"
                ],
                "additionalProperties": false
              },
              "example": {
                "filename": "launch.mp4",
                "content_type": "video/mp4"
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/social-posting/create-a-social-upload",
          "metadata": {
            "title": "Create a social upload",
            "sidebarTitle": "Create a social upload"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/social/posts": {
      "get": {
        "operationId": "ListSocialPosts",
        "summary": "List social posts",
        "tags": [
          "Social posting"
        ],
        "description": "Read the latest 100 visible posts. Read an older post by its ID.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:social:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionListSocialPostsResponse"
                },
                "example": {
                  "posts": [
                    {
                      "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "connection_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                      "generation_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459",
                      "composition_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459:film",
                      "thumbnail_generation_id": null,
                      "status": "draft",
                      "media_status": "preparing",
                      "caption": "",
                      "title": "Launch video",
                      "description": "Introducing our latest product.",
                      "scheduled_at": "2026-11-19T18:00:00Z",
                      "created_at": "2026-11-18T22:00:00Z",
                      "approved_by": null,
                      "post_url": null,
                      "error": null,
                      "has_media": false,
                      "has_thumbnail": false,
                      "publication_locked": false
                    }
                  ],
                  "limit": 100,
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/social-posting/list-social-posts",
          "metadata": {
            "title": "List social posts",
            "sidebarTitle": "List social posts"
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Maximum number of social posts to return (1–100)."
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Cursor from the previous page (next_cursor)."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "in_review",
                "scheduled",
                "processing",
                "posted",
                "failed",
                "cancelled"
              ]
            },
            "description": "Filter posts by lifecycle status."
          },
          {
            "name": "connection_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Filter posts for one connected social account."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      },
      "post": {
        "operationId": "DraftAScheduledSocialPost",
        "summary": "Create a social post",
        "tags": [
          "Social posting"
        ],
        "description": "Create a draft from a generation. Motion exports its media automatically. YouTube and Reddit require title; use description for their post text. Other platforms use caption. Submit the draft for approval.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:social:write",
              "motion:sessions:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCreateSocialPostResponse"
                },
                "example": {
                  "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "connection_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "generation_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459",
                  "composition_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459:film",
                  "thumbnail_generation_id": null,
                  "status": "draft",
                  "media_status": "preparing",
                  "caption": "",
                  "title": "Launch video",
                  "description": "Introducing our latest product.",
                  "scheduled_at": "2026-11-19T18:00:00Z",
                  "created_at": "2026-11-18T22:00:00Z",
                  "approved_by": null,
                  "post_url": null,
                  "error": null,
                  "has_media": false,
                  "has_thumbnail": false,
                  "publication_locked": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The post changed or cannot perform this action in its current state. Read it again before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Connected social account ID."
                  },
                  "generation_id": {
                    "description": "Saved generation to post. Motion prepares its media automatically.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "composition_id": {
                    "description": "Choose a composition when the generation contains several videos or images.",
                    "type": "string",
                    "maxLength": 300
                  },
                  "thumbnail_generation_id": {
                    "description": "Saved image generation to use as a video thumbnail.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "caption": {
                    "description": "Post text for destinations other than YouTube and Reddit. Platform limits apply.",
                    "type": "string",
                    "maxLength": 50000
                  },
                  "title": {
                    "description": "Required for YouTube (up to 100 characters) and Reddit (up to 300).",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "description": "YouTube description (up to 5,000 characters) or Reddit post body (up to 30,000).",
                    "type": "string",
                    "maxLength": 30000
                  },
                  "scheduled_at": {
                    "description": "Publication time. Omit to publish as soon as preparation and approval are complete.",
                    "type": "string",
                    "format": "date-time"
                  },
                  "idempotency_key": {
                    "description": "Reuse this key to retry creation without creating another post.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "connection_id",
                  "generation_id"
                ],
                "additionalProperties": false
              },
              "example": {
                "connection_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                "generation_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459",
                "title": "Launch video",
                "description": "Introducing our latest product."
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/social-posting/draft-a-scheduled-social-post",
          "metadata": {
            "title": "Create a social post",
            "sidebarTitle": "Create a social post"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional UUID for safe retries. Reuse the same key and body after a lost response.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/social/posts/{post_id}": {
      "get": {
        "operationId": "ReadASocialPost",
        "summary": "Read a social post",
        "tags": [
          "Social posting"
        ],
        "description": "Read a social post.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:social:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionGetSocialPostResponse"
                },
                "example": {
                  "post": {
                    "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                    "connection_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                    "generation_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459",
                    "composition_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459:film",
                    "thumbnail_generation_id": null,
                    "status": "draft",
                    "media_status": "preparing",
                    "caption": "",
                    "title": "Launch video",
                    "description": "Introducing our latest product.",
                    "scheduled_at": "2026-11-19T18:00:00Z",
                    "created_at": "2026-11-18T22:00:00Z",
                    "approved_by": null,
                    "post_url": null,
                    "error": null,
                    "has_media": false,
                    "has_thumbnail": false,
                    "publication_locked": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Social post UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/social-posting/read-a-social-post",
          "metadata": {
            "title": "Read a social post",
            "sidebarTitle": "Read a social post"
          }
        }
      },
      "put": {
        "operationId": "UpdateASocialPost",
        "summary": "Update a social post",
        "tags": [
          "Social posting"
        ],
        "description": "Update draft content or its selected generation.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:social:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionUpdateSocialPostResponse"
                },
                "example": {
                  "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "connection_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "generation_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459",
                  "composition_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459:film",
                  "thumbnail_generation_id": null,
                  "status": "draft",
                  "media_status": "preparing",
                  "caption": "",
                  "title": "Launch video",
                  "description": "Introducing our latest product.",
                  "scheduled_at": "2026-11-19T18:00:00Z",
                  "created_at": "2026-11-18T22:00:00Z",
                  "approved_by": null,
                  "post_url": null,
                  "error": null,
                  "has_media": false,
                  "has_thumbnail": false,
                  "publication_locked": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The post changed or cannot perform this action in its current state. Read it again before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Social post UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Connected social account ID."
                  },
                  "generation_id": {
                    "description": "Saved generation to post. Motion prepares its media automatically.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "composition_id": {
                    "description": "Choose a composition when the generation contains several videos or images.",
                    "type": "string",
                    "maxLength": 300
                  },
                  "thumbnail_generation_id": {
                    "description": "Saved image generation to use as a video thumbnail.",
                    "type": "string",
                    "format": "uuid"
                  },
                  "caption": {
                    "description": "Post text for destinations other than YouTube and Reddit. Platform limits apply.",
                    "type": "string",
                    "maxLength": 50000
                  },
                  "title": {
                    "description": "Required for YouTube (up to 100 characters) and Reddit (up to 300).",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 300
                  },
                  "description": {
                    "description": "YouTube description (up to 5,000 characters) or Reddit post body (up to 30,000).",
                    "type": "string",
                    "maxLength": 30000
                  },
                  "scheduled_at": {
                    "description": "Publication time. Omit to publish as soon as preparation and approval are complete.",
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "additionalProperties": false,
                "required": []
              },
              "example": {
                "title": "Updated launch video"
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/social-posting/update-a-social-post",
          "metadata": {
            "title": "Update a social post",
            "sidebarTitle": "Update a social post"
          }
        }
      }
    },
    "/social/posts/{post_id}/submit": {
      "post": {
        "operationId": "SubmitASocialPost",
        "summary": "Submit a social post",
        "tags": [
          "Social posting"
        ],
        "description": "Submit a post for review or publication.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:social:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionSubmitSocialPostResponse"
                },
                "example": {
                  "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "connection_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "generation_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459",
                  "composition_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459:film",
                  "thumbnail_generation_id": null,
                  "status": "in_review",
                  "media_status": "preparing",
                  "caption": "",
                  "title": "Launch video",
                  "description": "Introducing our latest product.",
                  "scheduled_at": "2026-11-19T18:00:00Z",
                  "created_at": "2026-11-18T22:00:00Z",
                  "approved_by": null,
                  "post_url": null,
                  "error": null,
                  "has_media": false,
                  "has_thumbnail": false,
                  "publication_locked": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The post changed or cannot perform this action in its current state. Read it again before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Social post UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/social-posting/submit-a-social-post",
          "metadata": {
            "title": "Submit a social post",
            "sidebarTitle": "Submit a social post"
          }
        }
      }
    },
    "/social/posts/{post_id}/approve": {
      "post": {
        "operationId": "ApproveASocialPost",
        "summary": "Approve a social post",
        "tags": [
          "Social posting"
        ],
        "description": "Approve the version of the submitted post you reviewed. A changed post must be read and reviewed again.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:social:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionApproveSocialPostResponse"
                },
                "example": {
                  "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "connection_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "generation_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459",
                  "composition_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459:film",
                  "thumbnail_generation_id": null,
                  "status": "scheduled",
                  "media_status": "preparing",
                  "caption": "",
                  "title": "Launch video",
                  "description": "Introducing our latest product.",
                  "scheduled_at": "2026-11-19T18:00:00Z",
                  "created_at": "2026-11-18T22:00:00Z",
                  "approved_by": null,
                  "post_url": null,
                  "error": null,
                  "has_media": false,
                  "has_thumbnail": false,
                  "publication_locked": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The post changed or cannot perform this action in its current state. Read it again before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Social post UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/social-posting/approve-a-social-post",
          "metadata": {
            "title": "Approve a social post",
            "sidebarTitle": "Approve a social post"
          }
        }
      }
    },
    "/social/posts/{post_id}/cancel": {
      "post": {
        "operationId": "CancelASocialPost",
        "summary": "Cancel a social post",
        "tags": [
          "Social posting"
        ],
        "description": "Cancel a social post.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:social:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCancelSocialPostResponse"
                },
                "example": {
                  "id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "connection_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "generation_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459",
                  "composition_id": "541a1670-14db-4ee1-bdc4-f3b3c5d03459:film",
                  "thumbnail_generation_id": null,
                  "status": "cancelled",
                  "media_status": "preparing",
                  "caption": "",
                  "title": "Launch video",
                  "description": "Introducing our latest product.",
                  "scheduled_at": "2026-11-19T18:00:00Z",
                  "created_at": "2026-11-18T22:00:00Z",
                  "approved_by": null,
                  "post_url": null,
                  "error": null,
                  "has_media": false,
                  "has_thumbnail": false,
                  "publication_locked": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The post changed or cannot perform this action in its current state. Read it again before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "post_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Social post UUID."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              },
              "example": {}
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/social-posting/cancel-a-social-post",
          "metadata": {
            "title": "Cancel a social post",
            "sidebarTitle": "Cancel a social post"
          }
        }
      }
    },
    "/templates": {
      "get": {
        "summary": "List built-in templates",
        "operationId": "listMotionTemplates",
        "parameters": [
          {
            "name": "engine",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "gva",
                "motion"
              ]
            },
            "description": "Omit to use GVA."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "Published account-accessible templates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "engine": {
                      "type": "string"
                    },
                    "templates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "template": {
                            "type": "string"
                          },
                          "engine": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "duration_seconds": {
                            "type": "number"
                          },
                          "preview_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "thumbnail_url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "width": {
                            "type": "number"
                          },
                          "height": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "engine": "gva",
                  "templates": [
                    {
                      "template": "product-launch",
                      "engine": "gva",
                      "name": "Product launch",
                      "description": "High-energy 16:9 product announcement with kinetic headlines.",
                      "duration_seconds": 15,
                      "preview_url": "https://cdn.motion.so/templates/product-launch.mp4",
                      "thumbnail_url": "https://cdn.motion.so/templates/product-launch.png",
                      "width": 1920,
                      "height": 1080
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The account lacks access to the selected or persisted engine. No generation starts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "engine_access_required",
                  "message": "Your account does not have access to this engine. Use list_engines or GET /engines to see available engines."
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/list-templates",
          "metadata": {
            "title": "List built-in templates",
            "sidebarTitle": "List built-in templates"
          }
        },
        "tags": [
          "Deprecated (/sessions)"
        ],
        "description": "Built-in template catalog on the 2026-10-22 API contract. Use GET /templates/list for saved workspace templates.",
        "deprecated": true
      },
      "post": {
        "operationId": "CreateTemplate",
        "summary": "Create a template",
        "tags": [
          "Templates"
        ],
        "description": "Create a reusable template from a saved generation. All its compositions are included.",
        "security": [
          {
            "MotionApiKey": []
          },
          {
            "MotionOAuth": [
              "motion:sessions:read",
              "motion:templates:write"
            ]
          }
        ],
        "responses": {
          "201": {
            "description": "Saved resource",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionCreateVisualTemplateResponse"
                },
                "example": {
                  "template": {
                    "id": "launch-film",
                    "title": "Product launch",
                    "kind": "video",
                    "mode": "style",
                    "editable": true,
                    "version_id": null,
                    "instructions": "Use the saved layout and adapt the text to the new brief.",
                    "width": null,
                    "height": null,
                    "duration_seconds": null,
                    "preview_status": "preparing",
                    "preview_url": null,
                    "thumbnail_url": null,
                    "brand_kit_id": null,
                    "default_brand_kit_available": true,
                    "generation_id": "9d2f19e2-2366-46bd-8963-869c340f723a",
                    "created_at": null,
                    "resource_url": "/api/motion/templates/launch-film"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or cursor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, role, resource access or entitlement",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Resource conflict. Fetch the latest state and retry.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service temporarily unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "title",
                  "generation_id"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "generation_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Saved project version used as the source. Null when not recorded."
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "style",
                      "layout_and_style"
                    ],
                    "default": "layout_and_style"
                  },
                  "instructions": {
                    "type": "string",
                    "maxLength": 12000
                  }
                }
              },
              "example": {
                "title": "Product launch",
                "generation_id": "9d2f19e2-2366-46bd-8963-869c340f723a"
              }
            }
          }
        },
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional UUID for identical REST retries. Reuse the same key and body after a lost response.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "x-mint": {
          "href": "/api/2026-10-22/templates/create-template",
          "metadata": {
            "title": "Create a template",
            "sidebarTitle": "Create a template"
          }
        }
      }
    },
    "/engines": {
      "get": {
        "summary": "List engines",
        "operationId": "listMotionEngines",
        "responses": {
          "200": {
            "description": "Engines available to the account, with exactly one marked default: GVA is the default for every authenticated account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "engines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "engine": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "efforts": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "default_effort": {
                            "type": "string"
                          },
                          "default": {
                            "type": "boolean"
                          },
                          "templates": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "engines": [
                    {
                      "engine": "gva",
                      "name": "Motion",
                      "efforts": [
                        "standard",
                        "extended"
                      ],
                      "default_effort": "standard",
                      "default": true,
                      "templates": true
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Credential invalid or revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/list-engines",
          "metadata": {
            "title": "List engines",
            "sidebarTitle": "List engines"
          }
        },
        "tags": [
          "Deprecated (/sessions)"
        ],
        "description": "Generator choices for the legacy /sessions API. The /projects API uses the current Motion agent; put creative constraints in its prompt.",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/sessions": {
      "post": {
        "summary": "Create a session",
        "operationId": "createMotionSession",
        "security": [
          {
            "MotionApiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMotionSessionRequest"
              },
              "examples": {
                "basic": {
                  "value": {
                    "prompt": "Create a 20-second launch video."
                  }
                },
                "withReferences": {
                  "value": {
                    "prompt": "Create a short event recap video.",
                    "aspect_ratio": "9:16",
                    "duration": "30s-1min",
                    "design_md": {
                      "filename": "DESIGN.md",
                      "content": "# Design System\n\nUse a dark editorial canvas, crisp white type, and cobalt accent lines.",
                      "jsonFilename": "style-extraction.json",
                      "jsonContent": "{\"taste_dna\":{\"mood\":\"editorial precision\"}}"
                    },
                    "style_reference_url": "https://www.youtube.com/watch?v=EXAMPLE_ID",
                    "attachments": [
                      {
                        "url": "https://storage.example.com/signed/hero-image.png",
                        "name": "Hero image",
                        "type": "image",
                        "content_type": "image/png"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Job accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateMotionSessionResponse"
                },
                "example": {
                  "job_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "status": "queued",
                  "status_url": "https://api.motion.so/api/motion/sessions/4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "chat_url": "https://motion.so/agent?chat=4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "engine": "gva",
                  "effort": "standard",
                  "template": null
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid Motion API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient Motion credits. Purchase credits or configure auto top-ups in the Motion frontend at https://motion.so.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InsufficientCreditsError"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "The account lacks access to the selected or persisted engine. No generation starts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "engine_access_required",
                  "message": "Your account does not have access to this engine. Use list_engines or GET /engines to see available engines."
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/create-session",
          "metadata": {
            "title": "Create a session",
            "sidebarTitle": "Create a session"
          }
        },
        "tags": [
          "Deprecated (/sessions)"
        ],
        "deprecated": true,
        "description": "Deprecated: use /projects for new integrations. This route remains callable with its existing single-video arguments and response contract. No removal date is scheduled.",
        "parameters": [
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ]
      }
    },
    "/sessions/{job_id}/followups": {
      "post": {
        "summary": "Create a followup",
        "operationId": "createMotionSessionFollowup",
        "security": [
          {
            "MotionApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Job ID returned by POST /sessions."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMotionSessionRequest"
              },
              "example": {
                "prompt": "Make the opening headline larger and tighten pacing to 12 seconds."
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Followup accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateMotionSessionResponse"
                },
                "example": {
                  "job_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "status": "queued",
                  "status_url": "https://api.motion.so/api/motion/sessions/4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "chat_url": "https://motion.so/agent?chat=4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "engine": "gva",
                  "effort": "standard",
                  "template": null
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid Motion API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "402": {
            "description": "The job is paused for credits and cannot resume until enough credits are available.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "insufficient_credits",
                  "message": "Add credits before resuming this job.",
                  "status": "awaiting_user_input"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "The account lacks access to the selected or persisted engine. No generation starts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "engine_access_required",
                  "message": "Your account does not have access to this engine. Use list_engines or GET /engines to see available engines."
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Job not found or not owned by API key user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "Followups are only allowed for completed or input-awaiting jobs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FollowupRequiresCompletedJobError"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/create-followup",
          "metadata": {
            "title": "Create a followup",
            "sidebarTitle": "Create a followup"
          }
        },
        "tags": [
          "Deprecated (/sessions)"
        ],
        "deprecated": true,
        "description": "Deprecated: use /projects/{id}/messages for new integrations. This route remains callable with its existing single-video arguments and response contract. No removal date is scheduled."
      }
    },
    "/sessions/{job_id}": {
      "get": {
        "summary": "Read a session",
        "operationId": "getMotionSessionStatus",
        "security": [
          {
            "MotionApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Job ID returned by POST /sessions."
          },
          {
            "$ref": "#/components/parameters/MotionApiVersion"
          }
        ],
        "responses": {
          "200": {
            "description": "Job status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MotionJobStatus"
                },
                "example": {
                  "job_id": "4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "status": "completed",
                  "chat_url": "https://motion.so/agent?chat=4f20dcdd-f63b-4898-97d6-2e05c0d37c78",
                  "created_at": "2026-11-17T19:59:00Z",
                  "updated_at": "2026-11-17T20:00:00Z",
                  "completed_at": "2026-11-17T20:00:00Z",
                  "error": null,
                  "pending_user_input": false,
                  "output": {
                    "status": "completed",
                    "download_url": "https://downloads.example.com/film.mp4",
                    "expires_at": "2026-11-17T21:00:00Z",
                    "completed_at": "2026-11-17T20:00:00Z",
                    "error": null
                  },
                  "engine": "gva",
                  "effort": "standard",
                  "template": null
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid Motion API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Job not found or not owned by API key user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation date as a structured timestamp.",
                "schema": {
                  "type": "string"
                },
                "example": "@1794441600"
              },
              "Link": {
                "description": "Project API successor, with rel=\"successor-version\".",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-mint": {
          "href": "/api/2026-10-22/get-session",
          "metadata": {
            "title": "Read a session",
            "sidebarTitle": "Read a session"
          }
        },
        "tags": [
          "Deprecated (/sessions)"
        ],
        "deprecated": true,
        "description": "Deprecated: use /projects/{id} for new integrations. This route remains callable with its existing single-video arguments and response contract. No removal date is scheduled."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "MotionApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "A Motion API key. Access is limited to its stored organization, workspace, scopes and the creator’s current permissions."
      },
      "MotionOAuth": {
        "type": "oauth2",
        "description": "OAuth REST tokens use the full MCP audience, https://mcp.motion.so/mcp. Reauthorize existing connections to add scopes. Current workspace roles and resource permissions still apply.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://mcp.motion.so/oauth/authorize",
            "tokenUrl": "https://mcp.motion.so/oauth/token",
            "scopes": {
              "motion:automations:read": "Read automation definitions, capabilities, runs, and analytics.",
              "motion:automations:write": "Create, edit, delete, invoke, and retry automations.",
              "motion:connectors:read": "Read available services, your private organization connections and allowed actions without secrets.",
              "motion:connectors:write": "Connect and disconnect your private accounts inside the credential organization workspace.",
              "motion:templates:read": "Read and preview accessible templates.",
              "motion:templates:write": "Create, edit, share, and archive prompt templates.",
              "motion:sessions:read": "Read permitted chats, job status and saved exports.",
              "motion:sessions:write": "Create and steer Motion projects using organization workspace credits.",
              "motion:assets:read": "Find and read permitted media library assets.",
              "motion:brand-kits:read": "Read permitted brand kits.",
              "motion:brand-kits:write": "Create and edit brand kits within current app permissions.",
              "motion:social:read": "Read authorized social accounts and posts.",
              "motion:social:write": "Draft, submit, approve and cancel posts within current app permissions.",
              "motion:assets:write": "Create and complete reusable media library uploads."
            }
          }
        }
      }
    },
    "schemas": {
      "CreateMotionSessionRequest": {
        "type": "object",
        "description": "Creates a durable video job owned by the API key user. Requires available Motion credits on that user's account. Credits and auto top-ups are managed at https://motion.so, not through the API.",
        "required": [
          "prompt"
        ],
        "additionalProperties": false,
        "properties": {
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 12000
          },
          "aspect_ratio": {
            "$ref": "#/components/schemas/MotionAspectRatio"
          },
          "duration": {
            "$ref": "#/components/schemas/MotionDurationBucket"
          },
          "design_system_id": {
            "$ref": "#/components/schemas/MotionDesignSystemId"
          },
          "design_md": {
            "description": "Pro/Max custom DESIGN.md content, optionally with a companion style extraction JSON artifact. If both design_system_id and design_md are sent, design_md content is used.",
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200000
              },
              {
                "$ref": "#/components/schemas/MotionDesignMd"
              }
            ]
          },
          "style_reference_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048,
            "description": "Optional YouTube style reference URL."
          },
          "attachments": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/MotionAttachment"
            }
          },
          "engine": {
            "type": "string",
            "description": "Video engine."
          },
          "effort": {
            "type": "string",
            "enum": [
              "standard",
              "extended",
              "light",
              "medium",
              "high"
            ],
            "description": "Project effort, fixed at creation. Defaults to standard."
          },
          "mode": {
            "type": "string",
            "enum": [
              "light",
              "medium",
              "high"
            ],
            "deprecated": true,
            "description": "Alias for effort."
          },
          "template": {
            "type": "string",
            "description": "Identifier from the selected engine template catalog. Set at creation; requires Pro or Max."
          }
        }
      },
      "MotionAspectRatio": {
        "type": "string",
        "enum": [
          "16:9",
          "9:16",
          "1:1",
          "4:5",
          "21:9"
        ],
        "description": "Target video aspect ratio."
      },
      "MotionDurationBucket": {
        "type": "string",
        "enum": [
          "<10s",
          "10-30s",
          "30s-1min",
          "1-5min"
        ],
        "description": "Target video duration bucket."
      },
      "MotionDesignSystemId": {
        "type": "string",
        "enum": [
          "mosaic",
          "apple",
          "claude",
          "cursor",
          "linear",
          "vercel",
          "stripe",
          "figma",
          "notion",
          "spotify",
          "supabase",
          "raycast",
          "framer",
          "resend",
          "mintlify",
          "sentry",
          "tesla",
          "nike",
          "shopify",
          "airbnb",
          "posthog"
        ],
        "description": "Pro/Max built-in DESIGN.md preset to apply."
      },
      "MotionDesignMd": {
        "type": "object",
        "required": [
          "content"
        ],
        "additionalProperties": false,
        "properties": {
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "default": "DESIGN.md"
          },
          "sourceUrl": {
            "type": "string",
            "maxLength": 2048,
            "description": "Optional source website URL for imported style extraction context."
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200000,
            "description": "Pro/Max markdown design system guidance saved as DESIGN.md for the job."
          },
          "jsonFilename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "default": "style-extraction.json",
            "description": "Optional companion style extraction JSON filename."
          },
          "jsonContent": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200000,
            "description": "Optional structured style extraction JSON saved alongside DESIGN.md for agent context."
          }
        }
      },
      "MotionAttachment": {
        "type": "object",
        "required": [
          "url"
        ],
        "additionalProperties": false,
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 4096,
            "description": "Publicly accessible signed URL."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio",
              "file"
            ]
          },
          "content_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        }
      },
      "CreateMotionSessionResponse": {
        "type": "object",
        "required": [
          "job_id",
          "status",
          "status_url"
        ],
        "properties": {
          "job_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued"
            ]
          },
          "status_url": {
            "type": "string",
            "format": "uri",
            "description": "Authenticated public API polling URL for GET /sessions/{job_id}. This is not a Motion app page."
          },
          "chat_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Motion app chat URL for a human to open, inspect, or continue the run. Null only for legacy flows where no chat is available."
          },
          "engine": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null when engine details are unavailable to this account."
          },
          "effort": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "standard",
              "extended",
              "light",
              "medium",
              "high",
              null
            ],
            "description": "Project effort, fixed at creation. Defaults to standard."
          },
          "template": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "MotionJobStatus": {
        "type": "object",
        "required": [
          "job_id",
          "status",
          "created_at",
          "updated_at",
          "completed_at",
          "error",
          "pending_user_input",
          "output"
        ],
        "properties": {
          "job_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "created",
              "running",
              "awaiting_user_input",
              "completed",
              "failed"
            ]
          },
          "chat_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Motion app chat URL for a human to open, inspect, or continue the run. Null for legacy jobs without a Motion agent chat."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "pending_user_input": {
            "type": "boolean"
          },
          "output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MotionJobOutput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Download readiness state. There is no separate public output/download endpoint; poll this status response until output.status is completed and output.download_url is non-null."
          },
          "sources": {
            "type": "array",
            "description": "Additive source-asset audit list for media currently used in the composition.",
            "items": {
              "$ref": "#/components/schemas/MotionCompositionSource"
            }
          },
          "engine": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null when engine details are unavailable to this account."
          },
          "effort": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "standard",
              "extended",
              "light",
              "medium",
              "high",
              null
            ],
            "description": "Project effort, fixed at creation. Defaults to standard."
          },
          "template": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "MotionCompositionSourceUsage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "start_seconds": {
            "type": [
              "number",
              "null"
            ],
            "description": "Timeline start time in seconds when known."
          },
          "end_seconds": {
            "type": [
              "number",
              "null"
            ],
            "description": "Timeline end time in seconds when known."
          },
          "duration_seconds": {
            "type": [
              "number",
              "null"
            ],
            "description": "Timeline duration in seconds when known."
          },
          "scene_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "scene_index": {
            "type": [
              "number",
              "null"
            ]
          },
          "slot_key": {
            "type": [
              "string",
              "null"
            ]
          },
          "element_tag": {
            "type": [
              "string",
              "null"
            ],
            "description": "Composition element tag such as img, video, audio, or source."
          },
          "composition_file": {
            "type": [
              "string",
              "null"
            ]
          },
          "composition_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "track_index": {
            "type": [
              "number",
              "null"
            ]
          }
        }
      },
      "MotionCompositionSource": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "source_kind",
          "provider",
          "provider_asset_id",
          "source_url",
          "display_url",
          "source_domain",
          "media_type",
          "title",
          "credit",
          "rights_status",
          "usages",
          "source_metadata",
          "rights_metadata"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "source_kind": {
            "type": "string",
            "enum": [
              "licensed_library",
              "article",
              "web_search",
              "web",
              "connector",
              "upload",
              "generated",
              "unknown"
            ],
            "description": "How the asset was acquired."
          },
          "provider": {
            "type": "string",
            "description": "Provider or origin, such as getty, pexels, perplexity, github, or an article domain."
          },
          "provider_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider-specific asset ID when available."
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Canonical public source URL when available."
          },
          "display_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Preview/display URL when available."
          },
          "source_domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "media_type": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio",
              "file",
              "unknown"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "credit": {
            "type": [
              "string",
              "null"
            ]
          },
          "rights_status": {
            "type": "string",
            "enum": [
              "licensed",
              "public",
              "restricted",
              "user_provided",
              "generated",
              "unknown"
            ],
            "description": "Best-known rights category for the source asset."
          },
          "usages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MotionCompositionSourceUsage"
            }
          },
          "source_metadata": {
            "type": "object",
            "description": "Provider/source-specific public metadata. Shape varies by source kind and provider.",
            "additionalProperties": true
          },
          "rights_metadata": {
            "type": "object",
            "description": "Provider/license-specific rights metadata. Shape varies by source kind and provider.",
            "additionalProperties": true
          }
        }
      },
      "MotionJobOutput": {
        "type": "object",
        "required": [
          "status",
          "download_url",
          "expires_at",
          "completed_at",
          "error"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "queued",
              "processing",
              "completed",
              "failed",
              "outdated"
            ]
          },
          "download_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Signed MP4 download URL. Present only when status is completed."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Expiration timestamp for download_url."
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "description": "Error bodies are JSON. Check the HTTP status first. Permission and validation errors use error; service errors may use detail. Optional fields explain how to correct the request.",
        "anyOf": [
          {
            "required": [
              "error"
            ]
          },
          {
            "required": [
              "detail"
            ]
          }
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Error code or readable explanation."
          },
          "detail": {
            "type": "string",
            "description": "Readable explanation from the service."
          },
          "message": {
            "type": "string",
            "description": "Readable explanation accompanying an error code."
          },
          "error_description": {
            "type": "string",
            "description": "Authentication or permission explanation."
          },
          "required_scope": {
            "type": "string",
            "description": "Permission required by this operation."
          },
          "details": {
            "type": "array",
            "description": "Invalid request fields. Each issue includes a path and message.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "path": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ]
                  }
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "issues": {
            "type": "array",
            "description": "Service validation issues.",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "InsufficientCreditsError": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "const": "insufficient_credits"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "minimum_required_credits": {
            "type": "number"
          },
          "current_balance": {
            "type": "number"
          }
        },
        "description": "Returned when the API key owner's account does not have enough Motion credits. Purchase credits or configure auto top-ups in the Motion frontend at https://motion.so."
      },
      "FollowupRequiresCompletedJobError": {
        "type": "object",
        "required": [
          "error",
          "message",
          "status"
        ],
        "properties": {
          "error": {
            "type": "string",
            "const": "followup_requires_completed_job"
          },
          "message": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "description": "Returned when creating a followup for a job that is neither completed nor awaiting user input."
      },
      "AutomationTrigger": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "schedule_once",
              "schedule_recurring",
              "youtube_video_uploaded",
              "twitch_stream_ended",
              "kick_stream_ended"
            ]
          },
          "platform": {
            "type": "string",
            "enum": [
              "schedule",
              "youtube",
              "twitch",
              "kick"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "source": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "description": "Use Schedule for schedules; otherwise a channel URL, handle, or YouTube channel ID."
          },
          "timezone": {
            "type": "string",
            "maxLength": 100,
            "description": "Display timezone. Recurring intervals use elapsed minutes, not wall-clock cron scheduling."
          },
          "intervalMinutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 525600,
            "description": "Required for recurring schedules."
          },
          "runAt": {
            "type": "string",
            "format": "date-time",
            "description": "Required for one-time schedules. Include a UTC offset and choose a future timestamp."
          }
        },
        "required": [
          "type",
          "platform",
          "label",
          "source"
        ],
        "additionalProperties": false,
        "description": "Match platform to trigger type. Discover environment availability with GET /automations/capabilities."
      },
      "AutomationMemory": {
        "type": "object",
        "properties": {
          "rememberProcessedItems": {
            "type": "boolean"
          },
          "includePreviousRuns": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20
          },
          "compactAfterRuns": {
            "type": "integer",
            "minimum": 5,
            "maximum": 100
          }
        },
        "required": [
          "rememberProcessedItems",
          "includePreviousRuns",
          "compactAfterRuns"
        ],
        "additionalProperties": false
      },
      "AutomationConnectorCondition": {
        "type": "object",
        "properties": {
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "schedule_once",
                "schedule_recurring",
                "youtube_video_uploaded",
                "twitch_stream_ended",
                "kick_stream_ended"
              ]
            }
          },
          "payloadField": {
            "type": "string",
            "maxLength": 200
          },
          "equals": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "AutomationConnectorGrant": {
        "type": "object",
        "properties": {
          "connectorId": {
            "type": "string",
            "enum": [
              "github",
              "notion",
              "figma",
              "google-drive",
              "dropbox",
              "getty"
            ]
          },
          "access": {
            "type": "string",
            "enum": [
              "read"
            ]
          },
          "resources": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 2000
            }
          },
          "condition": {
            "$ref": "#/components/schemas/AutomationConnectorCondition"
          }
        },
        "required": [
          "connectorId",
          "access",
          "resources"
        ],
        "additionalProperties": false
      },
      "AutomationConnectorPolicy": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "none",
              "fixed",
              "conditional"
            ]
          },
          "onUnavailable": {
            "type": "string",
            "enum": [
              "block",
              "run_without"
            ]
          },
          "grants": {
            "type": "array",
            "maxItems": 6,
            "items": {
              "$ref": "#/components/schemas/AutomationConnectorGrant"
            }
          }
        },
        "required": [
          "mode",
          "onUnavailable",
          "grants"
        ],
        "additionalProperties": false,
        "description": "Uses existing connected accounts and permissions; this request cannot connect an account or grant access."
      },
      "AutomationExecution": {
        "type": "object",
        "properties": {
          "effort": {
            "type": "string",
            "enum": [
              "standard",
              "extended"
            ],
            "description": "Project effort, fixed at creation. Defaults to standard."
          }
        },
        "required": [],
        "additionalProperties": false,
        "minProperties": 1,
        "description": "Supply engine or effort. Engine changes use the new engine default when effort is omitted."
      },
      "CreateAutomationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000,
            "description": "Self-contained instructions used for every future invocation."
          },
          "trigger": {
            "$ref": "#/components/schemas/AutomationTrigger"
          },
          "memory": {
            "$ref": "#/components/schemas/AutomationMemory"
          },
          "connectorPolicy": {
            "$ref": "#/components/schemas/AutomationConnectorPolicy"
          },
          "maxConcurrentRuns": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "default": 1
          },
          "maxRunsPerHour": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 4
          },
          "execution": {
            "$ref": "#/components/schemas/AutomationExecution"
          },
          "outputKind": {
            "type": "string",
            "enum": [
              "video",
              "text",
              "auto"
            ],
            "default": "video"
          }
        },
        "required": [
          "name",
          "prompt",
          "trigger"
        ],
        "additionalProperties": false,
        "description": "Creates an enabled automation. Defaults: GVA standard, memory {rememberProcessedItems:true,includePreviousRuns:5,compactAfterRuns:20}, no connectors, one concurrent run and four runs per hour. Creation is not idempotent; do not blindly repeat a request after a lost response.",
        "example": {
          "name": "Daily update",
          "prompt": "Create a short daily title animation.",
          "trigger": {
            "type": "schedule_recurring",
            "platform": "schedule",
            "label": "Every day",
            "source": "Schedule",
            "intervalMinutes": 1440
          },
          "execution": {
            "effort": "standard"
          }
        }
      },
      "UpdateAutomationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000,
            "description": "Self-contained instructions used for every future invocation."
          },
          "trigger": {
            "$ref": "#/components/schemas/AutomationTrigger"
          },
          "memory": {
            "$ref": "#/components/schemas/AutomationMemory"
          },
          "connectorPolicy": {
            "$ref": "#/components/schemas/AutomationConnectorPolicy"
          },
          "maxConcurrentRuns": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "default": 1
          },
          "maxRunsPerHour": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 4
          },
          "execution": {
            "$ref": "#/components/schemas/AutomationExecution"
          },
          "enabled": {
            "type": "boolean",
            "description": "False pauses future scheduling; true resumes it. Does not cancel an already running invocation."
          }
        },
        "required": [],
        "additionalProperties": false,
        "minProperties": 1,
        "description": "Supply at least one editable field. Nested objects replace their saved value; include all required nested fields. outputKind is creation-only. Execution changes can return 409 update_conflict; reread before retrying."
      },
      "AutomationRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "skipped",
              "failed",
              "blocked"
            ]
          },
          "motionAgentChatId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null until a Motion chat is created. Open https://motion.so/agent?chat={motionAgentChatId} to inspect the run."
          },
          "queuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "startedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "attempt": {
            "type": "integer"
          },
          "resultSummary": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "motionAgentChatId",
          "queuedAt"
        ],
        "additionalProperties": true,
        "description": "Read view can also include event context, logs, artifacts, and connector snapshots. An accepted or completed agent run is not proof of a downloadable video; inspect saved exports in its Motion chat."
      },
      "Automation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "prompt": {
            "type": "string"
          },
          "trigger": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "schedule_once",
                  "schedule_recurring",
                  "youtube_video_uploaded",
                  "youtube_stream_ended",
                  "youtube_channel_content",
                  "twitch_stream_ended",
                  "kick_stream_ended",
                  "website_changed"
                ]
              },
              "platform": {
                "type": "string",
                "enum": [
                  "schedule",
                  "youtube",
                  "twitch",
                  "kick",
                  "website"
                ]
              },
              "source": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "platform",
              "source"
            ],
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "nextRunAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationRun"
            }
          },
          "memory": {
            "$ref": "#/components/schemas/AutomationMemory"
          },
          "connectorPolicy": {
            "$ref": "#/components/schemas/AutomationConnectorPolicy"
          },
          "maxConcurrentRuns": {
            "type": "integer"
          },
          "maxRunsPerHour": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "enabled",
          "prompt",
          "trigger",
          "createdAt",
          "updatedAt",
          "nextRunAt",
          "runs"
        ],
        "additionalProperties": true,
        "description": "Owner-scoped read view. Read responses can include additional saved context and history. Use the dedicated run-history endpoint for pagination. Read fields are not accepted as write inputs."
      },
      "AutomationEnvelope": {
        "type": "object",
        "properties": {
          "automation": {
            "$ref": "#/components/schemas/Automation"
          }
        },
        "required": [
          "automation"
        ],
        "additionalProperties": false
      },
      "AutomationList": {
        "type": "object",
        "properties": {
          "automations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Automation"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "automations",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "AutomationRunPage": {
        "type": "object",
        "properties": {
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AutomationRun"
            }
          },
          "total": {
            "type": "number"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "runs",
          "total",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "AutomationSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "runId": {
            "type": "string"
          },
          "motionAgentChatId": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "skipped",
              "failed",
              "blocked"
            ]
          }
        },
        "required": [
          "id",
          "runId",
          "motionAgentChatId",
          "status"
        ],
        "additionalProperties": true
      },
      "AutomationRunDetail": {
        "type": "object",
        "properties": {
          "automation": {
            "$ref": "#/components/schemas/Automation"
          },
          "run": {
            "$ref": "#/components/schemas/AutomationRun"
          },
          "session": {
            "$ref": "#/components/schemas/AutomationSession"
          }
        },
        "required": [
          "automation",
          "run",
          "session"
        ],
        "additionalProperties": false
      },
      "AutomationInvocation": {
        "type": "object",
        "properties": {
          "automation": {
            "$ref": "#/components/schemas/Automation"
          },
          "run": {
            "$ref": "#/components/schemas/AutomationRun"
          },
          "session": {
            "$ref": "#/components/schemas/AutomationSession"
          },
          "deduplicated": {
            "type": "boolean"
          }
        },
        "required": [
          "automation",
          "run",
          "session",
          "deduplicated"
        ],
        "additionalProperties": false
      },
      "AutomationCapabilities": {
        "type": "object",
        "properties": {
          "triggers": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "schedule_once",
                "schedule_recurring",
                "youtube_video_uploaded",
                "youtube_stream_ended",
                "youtube_channel_content",
                "twitch_stream_ended",
                "kick_stream_ended"
              ]
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "capabilities",
                "list",
                "get",
                "create",
                "update",
                "delete",
                "run",
                "runs",
                "run_detail",
                "retry",
                "analytics"
              ]
            }
          },
          "run_destination": {
            "type": "string",
            "enum": [
              "new_chat"
            ]
          },
          "schedule_semantics": {
            "type": "string",
            "enum": [
              "elapsed_minutes"
            ]
          },
          "default_effort": {
            "type": "string",
            "enum": [
              "standard"
            ]
          },
          "execution_supported": {
            "type": "boolean"
          },
          "update_constraints": {
            "type": "string",
            "description": "Fields this connection may update."
          },
          "execution_engine": {
            "type": "string",
            "description": "Engine used to execute automation runs."
          }
        },
        "required": [
          "triggers",
          "operations",
          "run_destination",
          "schedule_semantics",
          "default_effort",
          "execution_supported",
          "update_constraints",
          "execution_engine"
        ],
        "additionalProperties": false
      },
      "AutomationAnalytics": {
        "type": "object",
        "properties": {
          "days": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "buckets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                },
                "completed": {
                  "type": "number"
                },
                "failed": {
                  "type": "number"
                },
                "skipped": {
                  "type": "number"
                },
                "inProgress": {
                  "type": "number"
                },
                "total": {
                  "type": "number"
                }
              },
              "required": [
                "date",
                "completed",
                "failed",
                "skipped",
                "inProgress",
                "total"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "days",
          "total",
          "buckets"
        ],
        "additionalProperties": false
      },
      "AutomationError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "message"
        ],
        "additionalProperties": false
      },
      "AutomationDeleted": {
        "type": "object",
        "properties": {
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "deleted"
        ],
        "additionalProperties": false
      },
      "CreateMotionProjectRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 12000,
            "description": "Describe the work to do. Include source links, size, duration, layout and style in the prompt."
          },
          "effort": {
            "description": "Project effort, fixed at creation: standard or extended. Defaults to standard. Follow-up messages and resumed turns keep this choice.",
            "type": "string",
            "enum": [
              "standard",
              "extended"
            ]
          },
          "fast_mode": {
            "type": "boolean",
            "default": false,
            "description": "Enable Fast mode for faster generation (requires Pro or above). Defaults to false; can be toggled on or off between turns."
          },
          "attachments": {
            "description": "Uploaded library assets only. Put web links directly in prompt text.",
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "asset_id"
              ],
              "additionalProperties": false
            }
          },
          "template_ids": {
            "description": "Saved template IDs from List templates to attach with this message. Earlier references remain in conversation history.",
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "brand_kit_ids": {
            "description": "Saved brand-kit UUIDs from List brand kits. Omit to inherit the current selection; an array replaces it and [] clears it.",
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "connectors": {
            "description": "Exact connections the agent may use, at most one per provider. Omit to keep the project's selection; an array replaces it for this and later turns, including the following tool calls of an active turn; [] disables all connectors. Selecting connections needs motion:connectors:read for your private connections in this organization workspace.",
            "maxItems": 18,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Connection id from GET /api/motion/connections or list_connections."
                },
                "actions": {
                  "description": "Narrow this connection to these permission_options ids of its provider. Omit to keep the connection's current allowed actions. Never widens permissions.",
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "repositories",
                      "code",
                      "issues",
                      "history",
                      "pages",
                      "comments",
                      "create_pages",
                      "edit_pages",
                      "add_comments",
                      "files",
                      "downloads",
                      "uploads",
                      "folders",
                      "search",
                      "deletes",
                      "posts",
                      "prepare",
                      "discard"
                    ]
                  }
                }
              },
              "required": [
                "id"
              ],
              "additionalProperties": false
            }
          },
          "export_formats": {
            "description": "Automatically export the finished outputs in these formats. You can also request exports later.",
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "mp4",
                "png",
                "jpeg",
                "media",
                "premiere",
                "after-effects",
                "resolve",
                "final-cut",
                "psd",
                "svg"
              ]
            }
          }
        },
        "required": [
          "prompt"
        ],
        "additionalProperties": false
      },
      "ContinueMotionProjectRequest": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 12000,
            "description": "Describe the work to do. Include source links, size, duration, layout and style in the prompt."
          },
          "fast_mode": {
            "type": "boolean",
            "description": "Toggle Fast mode on or off for this and subsequent turns (requires Pro or above). Omit to inherit the project's current setting; cannot be changed while a turn is running."
          },
          "attachments": {
            "description": "Uploaded library assets only. Put web links directly in prompt text.",
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "asset_id"
              ],
              "additionalProperties": false
            }
          },
          "template_ids": {
            "description": "Saved template IDs from List templates to attach with this message. Earlier references remain in conversation history.",
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "brand_kit_ids": {
            "description": "Saved brand-kit UUIDs from List brand kits. Omit to inherit the current selection; an array replaces it and [] clears it.",
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "connectors": {
            "description": "Exact connections the agent may use, at most one per provider. Omit to keep the project's selection; an array replaces it for this and later turns, including the following tool calls of an active turn; [] disables all connectors. Selecting connections needs motion:connectors:read for your private connections in this organization workspace.",
            "maxItems": 18,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Connection id from GET /api/motion/connections or list_connections."
                },
                "actions": {
                  "description": "Narrow this connection to these permission_options ids of its provider. Omit to keep the connection's current allowed actions. Never widens permissions.",
                  "minItems": 1,
                  "maxItems": 16,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "repositories",
                      "code",
                      "issues",
                      "history",
                      "pages",
                      "comments",
                      "create_pages",
                      "edit_pages",
                      "add_comments",
                      "files",
                      "downloads",
                      "uploads",
                      "folders",
                      "search",
                      "deletes",
                      "posts",
                      "prepare",
                      "discard"
                    ]
                  }
                }
              },
              "required": [
                "id"
              ],
              "additionalProperties": false
            }
          },
          "export_formats": {
            "description": "Automatically export the finished outputs in these formats. You can also request exports later.",
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "mp4",
                "png",
                "jpeg",
                "media",
                "premiere",
                "after-effects",
                "resolve",
                "final-cut",
                "psd",
                "svg"
              ]
            }
          }
        },
        "required": [
          "prompt"
        ],
        "additionalProperties": false
      },
      "MotionListProjectsResponse": {
        "type": "object",
        "properties": {
          "projects": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "completed",
                    "failed",
                    "cancelled",
                    "awaiting_user_input",
                    "awaiting_credits"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "chat_url": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "id",
                "title",
                "status",
                "created_at",
                "updated_at",
                "chat_url"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "projects",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "MotionStopProjectResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "stop_requested": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "project_id",
          "stop_requested"
        ],
        "additionalProperties": false
      },
      "MotionListVisualTemplatesResponse": {
        "type": "object",
        "properties": {
          "templates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "video",
                    "image"
                  ]
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "style",
                    "layout_and_style"
                  ]
                },
                "editable": {
                  "type": "boolean"
                },
                "version_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "instructions": {
                  "type": "string"
                },
                "width": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "height": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "duration_seconds": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "preview_status": {
                  "type": "string",
                  "enum": [
                    "preparing",
                    "ready",
                    "failed"
                  ]
                },
                "preview_url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "thumbnail_url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "brand_kit_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "default_brand_kit_available": {
                  "type": "boolean"
                },
                "generation_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "resource_url": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title",
                "kind",
                "mode",
                "editable",
                "version_id",
                "instructions",
                "width",
                "height",
                "duration_seconds",
                "preview_status",
                "preview_url",
                "thumbnail_url",
                "brand_kit_id",
                "default_brand_kit_available",
                "generation_id",
                "created_at",
                "resource_url"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "required": [
          "templates",
          "next_cursor",
          "has_more"
        ],
        "additionalProperties": false
      },
      "MotionGetVisualTemplateResponse": {
        "type": "object",
        "properties": {
          "template": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "video",
                  "image"
                ]
              },
              "mode": {
                "type": "string",
                "enum": [
                  "style",
                  "layout_and_style"
                ]
              },
              "editable": {
                "type": "boolean"
              },
              "version_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "instructions": {
                "type": "string"
              },
              "width": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "height": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "duration_seconds": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "preview_status": {
                "type": "string",
                "enum": [
                  "preparing",
                  "ready",
                  "failed"
                ]
              },
              "preview_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "thumbnail_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "brand_kit_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_brand_kit_available": {
                "type": "boolean"
              },
              "generation_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resource_url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "kind",
              "mode",
              "editable",
              "version_id",
              "instructions",
              "width",
              "height",
              "duration_seconds",
              "preview_status",
              "preview_url",
              "thumbnail_url",
              "brand_kit_id",
              "default_brand_kit_available",
              "generation_id",
              "created_at",
              "resource_url"
            ],
            "additionalProperties": false,
            "description": "Saved template, current version, source generation ID and preview status."
          }
        },
        "required": [
          "template"
        ],
        "additionalProperties": false
      },
      "MotionUpdateTemplateResponse": {
        "type": "object",
        "properties": {
          "template": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "video",
                  "image"
                ]
              },
              "mode": {
                "type": "string",
                "enum": [
                  "style",
                  "layout_and_style"
                ]
              },
              "editable": {
                "type": "boolean"
              },
              "version_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "instructions": {
                "type": "string"
              },
              "width": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "height": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "duration_seconds": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "preview_status": {
                "type": "string",
                "enum": [
                  "preparing",
                  "ready",
                  "failed"
                ]
              },
              "preview_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "thumbnail_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "brand_kit_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_brand_kit_available": {
                "type": "boolean"
              },
              "generation_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resource_url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "kind",
              "mode",
              "editable",
              "version_id",
              "instructions",
              "width",
              "height",
              "duration_seconds",
              "preview_status",
              "preview_url",
              "thumbnail_url",
              "brand_kit_id",
              "default_brand_kit_available",
              "generation_id",
              "created_at",
              "resource_url"
            ],
            "additionalProperties": false,
            "description": "Saved template, current version, source generation ID and preview status."
          }
        },
        "required": [
          "template"
        ],
        "additionalProperties": false
      },
      "MotionSaveMediaTemplateResponse": {
        "type": "object",
        "properties": {
          "template": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Stable resource identifier. Templates use their catalog ID; brand kits use a UUID."
              },
              "title": {
                "type": "string",
                "description": "Human-readable template name chosen when saving the resource."
              },
              "kind": {
                "type": "string",
                "enum": [
                  "video",
                  "image"
                ],
                "description": "Resource kind or authored output type as specified by this response."
              },
              "mode": {
                "type": "string",
                "enum": [
                  "style",
                  "layout_and_style"
                ],
                "description": "Template reuse mode: style adapts its visual language; layout_and_style also preserves the saved structure."
              },
              "editable": {
                "type": "boolean",
                "description": "True for a saved editable project. False means this template stores a media reference."
              },
              "version_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Current immutable saved template version, or null when unavailable."
              },
              "instructions": {
                "type": "string",
                "description": "Saved directions for future uses of this template; source conversion does not apply them as an edit."
              },
              "width": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Template canvas width in pixels."
              },
              "height": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Template canvas height in pixels."
              },
              "duration_seconds": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Template or media usage duration in seconds."
              },
              "preview_status": {
                "type": "string",
                "enum": [
                  "preparing",
                  "ready",
                  "failed"
                ],
                "description": "Template preview preparation state: preparing, ready or failed. Saving and preview rendering finish independently."
              },
              "preview_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Expiring authorized video-preview URL, or null until a video preview is available."
              },
              "thumbnail_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Expiring authorized image-preview URL, or null until a preview is available."
              },
              "brand_kit_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Default brand-kit UUID saved with this template, or null."
              },
              "default_brand_kit_available": {
                "type": "boolean",
                "description": "Whether the saved template’s default kit remains accessible to this credential."
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Creation timestamp in ISO 8601 format, or null before the initial job record is available.",
                "format": "date-time"
              },
              "resource_url": {
                "type": "string",
                "description": "Authenticated API route to read this exact saved resource."
              }
            },
            "required": [
              "id",
              "title",
              "kind",
              "mode",
              "editable",
              "version_id",
              "instructions",
              "width",
              "height",
              "duration_seconds",
              "preview_status",
              "preview_url",
              "thumbnail_url",
              "brand_kit_id",
              "default_brand_kit_available",
              "created_at",
              "resource_url"
            ],
            "additionalProperties": false,
            "description": "Saved template, current version and preview status."
          },
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "Caller-generated UUID for a single operation. Reuse it only for identical retries; different details conflict."
          }
        },
        "required": [
          "template"
        ],
        "additionalProperties": false
      },
      "MotionListBrandKitsResponse": {
        "type": "object",
        "properties": {
          "kits": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Identifier of this resource. Use it when reading or updating the same resource."
                },
                "definition": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "number",
                      "const": 1,
                      "description": "Brand guideline schema version. Currently 1."
                    },
                    "name": {
                      "type": "string",
                      "description": "Human-readable name for this item."
                    },
                    "sections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                            "description": "Section ID. Keep it when updating this section."
                          },
                          "title": {
                            "type": "string",
                            "description": "Section heading."
                          },
                          "text": {
                            "type": "string",
                            "description": "Guidelines for this section."
                          },
                          "assets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "assetId": {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                  "description": "Referenced Library asset ID."
                                }
                              },
                              "required": [
                                "assetId"
                              ],
                              "additionalProperties": {}
                            },
                            "description": "Library assets in this section. When updating, send their IDs as asset_ids."
                          }
                        },
                        "required": [
                          "id",
                          "title",
                          "text",
                          "assets"
                        ],
                        "additionalProperties": {}
                      },
                      "description": "Brand guideline sections with text and accessible library asset references."
                    }
                  },
                  "required": [
                    "version",
                    "name",
                    "sections"
                  ],
                  "additionalProperties": {},
                  "description": "Brand guidelines with version 1, a name and sections containing text and existing library asset IDs."
                },
                "updated_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Timestamp of the latest resource change in ISO 8601 format."
                }
              },
              "required": [
                "id",
                "definition"
              ],
              "additionalProperties": {}
            },
            "description": "Brand kits visible under current workspace and sharing permissions."
          }
        },
        "required": [
          "kits"
        ],
        "additionalProperties": false
      },
      "MotionCreateBrandKitResponse": {
        "type": "object",
        "properties": {
          "kit": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Identifier of this resource. Use it when reading or updating the same resource."
              },
              "definition": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "number",
                    "const": 1,
                    "description": "Brand guideline schema version. Currently 1."
                  },
                  "name": {
                    "type": "string",
                    "description": "Human-readable name for this item."
                  },
                  "sections": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "description": "Section ID. Keep it when updating this section."
                        },
                        "title": {
                          "type": "string",
                          "description": "Section heading."
                        },
                        "text": {
                          "type": "string",
                          "description": "Guidelines for this section."
                        },
                        "assets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "assetId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "Referenced Library asset ID."
                              }
                            },
                            "required": [
                              "assetId"
                            ],
                            "additionalProperties": {}
                          },
                          "description": "Library assets in this section. When updating, send their IDs as asset_ids."
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "text",
                        "assets"
                      ],
                      "additionalProperties": {}
                    },
                    "description": "Brand guideline sections with text and accessible library asset references."
                  }
                },
                "required": [
                  "version",
                  "name",
                  "sections"
                ],
                "additionalProperties": {},
                "description": "Brand guidelines with version 1, a name and sections containing text and existing library asset IDs."
              },
              "updated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Timestamp of the latest resource change in ISO 8601 format."
              }
            },
            "required": [
              "id",
              "definition"
            ],
            "additionalProperties": {},
            "description": "Brand kit guidelines and permitted assets."
          }
        },
        "required": [
          "kit"
        ],
        "additionalProperties": false
      },
      "MotionGetBrandKitResponse": {
        "type": "object",
        "properties": {
          "kit": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Identifier of this resource. Use it when reading or updating the same resource."
              },
              "definition": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "number",
                    "const": 1,
                    "description": "Brand guideline schema version. Currently 1."
                  },
                  "name": {
                    "type": "string",
                    "description": "Human-readable name for this item."
                  },
                  "sections": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "description": "Section ID. Keep it when updating this section."
                        },
                        "title": {
                          "type": "string",
                          "description": "Section heading."
                        },
                        "text": {
                          "type": "string",
                          "description": "Guidelines for this section."
                        },
                        "assets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "assetId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "Referenced Library asset ID."
                              }
                            },
                            "required": [
                              "assetId"
                            ],
                            "additionalProperties": {}
                          },
                          "description": "Library assets in this section. When updating, send their IDs as asset_ids."
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "text",
                        "assets"
                      ],
                      "additionalProperties": {}
                    },
                    "description": "Brand guideline sections with text and accessible library asset references."
                  }
                },
                "required": [
                  "version",
                  "name",
                  "sections"
                ],
                "additionalProperties": {},
                "description": "Brand guidelines with version 1, a name and sections containing text and existing library asset IDs."
              },
              "updated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Timestamp of the latest resource change in ISO 8601 format."
              }
            },
            "required": [
              "id",
              "definition"
            ],
            "additionalProperties": {},
            "description": "Brand kit guidelines and permitted assets."
          }
        },
        "required": [
          "kit"
        ],
        "additionalProperties": false
      },
      "MotionUpdateBrandKitResponse": {
        "type": "object",
        "properties": {
          "kit": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Identifier of this resource. Use it when reading or updating the same resource."
              },
              "definition": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "number",
                    "const": 1,
                    "description": "Brand guideline schema version. Currently 1."
                  },
                  "name": {
                    "type": "string",
                    "description": "Human-readable name for this item."
                  },
                  "sections": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                          "description": "Section ID. Keep it when updating this section."
                        },
                        "title": {
                          "type": "string",
                          "description": "Section heading."
                        },
                        "text": {
                          "type": "string",
                          "description": "Guidelines for this section."
                        },
                        "assets": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "assetId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                                "description": "Referenced Library asset ID."
                              }
                            },
                            "required": [
                              "assetId"
                            ],
                            "additionalProperties": {}
                          },
                          "description": "Library assets in this section. When updating, send their IDs as asset_ids."
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "text",
                        "assets"
                      ],
                      "additionalProperties": {}
                    },
                    "description": "Brand guideline sections with text and accessible library asset references."
                  }
                },
                "required": [
                  "version",
                  "name",
                  "sections"
                ],
                "additionalProperties": {},
                "description": "Brand guidelines with version 1, a name and sections containing text and existing library asset IDs."
              },
              "updated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Timestamp of the latest resource change in ISO 8601 format."
              }
            },
            "required": [
              "id",
              "definition"
            ],
            "additionalProperties": {},
            "description": "Brand kit guidelines and permitted assets."
          }
        },
        "required": [
          "kit"
        ],
        "additionalProperties": false
      },
      "MotionListLibraryAssetsResponse": {
        "type": "object",
        "properties": {
          "assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "filename": {
                  "type": "string"
                },
                "asset_type": {
                  "type": "string",
                  "enum": [
                    "image",
                    "video",
                    "audio",
                    "pdf",
                    "file"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "uploading",
                    "processing",
                    "ready",
                    "failed"
                  ]
                },
                "source_type": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "user_uploaded",
                        "agent_found",
                        "agent_generated"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "content_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "size_bytes": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "filename",
                "status",
                "created_at"
              ],
              "additionalProperties": {}
            }
          },
          "total": {
            "type": "number"
          },
          "has_more": {
            "type": "boolean"
          },
          "next_offset": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "assets",
          "total",
          "has_more",
          "next_offset"
        ],
        "additionalProperties": false
      },
      "MotionGetLibraryAssetResponse": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "filename": {
                "type": "string"
              },
              "asset_type": {
                "type": "string",
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "pdf",
                  "file"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "uploading",
                  "processing",
                  "ready",
                  "failed"
                ]
              },
              "source_type": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "user_uploaded",
                      "agent_found",
                      "agent_generated"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "content_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "size_bytes": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "download_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "status",
              "created_at",
              "download_url",
              "expires_at"
            ],
            "additionalProperties": {}
          }
        },
        "required": [
          "asset"
        ],
        "additionalProperties": false
      },
      "MotionListSocialAccountsResponse": {
        "type": "object",
        "properties": {
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Connection ID to use as connectionId when creating a social post."
                },
                "platform": {
                  "type": "string",
                  "enum": [
                    "tiktok",
                    "youtube",
                    "instagram",
                    "facebook",
                    "x",
                    "threads",
                    "linkedin",
                    "reddit",
                    "mastodon",
                    "bluesky",
                    "snapchat"
                  ],
                  "description": "Social platform for this posting account."
                },
                "accountName": {
                  "description": "Posting account name, or null when unavailable.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "avatarUrl": {
                  "description": "Posting account avatar, or null when unavailable.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "agentEnabled": {
                  "type": "boolean",
                  "description": "Whether this account permits agent-created posts."
                },
                "revision": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Account settings version; unrelated to a post's edit version."
                },
                "isActive": {
                  "type": "boolean",
                  "description": "Whether the account is connected."
                },
                "allowedUserIds": {
                  "description": "Allowed member IDs, or null for all permitted workspace members. Shown only to managers.",
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "platform",
                "accountName",
                "avatarUrl",
                "agentEnabled",
                "revision",
                "isActive"
              ],
              "additionalProperties": {}
            },
            "description": "Permitted social destinations with current agent access settings."
          },
          "can_manage": {
            "type": "boolean",
            "description": "Role-based management permission; a write scope is also required."
          }
        },
        "required": [
          "accounts",
          "can_manage"
        ],
        "additionalProperties": false
      },
      "MotionCreateSocialUploadResponse": {
        "type": "object",
        "properties": {
          "uploadUrl": {
            "type": "string",
            "format": "uri",
            "description": "Resumable upload URL for the media bytes; upload before drafting a post."
          },
          "mediaUrl": {
            "type": "string",
            "description": "Scoped media identity for social drafts after the upload succeeds."
          }
        },
        "required": [
          "uploadUrl",
          "mediaUrl"
        ],
        "additionalProperties": {}
      },
      "MotionListSocialPostsResponse": {
        "type": "object",
        "properties": {
          "posts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Identifier of this resource. Use it when reading or updating the same resource."
                },
                "connectionId": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Enabled social destination UUID from list_social_accounts in the connected workspace."
                },
                "revision": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991,
                  "description": "Post edit version. Pass it when editing, submitting, approving or cancelling this post; a stale version returns a conflict."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "in_review",
                    "scheduled",
                    "processing",
                    "posted",
                    "failed",
                    "cancelled"
                  ],
                  "description": "Current state. The enum lists the values this resource can return."
                },
                "sourceChatId": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Accessible source project chat UUID in the selected workspace. Required for agent-created social posts."
                },
                "caption": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Post copy within the destination’s platform limits; review before scheduling publication."
                },
                "scheduledAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Future publication time as an ISO timestamp including its UTC offset."
                },
                "approvedBy": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Member UUID that approved publication, or null before approval."
                },
                "postUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Provider URL of the published post, or null before verified publication."
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Actionable error text or sanitized failure code, or null when no error is present."
                },
                "hasMedia": {
                  "type": "boolean",
                  "description": "Whether this post includes uploaded image or video media."
                },
                "hasThumbnail": {
                  "type": "boolean",
                  "description": "Whether this post includes an uploaded video thumbnail."
                },
                "publicationLocked": {
                  "type": "boolean",
                  "description": "Whether provider submission has begun, so editing or cancellation may be restricted."
                }
              },
              "required": [
                "id",
                "connectionId",
                "revision",
                "status"
              ],
              "additionalProperties": {}
            },
            "description": "Latest visible social post summaries and current revisions."
          },
          "limit": {
            "type": "number"
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "posts",
          "limit",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "MotionCreateSocialPostResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Identifier of this resource. Use it when reading or updating the same resource."
          },
          "connectionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Enabled social destination UUID from list_social_accounts in the connected workspace."
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "Post edit version. Pass it when editing, submitting, approving or cancelling this post; a stale version returns a conflict."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "in_review",
              "scheduled",
              "processing",
              "posted",
              "failed",
              "cancelled"
            ],
            "description": "Current state. The enum lists the values this resource can return."
          },
          "sourceChatId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Accessible source project chat UUID in the selected workspace. Required for agent-created social posts."
          },
          "caption": {
            "type": [
              "string",
              "null"
            ],
            "description": "Post copy within the destination’s platform limits; review before scheduling publication."
          },
          "scheduledAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Future publication time as an ISO timestamp including its UTC offset."
          },
          "approvedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Member UUID that approved publication, or null before approval."
          },
          "postUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider URL of the published post, or null before verified publication."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actionable error text or sanitized failure code, or null when no error is present."
          },
          "hasMedia": {
            "type": "boolean",
            "description": "Whether this post includes uploaded image or video media."
          },
          "hasThumbnail": {
            "type": "boolean",
            "description": "Whether this post includes an uploaded video thumbnail."
          },
          "publicationLocked": {
            "type": "boolean",
            "description": "Whether provider submission has begun, so editing or cancellation may be restricted."
          }
        },
        "required": [
          "id",
          "connectionId",
          "revision",
          "status"
        ],
        "additionalProperties": {}
      },
      "MotionGetSocialPostResponse": {
        "type": "object",
        "properties": {
          "post": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Identifier of this resource. Use it when reading or updating the same resource."
              },
              "connectionId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Enabled social destination UUID from list_social_accounts in the connected workspace."
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991,
                "description": "Post edit version. Pass it when editing, submitting, approving or cancelling this post; a stale version returns a conflict."
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "in_review",
                  "scheduled",
                  "processing",
                  "posted",
                  "failed",
                  "cancelled"
                ],
                "description": "Current state. The enum lists the values this resource can return."
              },
              "sourceChatId": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Accessible source project chat UUID in the selected workspace. Required for agent-created social posts."
              },
              "caption": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Post copy within the destination’s platform limits; review before scheduling publication."
              },
              "scheduledAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Future publication time as an ISO timestamp including its UTC offset."
              },
              "approvedBy": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Member UUID that approved publication, or null before approval."
              },
              "postUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Provider URL of the published post, or null before verified publication."
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Actionable error text or sanitized failure code, or null when no error is present."
              },
              "hasMedia": {
                "type": "boolean",
                "description": "Whether this post includes uploaded image or video media."
              },
              "hasThumbnail": {
                "type": "boolean",
                "description": "Whether this post includes an uploaded video thumbnail."
              },
              "publicationLocked": {
                "type": "boolean",
                "description": "Whether provider submission has begun, so editing or cancellation may be restricted."
              }
            },
            "required": [
              "id",
              "connectionId",
              "revision",
              "status"
            ],
            "additionalProperties": {},
            "description": "One social post and its approval or publication status."
          }
        },
        "required": [
          "post"
        ],
        "additionalProperties": false
      },
      "MotionUpdateSocialPostResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Identifier of this resource. Use it when reading or updating the same resource."
          },
          "connectionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Enabled social destination UUID from list_social_accounts in the connected workspace."
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "Post edit version. Pass it when editing, submitting, approving or cancelling this post; a stale version returns a conflict."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "in_review",
              "scheduled",
              "processing",
              "posted",
              "failed",
              "cancelled"
            ],
            "description": "Current state. The enum lists the values this resource can return."
          },
          "sourceChatId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Accessible source project chat UUID in the selected workspace. Required for agent-created social posts."
          },
          "caption": {
            "type": [
              "string",
              "null"
            ],
            "description": "Post copy within the destination’s platform limits; review before scheduling publication."
          },
          "scheduledAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Future publication time as an ISO timestamp including its UTC offset."
          },
          "approvedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Member UUID that approved publication, or null before approval."
          },
          "postUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider URL of the published post, or null before verified publication."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actionable error text or sanitized failure code, or null when no error is present."
          },
          "hasMedia": {
            "type": "boolean",
            "description": "Whether this post includes uploaded image or video media."
          },
          "hasThumbnail": {
            "type": "boolean",
            "description": "Whether this post includes an uploaded video thumbnail."
          },
          "publicationLocked": {
            "type": "boolean",
            "description": "Whether provider submission has begun, so editing or cancellation may be restricted."
          }
        },
        "required": [
          "id",
          "connectionId",
          "revision",
          "status"
        ],
        "additionalProperties": {}
      },
      "MotionSubmitSocialPostResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Identifier of this resource. Use it when reading or updating the same resource."
          },
          "connectionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Enabled social destination UUID from list_social_accounts in the connected workspace."
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "Post edit version. Pass it when editing, submitting, approving or cancelling this post; a stale version returns a conflict."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "in_review",
              "scheduled",
              "processing",
              "posted",
              "failed",
              "cancelled"
            ],
            "description": "Current state. The enum lists the values this resource can return."
          },
          "sourceChatId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Accessible source project chat UUID in the selected workspace. Required for agent-created social posts."
          },
          "caption": {
            "type": [
              "string",
              "null"
            ],
            "description": "Post copy within the destination’s platform limits; review before scheduling publication."
          },
          "scheduledAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Future publication time as an ISO timestamp including its UTC offset."
          },
          "approvedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Member UUID that approved publication, or null before approval."
          },
          "postUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider URL of the published post, or null before verified publication."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actionable error text or sanitized failure code, or null when no error is present."
          },
          "hasMedia": {
            "type": "boolean",
            "description": "Whether this post includes uploaded image or video media."
          },
          "hasThumbnail": {
            "type": "boolean",
            "description": "Whether this post includes an uploaded video thumbnail."
          },
          "publicationLocked": {
            "type": "boolean",
            "description": "Whether provider submission has begun, so editing or cancellation may be restricted."
          }
        },
        "required": [
          "id",
          "connectionId",
          "revision",
          "status"
        ],
        "additionalProperties": {}
      },
      "MotionApproveSocialPostResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Identifier of this resource. Use it when reading or updating the same resource."
          },
          "connectionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Enabled social destination UUID from list_social_accounts in the connected workspace."
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "Post edit version. Pass it when editing, submitting, approving or cancelling this post; a stale version returns a conflict."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "in_review",
              "scheduled",
              "processing",
              "posted",
              "failed",
              "cancelled"
            ],
            "description": "Current state. The enum lists the values this resource can return."
          },
          "sourceChatId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Accessible source project chat UUID in the selected workspace. Required for agent-created social posts."
          },
          "caption": {
            "type": [
              "string",
              "null"
            ],
            "description": "Post copy within the destination’s platform limits; review before scheduling publication."
          },
          "scheduledAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Future publication time as an ISO timestamp including its UTC offset."
          },
          "approvedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Member UUID that approved publication, or null before approval."
          },
          "postUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider URL of the published post, or null before verified publication."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actionable error text or sanitized failure code, or null when no error is present."
          },
          "hasMedia": {
            "type": "boolean",
            "description": "Whether this post includes uploaded image or video media."
          },
          "hasThumbnail": {
            "type": "boolean",
            "description": "Whether this post includes an uploaded video thumbnail."
          },
          "publicationLocked": {
            "type": "boolean",
            "description": "Whether provider submission has begun, so editing or cancellation may be restricted."
          }
        },
        "required": [
          "id",
          "connectionId",
          "revision",
          "status"
        ],
        "additionalProperties": {}
      },
      "MotionCancelSocialPostResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Identifier of this resource. Use it when reading or updating the same resource."
          },
          "connectionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "Enabled social destination UUID from list_social_accounts in the connected workspace."
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "description": "Post edit version. Pass it when editing, submitting, approving or cancelling this post; a stale version returns a conflict."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "in_review",
              "scheduled",
              "processing",
              "posted",
              "failed",
              "cancelled"
            ],
            "description": "Current state. The enum lists the values this resource can return."
          },
          "sourceChatId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Accessible source project chat UUID in the selected workspace. Required for agent-created social posts."
          },
          "caption": {
            "type": [
              "string",
              "null"
            ],
            "description": "Post copy within the destination’s platform limits; review before scheduling publication."
          },
          "scheduledAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Future publication time as an ISO timestamp including its UTC offset."
          },
          "approvedBy": {
            "type": [
              "string",
              "null"
            ],
            "description": "Member UUID that approved publication, or null before approval."
          },
          "postUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Provider URL of the published post, or null before verified publication."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actionable error text or sanitized failure code, or null when no error is present."
          },
          "hasMedia": {
            "type": "boolean",
            "description": "Whether this post includes uploaded image or video media."
          },
          "hasThumbnail": {
            "type": "boolean",
            "description": "Whether this post includes an uploaded video thumbnail."
          },
          "publicationLocked": {
            "type": "boolean",
            "description": "Whether provider submission has begun, so editing or cancellation may be restricted."
          }
        },
        "required": [
          "id",
          "connectionId",
          "revision",
          "status"
        ],
        "additionalProperties": {}
      },
      "MotionCreateTemplateFromVideoResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Motion project chat UUID returned by create_project or list_projects."
          },
          "chat_url": {
            "type": "string",
            "format": "uri",
            "description": "Motion web chat URL where the user can inspect and continue this project."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ],
            "description": "Current lifecycle state. For a video, wait for both generation and output to be completed before downloading."
          },
          "task": {
            "type": "string",
            "enum": [
              "create_template",
              "create_brand_kit"
            ],
            "description": "Requested resource-creation task. Read messages for saved IDs, then inspect them through the template or brand-kit API."
          }
        },
        "required": [
          "project_id",
          "chat_url",
          "status",
          "task"
        ],
        "additionalProperties": false
      },
      "MotionGenerateTemplateResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Motion project chat UUID returned by create_project or list_projects."
          },
          "chat_url": {
            "type": "string",
            "format": "uri",
            "description": "Motion web chat URL where the user can inspect and continue this project."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ],
            "description": "Current lifecycle state. For a video, wait for both generation and output to be completed before downloading."
          },
          "task": {
            "type": "string",
            "enum": [
              "create_template",
              "create_brand_kit"
            ],
            "description": "Requested resource-creation task. Read messages for saved IDs, then inspect them through the template or brand-kit API."
          }
        },
        "required": [
          "project_id",
          "chat_url",
          "status",
          "task"
        ],
        "additionalProperties": false
      },
      "MotionCreateBrandKitFromVideoResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Motion project chat UUID returned by create_project or list_projects."
          },
          "chat_url": {
            "type": "string",
            "format": "uri",
            "description": "Motion web chat URL where the user can inspect and continue this project."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ],
            "description": "Current resource or delivery lifecycle state; read current chat status for results."
          },
          "task": {
            "type": "string",
            "enum": [
              "create_template",
              "create_brand_kit"
            ],
            "description": "Requested resource-creation task. Read messages for saved IDs, then inspect them through the template or brand-kit API."
          }
        },
        "required": [
          "project_id",
          "chat_url",
          "status",
          "task"
        ],
        "additionalProperties": false
      },
      "MotionGenerateBrandKitResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Motion project chat UUID returned by create_project or list_projects."
          },
          "chat_url": {
            "type": "string",
            "format": "uri",
            "description": "Motion web chat URL where the user can inspect and continue this project."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ],
            "description": "Current resource or delivery lifecycle state; read current chat status for results."
          },
          "task": {
            "type": "string",
            "enum": [
              "create_template",
              "create_brand_kit"
            ],
            "description": "Requested resource-creation task. Read messages for saved IDs, then inspect them through the template or brand-kit API."
          }
        },
        "required": [
          "project_id",
          "chat_url",
          "status",
          "task"
        ],
        "additionalProperties": false
      },
      "MotionCreateBrandKitFromProjectResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Motion project chat UUID returned by create_project or list_projects."
          },
          "chat_url": {
            "type": "string",
            "format": "uri",
            "description": "Motion web chat URL where the user can inspect and continue this project."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled"
            ],
            "description": "Current resource or delivery lifecycle state; read current chat status for results."
          },
          "task": {
            "type": "string",
            "enum": [
              "create_template",
              "create_brand_kit"
            ],
            "description": "Requested resource-creation task. Read messages for saved IDs, then inspect them through the template or brand-kit API."
          }
        },
        "required": [
          "project_id",
          "chat_url",
          "status",
          "task"
        ],
        "additionalProperties": false
      },
      "MotionCreateTemplateFromProjectResponse": {
        "type": "object",
        "properties": {
          "template": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Stable resource identifier. Templates use their catalog ID; brand kits use a UUID."
              },
              "title": {
                "type": "string",
                "description": "Human-readable template name chosen when saving the resource."
              },
              "kind": {
                "type": "string",
                "enum": [
                  "video",
                  "image"
                ],
                "description": "Resource kind or authored output type as specified by this response."
              },
              "mode": {
                "type": "string",
                "enum": [
                  "style",
                  "layout_and_style"
                ],
                "description": "Template reuse mode: style adapts its visual language; layout_and_style also preserves the saved structure."
              },
              "editable": {
                "type": "boolean",
                "description": "True for a saved editable project. False means this template stores a media reference."
              },
              "version_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Current immutable saved template version, or null when unavailable."
              },
              "instructions": {
                "type": "string",
                "description": "Saved directions for future uses of this template; source conversion does not apply them as an edit."
              },
              "width": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Template canvas width in pixels."
              },
              "height": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Template canvas height in pixels."
              },
              "duration_seconds": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "Template or media usage duration in seconds."
              },
              "preview_status": {
                "type": "string",
                "enum": [
                  "preparing",
                  "ready",
                  "failed"
                ],
                "description": "Template preview preparation state: preparing, ready or failed. Saving and preview rendering finish independently."
              },
              "preview_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Expiring authorized video-preview URL, or null until a video preview is available."
              },
              "thumbnail_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Expiring authorized image-preview URL, or null until a preview is available."
              },
              "brand_kit_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Default brand-kit UUID saved with this template, or null."
              },
              "default_brand_kit_available": {
                "type": "boolean",
                "description": "Whether the saved template’s default kit remains accessible to this credential."
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Creation timestamp in ISO 8601 format, or null before the initial job record is available.",
                "format": "date-time"
              },
              "resource_url": {
                "type": "string",
                "description": "Authenticated API route to read this exact saved resource."
              }
            },
            "required": [
              "id",
              "title",
              "kind",
              "mode",
              "editable",
              "version_id",
              "instructions",
              "width",
              "height",
              "duration_seconds",
              "preview_status",
              "preview_url",
              "thumbnail_url",
              "brand_kit_id",
              "default_brand_kit_available",
              "created_at",
              "resource_url"
            ],
            "additionalProperties": false,
            "description": "Saved template, current version and preview status."
          },
          "request_id": {
            "type": "string",
            "format": "uuid",
            "description": "Caller-generated UUID for a single operation. Reuse it only for identical retries; different details conflict."
          }
        },
        "required": [
          "template"
        ],
        "additionalProperties": false
      },
      "MotionGetProjectResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Project UUID."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Generated or user-set project title, or null before titled."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled",
              "awaiting_user_input",
              "awaiting_credits"
            ],
            "description": "Latest project work status. Completed means the agent finished; exports may still be preparing."
          },
          "progress": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "stage": {
                    "type": "string",
                    "enum": [
                      "queued",
                      "starting",
                      "planning",
                      "gathering_media",
                      "authoring",
                      "reviewing",
                      "finalizing",
                      "rendering",
                      "completed"
                    ],
                    "description": "High-level customer-facing stage for the current turn."
                  },
                  "percent": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "Monotonic progress percentage from 0 to 100 across project milestones and export rendering."
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Sanitized one-line progress label safe to display to end users."
                  }
                },
                "required": [
                  "stage",
                  "percent",
                  "message"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Live customer-facing progress for the latest project turn; null when no active or completed progress applies."
          },
          "latest_turn_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Latest turn UUID for this project, matching messages.turn_id, generations.turn_id, and exports.turn_id. Null when no recorded turn exists."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Actionable failure reason when status is failed; null otherwise."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the project was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the project was last updated."
          },
          "chat_url": {
            "type": "string",
            "format": "uri",
            "description": "Motion app URL to inspect, preview, or continue this project in the browser."
          },
          "effort": {
            "type": "string",
            "enum": [
              "standard",
              "extended"
            ],
            "description": "Project effort fixed at creation. Follow-ups, steering and resumed turns keep this choice."
          },
          "fast_mode": {
            "type": "boolean",
            "description": "Whether Fast mode is enabled for this project. Requires Pro or above."
          },
          "connectors": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "actions": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "repositories",
                              "code",
                              "issues",
                              "history",
                              "pages",
                              "comments",
                              "create_pages",
                              "edit_pages",
                              "add_comments",
                              "designs",
                              "code_connect",
                              "edit_code_connect",
                              "diagrams",
                              "files",
                              "downloads",
                              "uploads",
                              "folders",
                              "deletes",
                              "search",
                              "posts",
                              "publish",
                              "engagement",
                              "following",
                              "prepare",
                              "discard"
                            ]
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "actions"
                  ],
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Connections available to this project. null uses the default selection; [] disables connectors."
          },
          "export_formats": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "mp4",
                "png",
                "jpeg",
                "media",
                "premiere",
                "after-effects",
                "resolve",
                "final-cut",
                "psd",
                "svg"
              ]
            },
            "description": "Current automatic export settings. Each turn uses these unless its message changes them. [] disables automatic exports.",
            "examples": [
              [
                "mp4",
                "png"
              ]
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Message UUID returned for an accepted prompt or saved assistant response."
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant"
                  ],
                  "description": "Who sent this message: user or assistant."
                },
                "content": {
                  "type": "string",
                  "description": "Message text."
                },
                "sequence_num": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "turn_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "effort": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "standard",
                        "extended"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Effort used for this turn; null when unavailable."
                },
                "template_ids": {
                  "description": "Templates attached to this user message.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "brand_kit_ids": {
                  "description": "Effective brand kits for this user message.",
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "explanations": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "explanations_omitted": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "role",
                "content",
                "sequence_num",
                "created_at",
                "turn_id",
                "effort"
              ],
              "additionalProperties": false
            },
            "description": "Ordered conversation messages for this project page."
          },
          "messages_has_more": {
            "type": "boolean",
            "description": "More messages are available."
          },
          "messages_next_after_sequence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass as after_sequence to read the next message page."
          },
          "generations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Saved project version. Use this ID to create a template."
                },
                "turn_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Matches messages.turn_id for the turn that saved this generation. Null for historical versions without a recorded turn."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Time this authored version was saved."
                },
                "status": {
                  "type": "string",
                  "const": "ready",
                  "description": "Saved editable version."
                },
                "compositions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Composition ID. Use it to request an export."
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "video",
                          "image"
                        ]
                      },
                      "width": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "height": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "duration_seconds": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "width",
                      "height",
                      "duration_seconds"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Editable compositions in this saved version."
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255,
                        "description": "Stable media source identifier within this generation."
                      },
                      "composition_ids": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Composition IDs in this generation that reference this media source."
                      },
                      "source_kind": {
                        "type": "string",
                        "enum": [
                          "licensed_library",
                          "article",
                          "web_search",
                          "web",
                          "connector",
                          "upload",
                          "project",
                          "generated",
                          "unknown"
                        ],
                        "description": "Origin category of this media source."
                      },
                      "provider": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "description": "Media provider name (for example getty or unknown)."
                      },
                      "provider_asset_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255,
                        "description": "Provider asset identifier when available."
                      },
                      "source_url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "uri",
                        "description": "Public attribution or origin URL when available."
                      },
                      "source_domain": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 255,
                        "description": "Origin hostname when available."
                      },
                      "media_type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "video",
                          "audio",
                          "unknown"
                        ],
                        "description": "Media type of the referenced source."
                      },
                      "title": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 500,
                        "description": "Human-readable title or description of the source."
                      },
                      "credit": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 500,
                        "description": "Creator or licensing attribution credit when available."
                      },
                      "rights_status": {
                        "type": "string",
                        "maxLength": 120,
                        "description": "Licensing or rights status when known, otherwise unknown."
                      }
                    },
                    "required": [
                      "id",
                      "composition_ids",
                      "source_kind",
                      "provider",
                      "provider_asset_id",
                      "source_url",
                      "source_domain",
                      "media_type",
                      "title",
                      "credit",
                      "rights_status"
                    ],
                    "additionalProperties": false
                  },
                  "description": "Media attribution sources referenced by compositions in this saved generation."
                }
              },
              "required": [
                "id",
                "turn_id",
                "created_at",
                "status",
                "compositions",
                "sources"
              ],
              "additionalProperties": false
            },
            "description": "Saved project versions, each containing one or more compositions."
          },
          "exports": {
            "maxItems": 25,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "generation_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Saved source generation UUID, or null when this export has no recorded saved-generation link."
                },
                "id": {
                  "type": "string"
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "mp4",
                    "png",
                    "jpeg",
                    "psd",
                    "svg",
                    "media",
                    "premiere",
                    "after-effects",
                    "resolve",
                    "final-cut"
                  ]
                },
                "composition_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Compositions included in this export. New API exports contain one; older app bundles may contain several."
                },
                "turn_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Turn that saved the exported version, when recorded."
                },
                "origin": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "app",
                        "api"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Where this request originated. Null for historical exports without recorded provenance."
                },
                "created_by": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "User who requested this export. Null for deleted users or unrecorded historical attribution."
                },
                "created_by_you": {
                  "description": "True when the user behind this credential requested the export; false for another requester; null when historical attribution is unavailable.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "preparing",
                    "completed",
                    "failed"
                  ]
                },
                "progress": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "stage": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "waiting",
                        "preparing",
                        "rendering",
                        "packaging",
                        "completed",
                        "failed"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "type": "string"
                },
                "size_bytes": {
                  "description": "Export package size in bytes when available.",
                  "type": "number"
                },
                "content_type": {
                  "description": "Download MIME type, usually application/zip for a composition package.",
                  "type": "string"
                },
                "download_url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Signed download URL for this composition’s export package. Null until completed; read this export again to renew an expired link."
                },
                "expires_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "generation_id",
                "id",
                "project_id",
                "format",
                "composition_ids",
                "turn_id",
                "origin",
                "created_by",
                "created_by_you",
                "created_at",
                "status",
                "progress",
                "stage",
                "warnings",
                "error",
                "download_url",
                "expires_at"
              ],
              "additionalProperties": false
            },
            "description": "Exports from the API and app. Each includes its format, status and download when ready."
          },
          "exports_has_more": {
            "type": "boolean",
            "description": "More exports are available."
          },
          "exports_next_cursor": {
            "description": "Pass as cursor to GET /projects/{id}/exports to read the next page.",
            "type": [
              "string",
              "null"
            ]
          },
          "has_more": {
            "type": "boolean",
            "description": "More generations are available."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as cursor to read the next page of generations."
          }
        },
        "required": [
          "id",
          "title",
          "status",
          "progress",
          "latest_turn_id",
          "created_at",
          "updated_at",
          "chat_url",
          "effort",
          "fast_mode",
          "connectors",
          "export_formats",
          "messages",
          "messages_has_more",
          "messages_next_after_sequence",
          "generations",
          "exports",
          "exports_has_more",
          "exports_next_cursor",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "MotionCreateProjectResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "message_id": {
            "type": "string",
            "format": "uuid"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "chat_url": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled",
              "awaiting_user_input",
              "awaiting_credits"
            ]
          }
        },
        "required": [
          "project_id",
          "message_id",
          "turn_id",
          "chat_url",
          "status"
        ],
        "additionalProperties": false
      },
      "MotionSendProjectMessageResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "message_id": {
            "type": "string",
            "format": "uuid"
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "chat_url": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed",
              "cancelled",
              "awaiting_user_input",
              "awaiting_credits"
            ]
          }
        },
        "required": [
          "project_id",
          "message_id",
          "turn_id",
          "chat_url",
          "status"
        ],
        "additionalProperties": false
      },
      "MotionListProjectExportsResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "exports": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "generation_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Saved source generation UUID, or null when this export has no recorded saved-generation link."
                },
                "id": {
                  "type": "string"
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "mp4",
                    "png",
                    "jpeg",
                    "psd",
                    "svg",
                    "media",
                    "premiere",
                    "after-effects",
                    "resolve",
                    "final-cut"
                  ]
                },
                "composition_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Compositions included in this export. New API exports contain one; older app bundles may contain several."
                },
                "turn_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Turn that saved the exported version, when recorded."
                },
                "origin": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "app",
                        "api"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Where this request originated. Null for historical exports without recorded provenance."
                },
                "created_by": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "User who requested this export. Null for deleted users or unrecorded historical attribution."
                },
                "created_by_you": {
                  "description": "True when the user behind this credential requested the export; false for another requester; null when historical attribution is unavailable.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "preparing",
                    "completed",
                    "failed"
                  ]
                },
                "progress": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "stage": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "waiting",
                        "preparing",
                        "rendering",
                        "packaging",
                        "completed",
                        "failed"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "type": "string"
                },
                "size_bytes": {
                  "description": "Export package size in bytes when available.",
                  "type": "number"
                },
                "content_type": {
                  "description": "Download MIME type, usually application/zip for a composition package.",
                  "type": "string"
                },
                "download_url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Signed download URL for this composition’s export package. Null until completed; read this export again to renew an expired link."
                },
                "expires_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "generation_id",
                "id",
                "project_id",
                "format",
                "composition_ids",
                "turn_id",
                "origin",
                "created_by",
                "created_by_you",
                "created_at",
                "status",
                "progress",
                "stage",
                "warnings",
                "error",
                "download_url",
                "expires_at"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "project_id",
          "exports",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "MotionCreateProjectExportResponse": {
        "type": "object",
        "properties": {
          "exports": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "generation_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Saved source generation UUID, or null when this export has no recorded saved-generation link."
                },
                "id": {
                  "type": "string"
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "mp4",
                    "png",
                    "jpeg",
                    "psd",
                    "svg",
                    "media",
                    "premiere",
                    "after-effects",
                    "resolve",
                    "final-cut"
                  ]
                },
                "composition_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Compositions included in this export. New API exports contain one; older app bundles may contain several."
                },
                "turn_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Turn that saved the exported version, when recorded."
                },
                "origin": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "app",
                        "api"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Where this request originated. Null for historical exports without recorded provenance."
                },
                "created_by": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "User who requested this export. Null for deleted users or unrecorded historical attribution."
                },
                "created_by_you": {
                  "description": "True when the user behind this credential requested the export; false for another requester; null when historical attribution is unavailable.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "preparing",
                    "completed",
                    "failed"
                  ]
                },
                "progress": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "stage": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "waiting",
                        "preparing",
                        "rendering",
                        "packaging",
                        "completed",
                        "failed"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "type": "string"
                },
                "size_bytes": {
                  "description": "Export package size in bytes when available.",
                  "type": "number"
                },
                "content_type": {
                  "description": "Download MIME type, usually application/zip for a composition package.",
                  "type": "string"
                },
                "download_url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Signed download URL for this composition’s export package. Null until completed; read this export again to renew an expired link."
                },
                "expires_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "generation_id",
                "id",
                "project_id",
                "format",
                "composition_ids",
                "turn_id",
                "origin",
                "created_by",
                "created_by_you",
                "created_at",
                "status",
                "progress",
                "stage",
                "warnings",
                "error",
                "download_url",
                "expires_at"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "exports"
        ],
        "additionalProperties": false
      },
      "MotionGetProjectExportResponse": {
        "type": "object",
        "properties": {
          "generation_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Saved source generation UUID, or null when this export has no recorded saved-generation link."
          },
          "id": {
            "type": "string"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "format": {
            "type": "string",
            "enum": [
              "mp4",
              "png",
              "jpeg",
              "psd",
              "svg",
              "media",
              "premiere",
              "after-effects",
              "resolve",
              "final-cut"
            ]
          },
          "composition_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Compositions included in this export. New API exports contain one; older app bundles may contain several."
          },
          "turn_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "Turn that saved the exported version, when recorded."
          },
          "origin": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "app",
                  "api"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Where this request originated. Null for historical exports without recorded provenance."
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "description": "User who requested this export. Null for deleted users or unrecorded historical attribution."
          },
          "created_by_you": {
            "description": "True when the user behind this credential requested the export; false for another requester; null when historical attribution is unavailable.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "preparing",
              "completed",
              "failed"
            ]
          },
          "progress": {
            "type": [
              "number",
              "null"
            ]
          },
          "stage": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "waiting",
                  "preparing",
                  "rendering",
                  "packaging",
                  "completed",
                  "failed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "filename": {
            "type": "string"
          },
          "size_bytes": {
            "description": "Export package size in bytes when available.",
            "type": "number"
          },
          "content_type": {
            "description": "Download MIME type, usually application/zip for a composition package.",
            "type": "string"
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "description": "Signed download URL for this composition’s export package. Null until completed; read this export again to renew an expired link."
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "generation_id",
          "id",
          "project_id",
          "format",
          "composition_ids",
          "turn_id",
          "origin",
          "created_by",
          "created_by_you",
          "created_at",
          "status",
          "progress",
          "stage",
          "warnings",
          "error",
          "download_url",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "MotionCreateLibraryUploadResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "const": "uploading"
          },
          "upload_url": {
            "type": "string",
            "format": "uri"
          },
          "upload_method": {
            "type": "string",
            "const": "POST"
          },
          "upload_fields": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "status",
          "upload_url",
          "upload_method",
          "upload_fields",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "MotionCompleteLibraryUploadResponse": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "filename": {
                "type": "string"
              },
              "asset_type": {
                "type": "string",
                "enum": [
                  "image",
                  "video",
                  "audio",
                  "pdf",
                  "file"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "uploading",
                  "processing",
                  "ready",
                  "failed"
                ]
              },
              "source_type": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "user_uploaded",
                      "agent_found",
                      "agent_generated"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "content_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "size_bytes": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "download_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "status",
              "created_at",
              "download_url",
              "expires_at"
            ],
            "additionalProperties": {}
          }
        },
        "required": [
          "asset"
        ],
        "additionalProperties": false
      },
      "MotionCreateVisualTemplateResponse": {
        "type": "object",
        "properties": {
          "template": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "video",
                  "image"
                ]
              },
              "mode": {
                "type": "string",
                "enum": [
                  "style",
                  "layout_and_style"
                ]
              },
              "editable": {
                "type": "boolean"
              },
              "version_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "instructions": {
                "type": "string"
              },
              "width": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "height": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "duration_seconds": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "preview_status": {
                "type": "string",
                "enum": [
                  "preparing",
                  "ready",
                  "failed"
                ]
              },
              "preview_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "thumbnail_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "brand_kit_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "default_brand_kit_available": {
                "type": "boolean"
              },
              "generation_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resource_url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "kind",
              "mode",
              "editable",
              "version_id",
              "instructions",
              "width",
              "height",
              "duration_seconds",
              "preview_status",
              "preview_url",
              "thumbnail_url",
              "brand_kit_id",
              "default_brand_kit_available",
              "generation_id",
              "created_at",
              "resource_url"
            ],
            "additionalProperties": false,
            "description": "Saved template, current version, source generation ID and preview status."
          }
        },
        "required": [
          "template"
        ],
        "additionalProperties": false
      },
      "MotionDeleteTemplateResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": false
      },
      "MotionDeleteBrandKitResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": false
      },
      "MotionConnectorAuthorizationResponse": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "github",
              "notion"
            ],
            "description": "Service being connected. API authorization currently supports GitHub and Notion."
          },
          "organization_id": {
            "type": "string",
            "description": "Organization ID fixed to this credential."
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid",
            "description": "Workspace where the connection will be saved after authorization."
          },
          "authorization_url": {
            "type": "string",
            "format": "uri",
            "description": "Provider authorization URL a person must open and approve. Expires after ten minutes."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Authorization expiry timestamp. Request a fresh link after expiry."
          },
          "requires_human_authorization": {
            "type": "boolean",
            "const": true,
            "description": "Provider access requires a person to approve the connection."
          },
          "status": {
            "type": "string",
            "const": "pending_authorization",
            "description": "Authorization has started; no connection has been created yet."
          },
          "next": {
            "type": "string",
            "description": "How to complete authorization and find the new connection ID."
          }
        },
        "required": [
          "provider",
          "organization_id",
          "workspace_id",
          "authorization_url",
          "expires_at",
          "requires_human_authorization",
          "status",
          "next"
        ],
        "additionalProperties": false
      },
      "MotionConnectorCatalog": {
        "type": "object",
        "properties": {
          "connectors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "enum": [
                    "github",
                    "notion",
                    "google-drive",
                    "getty",
                    "s3",
                    "tiktok",
                    "youtube",
                    "instagram",
                    "facebook",
                    "x",
                    "threads",
                    "linkedin",
                    "reddit",
                    "mastodon",
                    "bluesky",
                    "snapchat"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "scope": {
                  "type": "string",
                  "const": "organization",
                  "description": "Connection belongs to the credential’s organization and workspace."
                },
                "visibility": {
                  "type": "string",
                  "const": "private"
                },
                "authentication": {
                  "type": "string",
                  "enum": [
                    "oauth",
                    "credentials"
                  ],
                  "description": "OAuth requires a person to approve a link; credentials requires the catalog input fields."
                },
                "available": {
                  "type": "boolean"
                },
                "unavailable_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "not_configured",
                        "admin_required",
                        "manager_required",
                        "setup_unavailable",
                        "account_access_required"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Why setup is unavailable; null when you can connect the service."
                },
                "input_schema": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {},
                  "description": "JSON Schema for the exact Connect a service request accepted by this catalog option."
                },
                "permission_options": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "write": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "write"
                    ],
                    "additionalProperties": false
                  }
                },
                "project_usable": {
                  "type": "boolean",
                  "description": "Whether this connection can be selected in project prompts."
                }
              },
              "required": [
                "id",
                "name",
                "scope",
                "visibility",
                "authentication",
                "available",
                "unavailable_reason",
                "input_schema",
                "permission_options",
                "project_usable"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "connectors"
        ],
        "additionalProperties": false
      },
      "MotionConnectServiceRequest": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "connector_id": {
                "type": "string",
                "enum": [
                  "github",
                  "notion",
                  "google-drive"
                ]
              }
            },
            "required": [
              "connector_id"
            ],
            "additionalProperties": false,
            "title": "OAuth service"
          },
          {
            "type": "object",
            "properties": {
              "connector_id": {
                "type": "string",
                "enum": [
                  "tiktok",
                  "youtube",
                  "instagram",
                  "facebook",
                  "x",
                  "threads",
                  "linkedin",
                  "reddit",
                  "mastodon",
                  "bluesky",
                  "snapchat"
                ]
              },
              "name": {
                "description": "Optional account label.",
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "request_id": {
                "description": "Reuse this ID when retrying the same connection request.",
                "type": "string",
                "format": "uuid"
              }
            },
            "required": [
              "connector_id"
            ],
            "additionalProperties": false,
            "title": "Social account"
          },
          {
            "type": "object",
            "properties": {
              "connector_id": {
                "type": "string",
                "const": "getty"
              },
              "credentials": {
                "type": "object",
                "properties": {
                  "api_key": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8192,
                    "description": "Provider credential. Encrypted at rest and never returned by the API.",
                    "writeOnly": true
                  },
                  "client_secret": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8192,
                    "description": "Provider credential. Encrypted at rest and never returned by the API.",
                    "writeOnly": true
                  }
                },
                "required": [
                  "api_key",
                  "client_secret"
                ],
                "additionalProperties": false,
                "description": "Getty application credentials, verified before saving and never returned."
              }
            },
            "required": [
              "connector_id",
              "credentials"
            ],
            "additionalProperties": false,
            "title": "Getty credentials"
          },
          {
            "type": "object",
            "properties": {
              "connector_id": {
                "type": "string",
                "const": "s3"
              },
              "credentials": {
                "type": "object",
                "properties": {
                  "access_key_id": {
                    "type": "string",
                    "minLength": 16,
                    "maxLength": 128,
                    "description": "AWS access key ID used to verify the requested bucket permissions.",
                    "writeOnly": true
                  },
                  "secret_access_key": {
                    "type": "string",
                    "minLength": 16,
                    "maxLength": 256,
                    "description": "AWS secret access key, encrypted at rest and never returned.",
                    "writeOnly": true
                  },
                  "session_token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8192,
                    "description": "Provider credential. Encrypted at rest and never returned by the API.",
                    "writeOnly": true
                  }
                },
                "required": [
                  "access_key_id",
                  "secret_access_key"
                ],
                "additionalProperties": false,
                "description": "AWS credentials, optionally including a temporary session token."
              },
              "config": {
                "type": "object",
                "properties": {
                  "bucket": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 63,
                    "description": "S3 bucket name. No IP addresses or consecutive dots."
                  },
                  "region": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "AWS region, for example us-east-1."
                  },
                  "prefix": {
                    "default": "",
                    "description": "Literal object prefix; no wildcard, control characters, dot or parent path segments.",
                    "type": "string",
                    "maxLength": 900
                  },
                  "read_test_key": {
                    "description": "Existing nonempty object key inside prefix, required to verify read-only access.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024
                  }
                },
                "required": [
                  "bucket",
                  "region"
                ],
                "additionalProperties": false,
                "description": "The S3 bucket, region and literal object prefix this connection may access."
              },
              "actions": {
                "default": [
                  "files",
                  "downloads"
                ],
                "description": "AWS actions to verify. Defaults to read-only files and downloads. Read-only setup requires an existing nonempty read_test_key inside the prefix.",
                "minItems": 1,
                "maxItems": 4,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "files",
                    "downloads",
                    "uploads",
                    "deletes"
                  ]
                }
              }
            },
            "required": [
              "connector_id",
              "credentials",
              "config"
            ],
            "additionalProperties": false,
            "title": "S3 credentials"
          }
        ]
      },
      "MotionConnectServiceResponse": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "connector_id": {
                "type": "string",
                "enum": [
                  "github",
                  "notion",
                  "google-drive",
                  "getty",
                  "s3",
                  "tiktok",
                  "youtube",
                  "instagram",
                  "facebook",
                  "x",
                  "threads",
                  "linkedin",
                  "reddit",
                  "mastodon",
                  "bluesky",
                  "snapchat",
                  "figma",
                  "dropbox",
                  "slack",
                  "x-account"
                ],
                "description": "Service ID; the connection id identifies a saved account."
              },
              "scope": {
                "type": "string",
                "const": "organization",
                "description": "Connection belongs to the credential’s organization and workspace."
              },
              "visibility": {
                "type": "string",
                "const": "private"
              },
              "status": {
                "type": "string",
                "const": "pending_authorization"
              },
              "authorization_url": {
                "type": "string",
                "format": "uri",
                "description": "Provider authorization page for a person to approve; this response is not a connected account."
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "connections_url": {
                "type": "string",
                "description": "Poll this API path after approval to discover the saved connection UUID."
              }
            },
            "required": [
              "connector_id",
              "scope",
              "visibility",
              "status",
              "authorization_url",
              "expires_at",
              "connections_url"
            ],
            "additionalProperties": false,
            "title": "Pending authorization"
          },
          {
            "type": "object",
            "properties": {
              "connector_id": {
                "type": "string",
                "enum": [
                  "github",
                  "notion",
                  "google-drive",
                  "getty",
                  "s3",
                  "tiktok",
                  "youtube",
                  "instagram",
                  "facebook",
                  "x",
                  "threads",
                  "linkedin",
                  "reddit",
                  "mastodon",
                  "bluesky",
                  "snapchat",
                  "figma",
                  "dropbox",
                  "slack",
                  "x-account"
                ],
                "description": "Service ID; the connection id identifies a saved account."
              },
              "scope": {
                "type": "string",
                "const": "organization",
                "description": "Connection belongs to the credential’s organization and workspace."
              },
              "visibility": {
                "type": "string",
                "const": "private"
              },
              "status": {
                "type": "string",
                "const": "connected"
              },
              "connection": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "connector_id": {
                    "type": "string",
                    "enum": [
                      "github",
                      "notion",
                      "google-drive",
                      "getty",
                      "s3",
                      "tiktok",
                      "youtube",
                      "instagram",
                      "facebook",
                      "x",
                      "threads",
                      "linkedin",
                      "reddit",
                      "mastodon",
                      "bluesky",
                      "snapchat",
                      "figma",
                      "dropbox",
                      "slack",
                      "x-account"
                    ],
                    "description": "Service ID; the connection id identifies a saved account."
                  },
                  "scope": {
                    "type": "string",
                    "const": "organization",
                    "description": "Connection belongs to the credential’s organization and workspace."
                  },
                  "visibility": {
                    "type": "string",
                    "const": "private"
                  },
                  "organization_id": {
                    "type": "string"
                  },
                  "workspace_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "description": "Connected account display name."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "connected",
                      "unverified",
                      "needs_attention"
                    ],
                    "description": "Latest recorded verification: connected passed, unverified has not been checked, needs_attention failed. Reflects the latest provider authorization status."
                  },
                  "can_use": {
                    "type": "boolean",
                    "description": "Whether this connection is verified and available for use."
                  },
                  "capabilities": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    }
                  },
                  "permission_options": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "label": {
                          "type": "string"
                        },
                        "write": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "label",
                        "write"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "verified_at": {
                    "description": "Time of the last provider verification, or null if not yet checked.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "updated_at": {
                    "type": "string"
                  },
                  "error": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "connector_id",
                  "scope",
                  "visibility",
                  "organization_id",
                  "workspace_id",
                  "name",
                  "status",
                  "can_use",
                  "capabilities",
                  "permission_options",
                  "verified_at",
                  "created_at",
                  "updated_at",
                  "error"
                ],
                "additionalProperties": false,
                "description": "The verified connected account in this workspace."
              }
            },
            "required": [
              "connector_id",
              "scope",
              "visibility",
              "status",
              "connection"
            ],
            "additionalProperties": false,
            "title": "Connected account"
          }
        ]
      },
      "MotionPrivateConnections": {
        "type": "object",
        "properties": {
          "connections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "connector_id": {
                  "type": "string",
                  "enum": [
                    "github",
                    "notion",
                    "google-drive",
                    "getty",
                    "s3",
                    "tiktok",
                    "youtube",
                    "instagram",
                    "facebook",
                    "x",
                    "threads",
                    "linkedin",
                    "reddit",
                    "mastodon",
                    "bluesky",
                    "snapchat",
                    "figma",
                    "dropbox",
                    "slack",
                    "x-account"
                  ],
                  "description": "Service ID; the connection id identifies a saved account."
                },
                "scope": {
                  "type": "string",
                  "const": "organization",
                  "description": "Connection belongs to the credential’s organization and workspace."
                },
                "visibility": {
                  "type": "string",
                  "const": "private"
                },
                "organization_id": {
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "description": "Connected account display name."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "connected",
                    "unverified",
                    "needs_attention"
                  ],
                  "description": "Latest recorded verification: connected passed, unverified has not been checked, needs_attention failed. Reflects the latest provider authorization status."
                },
                "can_use": {
                  "type": "boolean",
                  "description": "Whether this connection is verified and available for use."
                },
                "capabilities": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "boolean"
                  }
                },
                "permission_options": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "write": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "write"
                    ],
                    "additionalProperties": false
                  }
                },
                "verified_at": {
                  "description": "Time of the last provider verification, or null if not yet checked.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "connector_id",
                "scope",
                "visibility",
                "organization_id",
                "workspace_id",
                "name",
                "status",
                "can_use",
                "capabilities",
                "permission_options",
                "verified_at",
                "created_at",
                "updated_at",
                "error"
              ],
              "additionalProperties": false
            },
            "description": "Your connected accounts in this workspace."
          }
        },
        "required": [
          "connections"
        ],
        "additionalProperties": false
      },
      "MotionPrivateConnection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "connector_id": {
            "type": "string",
            "enum": [
              "github",
              "notion",
              "figma",
              "google-drive",
              "dropbox",
              "getty",
              "s3",
              "slack",
              "x"
            ],
            "description": "Service catalog ID from List connectors; identifies a provider, not a saved account."
          },
          "scope": {
            "type": "string",
            "const": "organization",
            "description": "Connection belongs to the credential’s organization and workspace."
          },
          "visibility": {
            "type": "string",
            "const": "private"
          },
          "organization_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "description": "Connected account display name."
          },
          "status": {
            "type": "string",
            "enum": [
              "connected",
              "unverified",
              "needs_attention"
            ],
            "description": "Latest recorded verification: connected passed, unverified has not been checked, needs_attention failed. Reflects the latest provider authorization status."
          },
          "can_use": {
            "type": "boolean",
            "description": "Whether this connection is verified and available for use."
          },
          "capabilities": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "boolean"
            }
          },
          "permission_options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "write": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "label",
                "write"
              ],
              "additionalProperties": false
            }
          },
          "verified_at": {
            "description": "Time of the last provider verification, or null if not yet checked.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "connector_id",
          "scope",
          "visibility",
          "organization_id",
          "workspace_id",
          "name",
          "status",
          "can_use",
          "capabilities",
          "permission_options",
          "verified_at",
          "created_at",
          "updated_at",
          "error"
        ],
        "additionalProperties": false
      },
      "MotionGetConnectionResponse": {
        "type": "object",
        "properties": {
          "connection": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "connector_id": {
                "type": "string",
                "enum": [
                  "github",
                  "notion",
                  "google-drive",
                  "getty",
                  "s3",
                  "tiktok",
                  "youtube",
                  "instagram",
                  "facebook",
                  "x",
                  "threads",
                  "linkedin",
                  "reddit",
                  "mastodon",
                  "bluesky",
                  "snapchat",
                  "figma",
                  "dropbox",
                  "slack",
                  "x-account"
                ],
                "description": "Service ID; the connection id identifies a saved account."
              },
              "scope": {
                "type": "string",
                "const": "organization",
                "description": "Connection belongs to the credential’s organization and workspace."
              },
              "visibility": {
                "type": "string",
                "const": "private"
              },
              "organization_id": {
                "type": "string"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string",
                "description": "Connected account display name."
              },
              "status": {
                "type": "string",
                "enum": [
                  "connected",
                  "unverified",
                  "needs_attention"
                ],
                "description": "Latest recorded verification: connected passed, unverified has not been checked, needs_attention failed. Reflects the latest provider authorization status."
              },
              "can_use": {
                "type": "boolean",
                "description": "Whether this connection is verified and available for use."
              },
              "capabilities": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "boolean"
                }
              },
              "permission_options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "write": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "write"
                  ],
                  "additionalProperties": false
                }
              },
              "verified_at": {
                "description": "Time of the last provider verification, or null if not yet checked.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string"
              },
              "updated_at": {
                "type": "string"
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "connector_id",
              "scope",
              "visibility",
              "organization_id",
              "workspace_id",
              "name",
              "status",
              "can_use",
              "capabilities",
              "permission_options",
              "verified_at",
              "created_at",
              "updated_at",
              "error"
            ],
            "additionalProperties": false,
            "description": "Your connected account in this workspace."
          }
        },
        "required": [
          "connection"
        ],
        "additionalProperties": false
      },
      "MotionDeleteConnectionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": false
      },
      "MotionListProjectMessagesResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Message UUID returned for an accepted prompt or saved assistant response."
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant"
                  ],
                  "description": "Who sent this message: user or assistant."
                },
                "content": {
                  "type": "string",
                  "description": "Message text."
                },
                "sequence_num": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "turn_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "effort": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "standard",
                        "extended"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Effort used for this turn; null when unavailable."
                },
                "template_ids": {
                  "description": "Templates attached to this user message.",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "brand_kit_ids": {
                  "description": "Effective brand kits for this user message.",
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "explanations": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "explanations_omitted": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "role",
                "content",
                "sequence_num",
                "created_at",
                "turn_id",
                "effort"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_after_sequence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "project_id",
          "messages",
          "has_more",
          "next_after_sequence"
        ],
        "additionalProperties": false
      },
      "MotionListProjectTurnsResponse": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "turns": {
            "type": "array",
            "description": "Project turns ordered newest first by created_at.",
            "items": {
              "type": "object",
              "properties": {
                "turn_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Turn UUID matching messages.turn_id, generations.turn_id, and exports.turn_id. Null for historical runs without a recorded trigger message."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "completed",
                    "failed",
                    "cancelled",
                    "awaiting_user_input",
                    "awaiting_credits"
                  ],
                  "description": "Lifecycle status of this turn."
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Actionable failure reason when status is failed; null otherwise."
                },
                "effort": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "standard",
                        "extended"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Effort used for this turn; null when unavailable."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Timestamp when this turn was started."
                },
                "completed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Timestamp when this turn reached a terminal state; null while active or paused."
                },
                "generation_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Saved generation UUID produced by this turn, or null if no generation was saved."
                },
                "export_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "description": "Export receipt UUIDs linked to this turn (automatic and manual)."
                }
              },
              "required": [
                "turn_id",
                "status",
                "error",
                "effort",
                "created_at",
                "completed_at",
                "generation_id",
                "export_ids"
              ],
              "additionalProperties": false
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "More turns are available."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as cursor to read the next page of turns."
          }
        },
        "required": [
          "project_id",
          "turns",
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "WorkflowBrief": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "definition": {
            "type": "object",
            "properties": {
              "prompt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 12000
              },
              "variables": {
                "type": "array",
                "maxItems": 40,
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 500
                    },
                    "default": {
                      "type": "string",
                      "maxLength": 4000
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "additionalProperties": false
                }
              },
              "defaults": {
                "type": "object",
                "properties": {
                  "engine": {
                    "type": "string",
                    "enum": [
                      "gva",
                      "motion",
                      "mira"
                    ]
                  },
                  "effort": {
                    "type": "string",
                    "enum": [
                      "standard",
                      "extended",
                      "light",
                      "medium",
                      "high"
                    ],
                    "description": "Project effort, fixed at creation. Defaults to standard."
                  },
                  "aspect_ratio": {
                    "type": "string",
                    "enum": [
                      "16:9",
                      "9:16",
                      "1:1"
                    ]
                  },
                  "duration": {
                    "type": "string"
                  },
                  "template": {
                    "type": "string"
                  },
                  "design_system_id": {
                    "type": "string"
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "required": [
              "prompt"
            ],
            "additionalProperties": false
          },
          "visibility": {
            "type": "string",
            "enum": [
              "private",
              "workspace",
              "selected"
            ]
          },
          "grants": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "userId": {
                  "type": "string",
                  "format": "uuid"
                },
                "permission": {
                  "type": "string",
                  "enum": [
                    "use",
                    "edit"
                  ]
                }
              },
              "required": [
                "userId",
                "permission"
              ],
              "additionalProperties": false
            }
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "can_edit": {
            "type": "boolean"
          },
          "can_share": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "organization_id",
          "workspace_id",
          "name",
          "definition",
          "revision",
          "visibility"
        ],
        "additionalProperties": true
      }
    },
    "parameters": {
      "MotionApiVersion": {
        "name": "Motion-API-Version",
        "in": "header",
        "required": false,
        "description": "Optional API version override for this request. When omitted, Motion uses the API version pinned to your API key or OAuth connection.",
        "schema": {
          "type": "string",
          "enum": [
            "2026-10-22"
          ],
          "default": "2026-10-22"
        },
        "example": "2026-10-22"
      }
    }
  },
  "tags": [
    {
      "name": "Projects"
    },
    {
      "name": "Exports"
    },
    {
      "name": "Library"
    },
    {
      "name": "Templates"
    },
    {
      "name": "Brand kits"
    },
    {
      "name": "Connectors",
      "description": "Connect services and control the actions a project may use."
    },
    {
      "name": "Automations"
    },
    {
      "name": "Social posting"
    },
    {
      "name": "Deprecated (/sessions)",
      "description": "Earlier single-video endpoints kept callable for existing 2026-10-22 integrations. Use Projects on 2026-11-19 for new integrations."
    }
  ]
}
