{
 "openapi": "3.1.0",
 "info": {
  "title": "GoMotion API",
  "version": "1.2.0",
  "description": "Create AI documentary videos from a script or your own voiceover, write scripts and thumbnails, and export MP4s — with the same credits as the GoMotion studio. Docs: https://gomotionai.com/developers"
 },
 "servers": [
  {
   "url": "https://gomotionai.com"
  }
 ],
 "security": [
  {
   "bearer": []
  },
  {
   "apiKey": []
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "description": "Authorization: Bearer gmk_live_..."
   },
   "apiKey": {
    "type": "apiKey",
    "in": "header",
    "name": "X-API-Key"
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "properties": {
     "error": {
      "type": "string",
      "description": "Human readable message (English)."
     },
     "code": {
      "type": "string",
      "description": "Stable machine code (on errors added in API 1.1): plan_required, key_videos_in_flight, key_videos_per_day, account_videos_per_day, api_capacity, api_paused, api_not_enabled; API 1.2: topic_no_references, topic_search_failed, webhook_limit, webhooks_paused, dns, blocked_address."
     },
     "retry_after": {
      "type": "integer",
      "description": "Seconds to wait before retrying (also in the Retry-After header)."
     },
     "required_plan": {
      "type": "string"
     },
     "needed": {
      "type": "integer"
     },
     "available": {
      "type": "integer"
     },
     "cap": {
      "type": "integer"
     },
     "spent": {
      "type": "integer"
     },
     "limit": {
      "type": "integer"
     },
     "cost_credits": {
      "type": "integer"
     },
     "max_cost_credits": {
      "type": "integer"
     }
    },
    "additionalProperties": true,
    "required": [
     "error"
    ]
   },
   "Video": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^j_[a-f0-9]{16}$"
     },
     "object": {
      "const": "video"
     },
     "status": {
      "enum": [
       "queued",
       "running",
       "succeeded",
       "failed",
       "cancelled",
       "interrupted"
      ]
     },
     "progress": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "percent": {
          "type": [
           "integer",
           "null"
          ]
         },
         "phase": {
          "type": [
           "string",
           "null"
          ]
         },
         "eta_s": {
          "type": [
           "integer",
           "null"
          ]
         }
        },
        "additionalProperties": false,
        "required": [
         "percent",
         "phase",
         "eta_s"
        ]
       },
       {
        "type": "null"
       }
      ]
     },
     "queue_position": {
      "type": [
       "integer",
       "null"
      ]
     },
     "project_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "estimated_duration_sec": {
      "type": [
       "number",
       "null"
      ]
     },
     "cost_credits": {
      "type": [
       "integer",
       "null"
      ]
     },
     "refunded": {
      "type": "boolean"
     },
     "error": {
      "type": [
       "string",
       "null"
      ]
     },
     "created_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "updated_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "external_id": {
      "type": [
       "string",
       "null"
      ],
      "description": "Your own id from the create call (null if none). Since API 1.2."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": "string",
       "maxLength": 500
      },
      "description": "Your own key-value data from the create call ({} if none). Since API 1.2."
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "status",
     "progress",
     "queue_position",
     "project_id",
     "estimated_duration_sec",
     "cost_credits",
     "refunded",
     "error",
     "created_at",
     "updated_at"
    ]
   },
   "Export": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^j_[a-f0-9]{16}$"
     },
     "object": {
      "const": "export"
     },
     "status": {
      "enum": [
       "queued",
       "running",
       "succeeded",
       "failed",
       "cancelled",
       "interrupted"
      ]
     },
     "progress": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "percent": {
          "type": [
           "integer",
           "null"
          ]
         },
         "phase": {
          "type": [
           "string",
           "null"
          ]
         },
         "eta_s": {
          "type": [
           "integer",
           "null"
          ]
         }
        },
        "additionalProperties": false,
        "required": [
         "percent",
         "phase",
         "eta_s"
        ]
       },
       {
        "type": "null"
       }
      ]
     },
     "queue_position": {
      "type": [
       "integer",
       "null"
      ]
     },
     "project_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "cost_credits": {
      "type": [
       "integer",
       "null"
      ]
     },
     "refunded": {
      "type": "boolean"
     },
     "error": {
      "type": [
       "string",
       "null"
      ]
     },
     "download_url": {
      "type": [
       "string",
       "null"
      ],
      "description": "Signed MP4 link (only when status is succeeded). Re-signed on every GET. Valid 12 h; the file is kept 48 h: download it and host it yourself."
     },
     "download_url_expires_in_s": {
      "type": [
       "integer",
       "null"
      ]
     },
     "created_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "updated_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "download_filename": {
      "type": [
       "string",
       "null"
      ],
      "description": "File name the download_url saves as (download_filename of the export call, default gomotion_video.mp4; null until succeeded). Since API 1.2."
     },
     "external_id": {
      "type": [
       "string",
       "null"
      ],
      "description": "Your own id from the create call (null if none). Since API 1.2."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": "string",
       "maxLength": 500
      },
      "description": "Your own key-value data from the create call ({} if none). Since API 1.2."
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "status",
     "progress",
     "queue_position",
     "project_id",
     "cost_credits",
     "refunded",
     "error",
     "download_url",
     "download_url_expires_in_s",
     "created_at",
     "updated_at"
    ]
   },
   "VideoList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Video"
      }
     },
     "has_more": {
      "type": "boolean"
     },
     "next_starting_after": {
      "type": [
       "string",
       "null"
      ],
      "description": "Pass as ?starting_after= to get the next page (null on the last page). Since API 1.2."
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data",
     "has_more"
    ]
   },
   "ExportList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Export"
      }
     },
     "has_more": {
      "type": "boolean"
     },
     "next_starting_after": {
      "type": [
       "string",
       "null"
      ],
      "description": "Pass as ?starting_after= to get the next page (null on the last page). Since API 1.2."
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data",
     "has_more"
    ]
   },
   "ScriptResult": {
    "type": "object",
    "properties": {
     "title": {
      "type": "string"
     },
     "script": {
      "type": "string"
     },
     "words": {
      "type": [
       "integer",
       "null"
      ]
     },
     "estimated_minutes": {
      "type": [
       "number",
       "null"
      ]
     },
     "references": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "credits": {
      "type": "integer"
     },
     "included_in_plan": {
      "type": "boolean"
     }
    },
    "additionalProperties": false,
    "required": [
     "title",
     "script",
     "words",
     "estimated_minutes",
     "references",
     "credits",
     "included_in_plan"
    ]
   },
   "ThumbnailResult": {
    "type": "object",
    "properties": {
     "url": {
      "type": [
       "string",
       "null"
      ]
     },
     "permanent": {
      "type": "boolean"
     },
     "title": {
      "type": "string"
     },
     "references": {
      "type": "array"
     },
     "credits": {
      "type": "integer"
     },
     "included_in_plan": {
      "type": "boolean"
     }
    },
    "additionalProperties": false,
    "required": [
     "url",
     "permanent",
     "title",
     "references",
     "credits",
     "included_in_plan"
    ]
   },
   "Task": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^(scr|thm)_[a-f0-9]{16}$"
     },
     "object": {
      "enum": [
       "script",
       "thumbnail"
      ]
     },
     "status": {
      "enum": [
       "running",
       "succeeded",
       "failed"
      ]
     },
     "result": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/ScriptResult"
       },
       {
        "$ref": "#/components/schemas/ThumbnailResult"
       },
       {
        "type": "null"
       }
      ]
     },
     "error": {
      "type": [
       "string",
       "null"
      ]
     },
     "created_at": {
      "type": "integer"
     },
     "updated_at": {
      "type": "integer"
     },
     "credits_refunded": {
      "type": [
       "integer",
       "null"
      ]
     },
     "external_id": {
      "type": [
       "string",
       "null"
      ],
      "description": "Your own id from the create call (null if none). Since API 1.2."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": "string",
       "maxLength": 500
      },
      "description": "Your own key-value data from the create call ({} if none). Since API 1.2."
     },
     "references_source": {
      "enum": [
       "channel",
       "video_ids",
       "topic_search"
      ],
      "description": "Scripts only: where the style references came from. Since API 1.2."
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "status",
     "result",
     "error",
     "created_at",
     "updated_at"
    ]
   },
   "Credits": {
    "type": "object",
    "properties": {
     "balance": {
      "type": "integer"
     },
     "held": {
      "type": "integer"
     },
     "available": {
      "type": "integer"
     },
     "expires_at": {
      "type": "integer"
     },
     "topup_credits": {
      "type": "integer"
     },
     "renews_at": {
      "type": "integer"
     },
     "key": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "id": {
          "type": "string"
         },
         "max_credits_day": {
          "type": "integer"
         },
         "spent_today": {
          "type": "integer"
         }
        },
        "additionalProperties": false,
        "required": [
         "id",
         "max_credits_day",
         "spent_today"
        ]
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "balance",
     "held",
     "available",
     "expires_at",
     "topup_credits",
     "renews_at",
     "key"
    ]
   },
   "CreditsHistory": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "at": {
         "type": "integer"
        },
        "type": {
         "enum": [
          "credit",
          "hold",
          "charge",
          "refund",
          "adjustment",
          "expiry",
          "other"
         ]
        },
        "credits": {
         "type": "integer"
        },
        "balance_after": {
         "type": "integer"
        },
        "job_id": {
         "type": [
          "string",
          "null"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "at",
        "type",
        "credits",
        "balance_after",
        "job_id"
       ]
      }
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data"
    ]
   },
   "Account": {
    "type": "object",
    "properties": {
     "object": {
      "const": "account"
     },
     "plan": {
      "type": [
       "string",
       "null"
      ]
     },
     "limits": {
      "type": "object",
      "properties": {
       "requests_per_minute_per_key": {
        "type": [
         "integer",
         "null"
        ]
       },
       "requests_per_minute_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "paid_requests_per_minute_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "scripts_and_thumbnails_in_progress_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "videos_in_progress_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "videos_in_progress_per_key": {
        "type": [
         "integer",
         "null"
        ]
       },
       "videos_per_day_per_key": {
        "type": [
         "integer",
         "null"
        ]
       },
       "videos_per_day_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "active_keys_per_account": {
        "type": [
         "integer",
         "null"
        ]
       }
      },
      "additionalProperties": false
     },
     "custom_limits": {
      "type": "boolean",
      "description": "true = GoMotion set limits for this account (ask support@gomotionai.com). Since API 1.2."
     },
     "key": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "id": {
          "type": "string"
         },
         "scopes": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "max_credits_day": {
          "type": "integer"
         },
         "credits_spent_today": {
          "type": "integer"
         },
         "videos_today": {
          "type": "integer"
         },
         "videos_in_progress": {
          "type": "integer"
         }
        },
        "additionalProperties": false,
        "required": [
         "id",
         "scopes",
         "max_credits_day",
         "credits_spent_today",
         "videos_today",
         "videos_in_progress"
        ]
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "plan",
     "limits",
     "key"
    ]
   },
   "Quote": {
    "type": "object",
    "properties": {
     "duration_sec": {
      "type": "integer"
     },
     "lang": {
      "type": "string"
     },
     "voice": {
      "type": [
       "string",
       "null"
      ]
     },
     "quality": {
      "enum": [
       "standard",
       "high"
      ]
     },
     "cost_credits": {
      "type": "integer"
     }
    },
    "additionalProperties": false,
    "required": [
     "duration_sec",
     "lang",
     "voice",
     "quality",
     "cost_credits"
    ]
   },
   "Languages": {
    "type": "object",
    "properties": {
     "languages": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "code": {
         "type": "string"
        },
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "model": {
         "type": [
          "string",
          "null"
         ]
        },
        "chars_per_min": {
         "type": [
          "number",
          "null"
         ]
        },
        "quality": {
         "enum": [
          "standard",
          "high"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "code",
        "name",
        "model",
        "chars_per_min",
        "quality"
       ]
      }
     }
    },
    "additionalProperties": false,
    "required": [
     "languages"
    ]
   },
   "Voices": {
    "type": "object",
    "properties": {
     "lang": {
      "type": "string"
     },
     "voices": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "gender": {
         "type": [
          "string",
          "null"
         ]
        },
        "age": {
         "type": [
          "string",
          "null"
         ]
        },
        "style": {
         "type": [
          "string",
          "null"
         ]
        },
        "region": {
         "type": [
          "string",
          "null"
         ]
        },
        "model": {
         "type": [
          "string",
          "null"
         ]
        },
        "sample_url": {
         "type": [
          "string",
          "null"
         ]
        },
        "quality": {
         "enum": [
          "standard",
          "high"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "id",
        "name",
        "gender",
        "age",
        "style",
        "region",
        "model",
        "sample_url",
        "quality"
       ]
      }
     }
    },
    "additionalProperties": false,
    "required": [
     "lang",
     "voices"
    ]
   },
   "References": {
    "type": "object",
    "properties": {
     "object": {
      "const": "references"
     },
     "type": {
      "enum": [
       "channel",
       "video"
      ]
     },
     "sort": {
      "enum": [
       "recent",
       "popular"
      ]
     },
     "videos": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "title": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "thumbnail_url": {
         "type": [
          "string",
          "null"
         ]
        },
        "duration_sec": {
         "type": [
          "integer",
          "null"
         ]
        },
        "views": {
         "type": [
          "integer",
          "null"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "id",
        "title",
        "url",
        "thumbnail_url",
        "duration_sec",
        "views"
       ]
      }
     },
     "credits": {
      "type": "object",
      "properties": {
       "script": {
        "type": "integer"
       },
       "thumbnail": {
        "type": "integer"
       }
      },
      "additionalProperties": false,
      "required": [
       "script",
       "thumbnail"
      ]
     },
     "included_in_plan_left": {
      "type": "object",
      "properties": {
       "scripts": {
        "type": "integer"
       },
       "thumbnails": {
        "type": "integer"
       }
      },
      "additionalProperties": false,
      "required": [
       "scripts",
       "thumbnails"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "type",
     "sort",
     "videos",
     "credits",
     "included_in_plan_left"
    ]
   },
   "ScriptUpload": {
    "type": "object",
    "properties": {
     "key": {
      "type": "string"
     },
     "chars": {
      "type": "integer"
     },
     "expires_in_hours": {
      "type": "integer"
     }
    },
    "additionalProperties": false,
    "required": [
     "key",
     "chars",
     "expires_in_hours"
    ]
   },
   "Upload": {
    "type": "object",
    "properties": {
     "object": {
      "const": "upload"
     },
     "kind": {
      "enum": [
       "audio",
       "music"
      ]
     },
     "key": {
      "type": "string"
     },
     "put_url": {
      "type": "string"
     },
     "method": {
      "const": "PUT"
     },
     "expires_in_s": {
      "type": "integer"
     },
     "max_bytes": {
      "type": "integer"
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "kind",
     "key",
     "put_url",
     "method",
     "expires_in_s",
     "max_bytes"
    ]
   },
   "VideoCreate": {
    "type": "object",
    "properties": {
     "script": {
      "type": "string",
      "maxLength": 50000,
      "description": "The narration text (TTS voice). One of script, script_key, audio_key."
     },
     "script_key": {
      "type": "string",
      "description": "Key from POST /v1/uploads/script (for long scripts)."
     },
     "audio_key": {
      "type": "string",
      "description": "Key from POST /v1/uploads with kind=audio: your own voiceover (no TTS)."
     },
     "duration_sec": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5400,
      "description": "Length of your audio in seconds (required with audio_key). You are billed on the real length the server measures."
     },
     "lang": {
      "type": "string",
      "description": "Language code from GET /v1/languages, or auto. Default en (script) / auto (audio)."
     },
     "voice": {
      "type": "string",
      "description": "Voice id from GET /v1/voices (script videos only)."
     },
     "title": {
      "type": "string",
      "maxLength": 150
     },
     "subtitles": {
      "type": "boolean",
      "default": true
     },
     "animations": {
      "type": "boolean",
      "default": true
     },
     "background": {
      "type": "string",
      "description": "blue (default), cinematic, vintage, light or grid",
      "examples": [
       "blue",
       "cinematic",
       "vintage",
       "light",
       "grid"
      ]
     },
     "no_music": {
      "type": "boolean",
      "default": false
     },
     "music_volume": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "default": 0.03
     },
     "music_style": {
      "enum": [
       "epic",
       "documentary",
       "tension",
       "sad",
       "chill",
       "upbeat"
      ]
     },
     "music_track": {
      "type": "string",
      "description": "'<mood>/<file>.mp3' from the music catalog"
     },
     "music_key": {
      "type": "string",
      "description": "Key from POST /v1/uploads with kind=music: your own background track."
     },
     "max_cost_credits": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000,
      "description": "Refuse (422) if the video would cost more; never charged above it. Not with audio_key."
     },
     "options": {
      "type": "object",
      "description": "Same fields nested (accepted for web-body compatibility)."
     },
     "external_id": {
      "type": "string",
      "pattern": "^[\\x21-\\x7e]{1,128}$",
      "description": "Your own order or customer id: 1-128 printable ASCII characters, no spaces. Filter lists with ?external_id=."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": [
        "string",
        "number"
       ],
       "maxLength": 500
      },
      "description": "Your own data, echoed on the object and on webhooks: up to 20 keys [A-Za-z0-9_.-]{1,40}, string values up to 500 characters (numbers become strings), 8 KB in total."
     }
    },
    "additionalProperties": true
   },
   "ExportCreate": {
    "type": "object",
    "properties": {
     "quality": {
      "enum": [
       "high",
       "medium",
       "fast"
      ],
      "default": "medium"
     },
     "download_filename": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9 ._()-]{0,95}(\\.[mM][pP]4)?$",
      "description": "File name of the download (your brand, not GoMotion's); .mp4 is added. Default gomotion_video.mp4."
     },
     "external_id": {
      "type": "string",
      "pattern": "^[\\x21-\\x7e]{1,128}$",
      "description": "Default: the video's."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": [
        "string",
        "number"
       ],
       "maxLength": 500
      },
      "description": "Default: the video's metadata."
     }
    },
    "additionalProperties": true
   },
   "ScriptCreate": {
    "type": "object",
    "properties": {
     "channel_url": {
      "type": "string",
      "maxLength": 500,
      "description": "YouTube channel link; the first 3 videos are the references. Or pass video_ids."
     },
     "video_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 3,
      "items": {
       "type": "string"
      }
     },
     "reference_titles": {
      "type": "array",
      "maxItems": 3,
      "items": {
       "type": "string"
      }
     },
     "topic": {
      "type": "string",
      "minLength": 8,
      "maxLength": 400,
      "description": "What the script is about. Alone (no channel_url / video_ids) GoMotion searches YouTube for the topic and uses 3 videos as style references (same price)."
     },
     "minutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 90,
      "default": 8
     },
     "lang": {
      "type": "string",
      "description": "Force the script language (e.g. en, es)."
     },
     "sort": {
      "enum": [
       "recent",
       "popular"
      ],
      "default": "recent"
     },
     "external_id": {
      "type": "string",
      "pattern": "^[\\x21-\\x7e]{1,128}$",
      "description": "Your own order or customer id: 1-128 printable ASCII characters, no spaces. Filter lists with ?external_id=."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": [
        "string",
        "number"
       ],
       "maxLength": 500
      },
      "description": "Your own data, echoed on the object and on webhooks: up to 20 keys [A-Za-z0-9_.-]{1,40}, string values up to 500 characters (numbers become strings), 8 KB in total."
     }
    },
    "additionalProperties": true
   },
   "ThumbnailCreate": {
    "type": "object",
    "properties": {
     "title": {
      "type": "string",
      "maxLength": 300
     },
     "text": {
      "type": "string",
      "maxLength": 120
     },
     "subject": {
      "type": "string",
      "maxLength": 300
     },
     "script": {
      "type": "string",
      "maxLength": 50000
     },
     "with_text": {
      "type": "boolean",
      "default": true
     },
     "channel_url": {
      "type": "string",
      "maxLength": 500
     },
     "video_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 3,
      "items": {
       "type": "string"
      }
     },
     "sort": {
      "enum": [
       "recent",
       "popular"
      ],
      "default": "recent"
     },
     "external_id": {
      "type": "string",
      "pattern": "^[\\x21-\\x7e]{1,128}$",
      "description": "Your own order or customer id: 1-128 printable ASCII characters, no spaces. Filter lists with ?external_id=."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": [
        "string",
        "number"
       ],
       "maxLength": 500
      },
      "description": "Your own data, echoed on the object and on webhooks: up to 20 keys [A-Za-z0-9_.-]{1,40}, string values up to 500 characters (numbers become strings), 8 KB in total."
     }
    },
    "additionalProperties": true,
    "required": [
     "title"
    ]
   },
   "UploadCreate": {
    "type": "object",
    "properties": {
     "kind": {
      "enum": [
       "audio",
       "music"
      ]
     }
    },
    "additionalProperties": true,
    "required": [
     "kind"
    ]
   },
   "ScriptUploadCreate": {
    "type": "object",
    "properties": {
     "text": {
      "type": "string",
      "maxLength": 50000
     }
    },
    "additionalProperties": true,
    "required": [
     "text"
    ]
   },
   "Webhook": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^wh_[a-f0-9]{16}$"
     },
     "object": {
      "const": "webhook"
     },
     "url": {
      "type": "string"
     },
     "events": {
      "type": "array",
      "items": {
       "enum": [
        "video.succeeded",
        "video.failed",
        "video.cancelled",
        "export.succeeded",
        "export.failed",
        "export.cancelled",
        "script.succeeded",
        "script.failed",
        "thumbnail.succeeded",
        "thumbnail.failed"
       ]
      }
     },
     "description": {
      "type": "string"
     },
     "status": {
      "enum": [
       "enabled",
       "disabled"
      ]
     },
     "disabled_reason": {
      "type": [
       "string",
       "null"
      ]
     },
     "created_at": {
      "type": "integer"
     },
     "last_success_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "last_failure_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "failed_in_a_row": {
      "type": "integer",
      "description": "Events in a row that used all attempts (25 disables the endpoint)."
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "url",
     "events",
     "description",
     "status",
     "disabled_reason",
     "created_at",
     "last_success_at",
     "last_failure_at",
     "failed_in_a_row"
    ]
   },
   "WebhookWithSecret": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^wh_[a-f0-9]{16}$"
     },
     "object": {
      "const": "webhook"
     },
     "url": {
      "type": "string"
     },
     "events": {
      "type": "array",
      "items": {
       "enum": [
        "video.succeeded",
        "video.failed",
        "video.cancelled",
        "export.succeeded",
        "export.failed",
        "export.cancelled",
        "script.succeeded",
        "script.failed",
        "thumbnail.succeeded",
        "thumbnail.failed"
       ]
      }
     },
     "description": {
      "type": "string"
     },
     "status": {
      "enum": [
       "enabled",
       "disabled"
      ]
     },
     "disabled_reason": {
      "type": [
       "string",
       "null"
      ]
     },
     "created_at": {
      "type": "integer"
     },
     "last_success_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "last_failure_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "failed_in_a_row": {
      "type": "integer",
      "description": "Events in a row that used all attempts (25 disables the endpoint)."
     },
     "secret": {
      "type": "string",
      "pattern": "^whsec_",
      "description": "Signing secret. Shown only on create and rotate-secret: store it."
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "url",
     "events",
     "description",
     "status",
     "disabled_reason",
     "created_at",
     "last_success_at",
     "last_failure_at",
     "failed_in_a_row",
     "secret"
    ]
   },
   "WebhookList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Webhook"
      }
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data"
    ]
   },
   "WebhookDeleted": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^wh_[a-f0-9]{16}$"
     },
     "object": {
      "const": "webhook"
     },
     "deleted": {
      "const": true
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "deleted"
    ]
   },
   "WebhookTestResult": {
    "type": "object",
    "properties": {
     "object": {
      "const": "webhook_test"
     },
     "event_id": {
      "type": "string",
      "pattern": "^evt_[a-f0-9]{20}$"
     },
     "delivered": {
      "type": "boolean"
     },
     "status_code": {
      "type": [
       "integer",
       "null"
      ]
     },
     "error": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "event_id",
     "delivered",
     "status_code",
     "error"
    ]
   },
   "WebhookDelivery": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^evt_[a-f0-9]{20}$"
     },
     "object": {
      "const": "webhook_delivery"
     },
     "type": {
      "enum": [
       "video.succeeded",
       "video.failed",
       "video.cancelled",
       "export.succeeded",
       "export.failed",
       "export.cancelled",
       "script.succeeded",
       "script.failed",
       "thumbnail.succeeded",
       "thumbnail.failed",
       "webhook.test"
      ]
     },
     "object_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "status": {
      "enum": [
       "pending",
       "delivered",
       "failed"
      ]
     },
     "attempts": {
      "type": "integer"
     },
     "last_status_code": {
      "type": [
       "integer",
       "null"
      ]
     },
     "last_error": {
      "type": [
       "string",
       "null"
      ]
     },
     "next_attempt_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "created_at": {
      "type": "integer"
     },
     "delivered_at": {
      "type": [
       "integer",
       "null"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "type",
     "object_id",
     "status",
     "attempts",
     "last_status_code",
     "last_error",
     "next_attempt_at",
     "created_at",
     "delivered_at"
    ]
   },
   "WebhookDeliveryList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/WebhookDelivery"
      }
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data"
    ]
   },
   "WebhookDeliveryRetry": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^evt_[a-f0-9]{20}$"
     },
     "object": {
      "const": "webhook_delivery"
     },
     "status": {
      "const": "pending"
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "status"
    ]
   },
   "WebhookTestObject": {
    "type": "object",
    "properties": {
     "object": {
      "const": "webhook_test"
     },
     "webhook_id": {
      "type": "string",
      "pattern": "^wh_[a-f0-9]{16}$"
     },
     "message": {
      "type": "string"
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "webhook_id",
     "message"
    ]
   },
   "Event": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^evt_[a-f0-9]{20}$",
      "description": "Same id on every retry: dedupe on it."
     },
     "object": {
      "const": "event"
     },
     "type": {
      "enum": [
       "video.succeeded",
       "video.failed",
       "video.cancelled",
       "export.succeeded",
       "export.failed",
       "export.cancelled",
       "script.succeeded",
       "script.failed",
       "thumbnail.succeeded",
       "thumbnail.failed",
       "webhook.test"
      ]
     },
     "api_version": {
      "const": "2026-11-01"
     },
     "created_at": {
      "type": "integer"
     },
     "data": {
      "type": "object",
      "properties": {
       "object": {
        "anyOf": [
         {
          "$ref": "#/components/schemas/Video"
         },
         {
          "$ref": "#/components/schemas/Export"
         },
         {
          "$ref": "#/components/schemas/Task"
         },
         {
          "$ref": "#/components/schemas/WebhookTestObject"
         }
        ],
        "description": "The same object GET /v1/videos|exports|scripts|thumbnails/{id} returns."
       }
      },
      "additionalProperties": false,
      "required": [
       "object"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "type",
     "api_version",
     "created_at",
     "data"
    ],
    "description": "Body of every webhook POST. Headers: GoMotion-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>, GoMotion-Event-Id, GoMotion-Event-Type."
   },
   "WebhookCreate": {
    "type": "object",
    "properties": {
     "url": {
      "type": "string",
      "maxLength": 2000,
      "description": "https, port 443, a public host name (no IP, no localhost/.local/.internal); every address it resolves to must be public. 10 s timeout, no redirects."
     },
     "events": {
      "type": "array",
      "minItems": 1,
      "items": {
       "enum": [
        "video.succeeded",
        "video.failed",
        "video.cancelled",
        "export.succeeded",
        "export.failed",
        "export.cancelled",
        "script.succeeded",
        "script.failed",
        "thumbnail.succeeded",
        "thumbnail.failed",
        "*"
       ]
      },
      "description": "Default (or [\"*\"]): all events."
     },
     "description": {
      "type": "string",
      "maxLength": 200
     }
    },
    "additionalProperties": true,
    "required": [
     "url"
    ]
   },
   "WebhookUpdate": {
    "type": "object",
    "properties": {
     "url": {
      "type": "string",
      "maxLength": 2000,
      "description": "https, port 443, a public host name (no IP, no localhost/.local/.internal); every address it resolves to must be public. 10 s timeout, no redirects."
     },
     "events": {
      "type": "array",
      "minItems": 1,
      "items": {
       "enum": [
        "video.succeeded",
        "video.failed",
        "video.cancelled",
        "export.succeeded",
        "export.failed",
        "export.cancelled",
        "script.succeeded",
        "script.failed",
        "thumbnail.succeeded",
        "thumbnail.failed",
        "*"
       ]
      },
      "description": "Default (or [\"*\"]): all events."
     },
     "description": {
      "type": "string",
      "maxLength": 200
     },
     "enabled": {
      "type": "boolean",
      "description": "true re-enables an endpoint disabled after failures."
     }
    },
    "additionalProperties": true
   }
  }
 },
 "paths": {
  "/v1/account": {
   "get": {
    "summary": "Your plan, API limits and this key's usage today",
    "tags": [
     "Account"
    ],
    "x-gomotion-scope": null,
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Account"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/credits": {
   "get": {
    "summary": "Credit balance",
    "tags": [
     "Account"
    ],
    "x-gomotion-scope": "credits:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Credits"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/credits/history": {
   "get": {
    "summary": "Credit movements (newest first)",
    "tags": [
     "Account"
    ],
    "x-gomotion-scope": "credits:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CreditsHistory"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 200
      }
     }
    ]
   }
  },
  "/v1/quote": {
   "get": {
    "summary": "Price of a video in credits",
    "tags": [
     "Account"
    ],
    "x-gomotion-scope": null,
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Quote"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "chars",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1
      },
      "description": "Script length in characters (or pass duration_sec)."
     },
     {
      "name": "duration_sec",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 0
      },
      "description": "Length in seconds (for your own audio)."
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "voice",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/languages": {
   "get": {
    "summary": "Voice languages",
    "tags": [
     "Voices"
    ],
    "x-gomotion-scope": null,
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Languages"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/voices": {
   "get": {
    "summary": "Voices of a language",
    "tags": [
     "Voices"
    ],
    "x-gomotion-scope": null,
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Voices"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Language code (default en)."
     },
     {
      "name": "quality",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "standard",
        "high"
       ]
      }
     }
    ]
   }
  },
  "/v1/uploads/script": {
   "post": {
    "summary": "Upload a long script",
    "tags": [
     "Uploads"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ScriptUpload"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ScriptUploadCreate"
       }
      }
     }
    }
   }
  },
  "/v1/uploads": {
   "post": {
    "summary": "Get a signed URL to upload your own voiceover or music",
    "tags": [
     "Uploads"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Upload"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "Then PUT the file bytes to put_url (any common audio format) within 1 hour, and pass key as audio_key or music_key to POST /v1/videos.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/UploadCreate"
       }
      }
     }
    }
   }
  },
  "/v1/videos": {
   "post": {
    "summary": "Create a video",
    "tags": [
     "Videos"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "video price (GET /v1/quote)",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Video"
        }
       }
      }
     },
     "200": {
      "description": "Replay of the same Idempotency-Key",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Video"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "413": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "Charges the video price when accepted (refunded if it fails). Poll GET /v1/videos/{id}.",
    "parameters": [
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_-]{8,64}$"
      },
      "description": "Any unique string per new request. Retrying with the same key and body returns the same object (never charges twice)."
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/VideoCreate"
       }
      }
     }
    }
   },
   "get": {
    "summary": "List videos (newest first)",
    "tags": [
     "Videos"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VideoList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "cancelled",
        "interrupted"
       ]
      }
     },
     {
      "name": "starting_after",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^j_[a-f0-9]{16}$"
      },
      "description": "Cursor: the last id of the previous page (next_starting_after)."
     },
     {
      "name": "external_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Only objects created with this external_id."
     },
     {
      "name": "metadata",
      "in": "query",
      "required": false,
      "style": "deepObject",
      "explode": true,
      "schema": {
       "type": "object",
       "maxProperties": 5,
       "additionalProperties": {
        "type": "string",
        "maxLength": 500
       }
      },
      "description": "metadata[key]=value: only objects whose metadata has that value (up to 5 keys; metadata.key=value also works)."
     }
    ]
   }
  },
  "/v1/videos/{id}": {
   "get": {
    "summary": "Get a video",
    "tags": [
     "Videos"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Video"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/videos/{id}/export": {
   "post": {
    "summary": "Export the video to MP4 (1080p)",
    "tags": [
     "Exports"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "first export free, then 4",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Export"
        }
       }
      }
     },
     "200": {
      "description": "Replay",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Export"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "410": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_-]{8,64}$"
      },
      "description": "Any unique string per new request. Retrying with the same key and body returns the same object (never charges twice)."
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ExportCreate"
       }
      }
     }
    }
   }
  },
  "/v1/exports": {
   "get": {
    "summary": "List exports (newest first)",
    "tags": [
     "Exports"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ExportList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 50
      }
     },
     {
      "name": "starting_after",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^j_[a-f0-9]{16}$"
      },
      "description": "Cursor: the last id of the previous page (next_starting_after)."
     },
     {
      "name": "external_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Only objects created with this external_id."
     },
     {
      "name": "metadata",
      "in": "query",
      "required": false,
      "style": "deepObject",
      "explode": true,
      "schema": {
       "type": "object",
       "maxProperties": 5,
       "additionalProperties": {
        "type": "string",
        "maxLength": 500
       }
      },
      "description": "metadata[key]=value: only objects whose metadata has that value (up to 5 keys; metadata.key=value also works)."
     }
    ]
   }
  },
  "/v1/exports/{id}": {
   "get": {
    "summary": "Get an export (download_url when succeeded)",
    "tags": [
     "Exports"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Export"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/jobs/{id}/cancel": {
   "post": {
    "summary": "Cancel a video or export (credits come back)",
    "tags": [
     "Videos"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "The cancelled video or export",
      "content": {
       "application/json": {
        "schema": {
         "oneOf": [
          {
           "$ref": "#/components/schemas/Video"
          },
          {
           "$ref": "#/components/schemas/Export"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/references": {
   "get": {
    "summary": "Videos of a YouTube channel (references for scripts and thumbnails)",
    "tags": [
     "Scripts & thumbnails"
    ],
    "x-gomotion-scope": [
     "scripts:write",
     "thumbnails:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/References"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "channel_url",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "recent",
        "popular"
       ]
      }
     }
    ]
   }
  },
  "/v1/scripts": {
   "post": {
    "summary": "Write a script with AI (async)",
    "tags": [
     "Scripts & thumbnails"
    ],
    "x-gomotion-scope": "scripts:write",
    "x-gomotion-credits": "4 (or included in plan)",
    "responses": {
     "202": {
      "description": "Accepted",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "200": {
      "description": "Replay",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "Give channel_url, video_ids or only topic (then GoMotion finds 3 references on YouTube: 422 topic_no_references / 502 topic_search_failed, nothing charged).",
    "parameters": [
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_-]{8,64}$"
      },
      "description": "Any unique string per new request. Retrying with the same key and body returns the same object (never charges twice)."
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ScriptCreate"
       }
      }
     }
    }
   }
  },
  "/v1/scripts/{id}": {
   "get": {
    "summary": "Get a script task",
    "tags": [
     "Scripts & thumbnails"
    ],
    "x-gomotion-scope": "scripts:write",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/thumbnails": {
   "post": {
    "summary": "Make a thumbnail with AI (async)",
    "tags": [
     "Scripts & thumbnails"
    ],
    "x-gomotion-scope": "thumbnails:write",
    "x-gomotion-credits": "4 (or included in plan)",
    "responses": {
     "202": {
      "description": "Accepted",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "200": {
      "description": "Replay",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_-]{8,64}$"
      },
      "description": "Any unique string per new request. Retrying with the same key and body returns the same object (never charges twice)."
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ThumbnailCreate"
       }
      }
     }
    }
   }
  },
  "/v1/thumbnails/{id}": {
   "get": {
    "summary": "Get a thumbnail task",
    "tags": [
     "Scripts & thumbnails"
    ],
    "x-gomotion-scope": "thumbnails:write",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/webhooks": {
   "post": {
    "summary": "Add a webhook endpoint (max 3 per key)",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookWithSecret"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "Events for videos, exports, scripts and thumbnails created by THIS key, sent when they end. The secret is shown only here and on rotate-secret.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookCreate"
       }
      }
     }
    }
   },
   "get": {
    "summary": "List this key's webhooks",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/webhooks/{id}": {
   "get": {
    "summary": "Get a webhook",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Webhook"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     }
    ]
   },
   "post": {
    "summary": "Update a webhook (url, events, description, enabled)",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Webhook"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookUpdate"
       }
      }
     }
    }
   },
   "delete": {
    "summary": "Delete a webhook",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookDeleted"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     }
    ]
   }
  },
  "/v1/webhooks/{id}/test": {
   "post": {
    "summary": "Send one signed webhook.test event now",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Sent (delivered tells if your server answered 2xx)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookTestResult"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     }
    ]
   }
  },
  "/v1/webhooks/{id}/rotate-secret": {
   "post": {
    "summary": "New signing secret (the old one stops at once)",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookWithSecret"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     }
    ]
   }
  },
  "/v1/webhooks/{id}/deliveries": {
   "get": {
    "summary": "Recent deliveries (newest first, kept 7 days)",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookDeliveryList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100
      }
     }
    ]
   }
  },
  "/v1/webhooks/{id}/deliveries/{evt}/retry": {
   "post": {
    "summary": "Send an event again (same event id)",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Queued",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookDeliveryRetry"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     },
     {
      "name": "evt",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     }
    ]
   }
  }
 },
 "webhooks": {
  "video.succeeded": {
   "post": {
    "summary": "video.succeeded",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "video.failed": {
   "post": {
    "summary": "video.failed",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "video.cancelled": {
   "post": {
    "summary": "video.cancelled",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "export.succeeded": {
   "post": {
    "summary": "export.succeeded",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "export.failed": {
   "post": {
    "summary": "export.failed",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "export.cancelled": {
   "post": {
    "summary": "export.cancelled",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "script.succeeded": {
   "post": {
    "summary": "script.succeeded",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "script.failed": {
   "post": {
    "summary": "script.failed",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "thumbnail.succeeded": {
   "post": {
    "summary": "thumbnail.succeeded",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "thumbnail.failed": {
   "post": {
    "summary": "thumbnail.failed",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "webhook.test": {
   "post": {
    "summary": "webhook.test",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  }
 }
}
