{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/twilio/main/json-schema/twilio-update-composition-hook-request-schema.json",
  "title": "UpdateCompositionHookRequest",
  "x-generated": "2026-10-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/twilio-composition-hooks-api-openapi.yml#/components/schemas/UpdateCompositionHookRequest",
  "type": "object",
  "required": [
    "FriendlyName"
  ],
  "properties": {
    "FriendlyName": {
      "type": "string",
      "description": "A descriptive string that you create to describe the resource. It can be up to  100 characters long and it must be unique within the account."
    },
    "Enabled": {
      "type": "boolean",
      "description": "Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers."
    },
    "VideoLayout": {
      "description": "A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info."
    },
    "AudioSources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`."
    },
    "AudioSourcesExcluded": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty."
    },
    "Trim": {
      "type": "boolean",
      "description": "Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info."
    },
    "Format": {
      "type": "string",
      "$ref": "#/$defs/composition_hook_enum_format",
      "description": "The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs."
    },
    "Resolution": {
      "type": "string",
      "description": "A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. \nThe string's format is `{width}x{height}` where: \n\n* 16 <= `{width}` <= 1280\n* 16 <= `{height}` <= 1280\n* `{width}` * `{height}` <= 921,600\n\nTypical values are: \n\n* HD = `1280x720`\n* PAL = `1024x576`\n* VGA = `640x480`\n* CIF = `320x240`\n\nNote that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info."
    },
    "StatusCallback": {
      "type": "string",
      "format": "uri",
      "description": "The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched."
    },
    "StatusCallbackMethod": {
      "type": "string",
      "format": "http-method",
      "enum": [
        "HEAD",
        "GET",
        "POST",
        "PATCH",
        "PUT",
        "DELETE"
      ],
      "description": "The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`."
    }
  },
  "$defs": {
    "composition_hook_enum_format": {
      "type": "string",
      "enum": [
        "mp4",
        "webm"
      ]
    }
  }
}