{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/sinch/main/json-schema/sinch-transcode-request-schema.json",
  "title": "TranscodeRequest",
  "x-generated": "2026-10-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sinch-transcoding-api-openapi.yml#/components/schemas/TranscodeRequest",
  "type": "object",
  "required": [
    "app_id",
    "app_message",
    "channels"
  ],
  "properties": {
    "app_id": {
      "type": "string",
      "description": "The app ID"
    },
    "app_message": {
      "$ref": "#/$defs/AppMessage"
    },
    "channels": {
      "type": "array",
      "description": "Target channels for transcoding",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "AppMessage": {
      "type": "object",
      "properties": {
        "text_message": {
          "type": "object",
          "description": "A text message",
          "properties": {
            "text": {
              "type": "string",
              "description": "The message text"
            }
          }
        },
        "media_message": {
          "type": "object",
          "description": "A media message",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri",
              "description": "The media URL"
            },
            "thumbnail_url": {
              "type": "string",
              "format": "uri",
              "description": "The thumbnail URL"
            }
          }
        },
        "template_message": {
          "type": "object",
          "description": "A template message",
          "properties": {
            "omni_template": {
              "type": "object",
              "description": "The template reference",
              "properties": {
                "template_id": {
                  "type": "string",
                  "description": "The template identifier"
                },
                "version": {
                  "type": "string",
                  "description": "The template version"
                },
                "language_code": {
                  "type": "string",
                  "description": "The language code"
                },
                "parameters": {
                  "type": "object",
                  "description": "Template parameter values"
                }
              }
            }
          }
        },
        "card_message": {
          "type": "object",
          "description": "A card message with title, description, and media",
          "properties": {
            "title": {
              "type": "string",
              "description": "The card title"
            },
            "description": {
              "type": "string",
              "description": "The card description"
            },
            "media_message": {
              "type": "object",
              "description": "The card media",
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri",
                  "description": "The media URL"
                }
              }
            },
            "choices": {
              "type": "array",
              "description": "Action choices on the card",
              "items": {
                "$ref": "#/$defs/Choice"
              }
            }
          }
        },
        "list_message": {
          "type": "object",
          "description": "A list message with sections",
          "properties": {
            "title": {
              "type": "string",
              "description": "The list title"
            },
            "description": {
              "type": "string",
              "description": "The list description"
            },
            "sections": {
              "type": "array",
              "description": "List sections",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Section title"
                  },
                  "items": {
                    "type": "array",
                    "description": "Section items",
                    "items": {
                      "$ref": "#/$defs/Choice"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "Choice": {
      "type": "object",
      "properties": {
        "text_message": {
          "type": "object",
          "description": "Text choice",
          "properties": {
            "text": {
              "type": "string",
              "description": "The choice text"
            }
          }
        },
        "postback_data": {
          "type": "string",
          "description": "Data sent back when the choice is selected"
        }
      }
    }
  }
}