---
title: "Create or Update Flow Collection"
method: PUT
path: "/flows/{flowId}/flow_collection"
tags: ["Flows"]
---

# Create or Update Flow Collection

`PUT /flows/{flowId}/flow_collection`

Create or update the Flow collection property. A list of Flows that are collected together by this Flow.

Service implementations SHOULD verify that Flow metadata is compatible with the associated Source.
Service implementations MAY accept modification/addition of parameters, and reflect such changes in the Source, where it will not bring any Flows of the Source into conflict.
Where metadata would result in any Flow of the Source coming into conflict, the request SHOULD be rejected with a 400 response.

## Request body

- object[] — Describes how Flows are collected into another Flow
  - `id` string, required — A Universally Unique Identifier (UUID) as defined in [RFC9562](https://www.rfc-editor.org/rfc/rfc9562)
  - `role` string, required — A human-readable role of the element in this collection (e.g. 'R' to denote a right audio channel in a collection of mono audio Sources)
  - `container_mapping` Containermapping — Defines the location of Flow essence data in a container track
    - `track_index` integer — A zero-based and sequential track index in the container. This assumes a reliable ordering of tracks
    - `format_track_index` integer — A zero-based and sequential track index in the container for a particular Flow format. A container with a video and 2 audio tracks would have a format_track_index 0 for the video Flow and format_track_index 0 and 1 for the audio Flows. This assumes a reliable ordering of tracks for each Flow format
    - `audio_track` object — Mapping for channels in audio tracks to the Flow channels
      - `channel_numbers` integer[] — Array of (zero-based) container channel numbers in Flow order
      - `channel_range` string — Inclusive range of (zero-based) container channel numbers
    - `mp2ts_container` object — Mapping to MPEG-2 Transport Stream containers, ISO/IEC 13818-1 or ITU-T Recommendation H.222.0
      - `pid` integer — The packet ID for the elementary stream packets
    - `mxf_container` object — Mapping to Material Exchange Format containers, SMPTE ST 377-1
      - `package_uid` string — The package UID. Either a SMPTE UMID URN or UUID URN
      - `track_id` integer — The track ID in the package
    - `isobmff_container` object — Mapping to ISO Base Media File Format (e.g. MP4 and MOV) containers, ISO/IEC 14496-12
      - `track_id` integer — The track ID

## Response `204`

No content. The Flow collection has been created or updated.

## Other responses

- `400` — Bad request. Invalid Flow collection.
- `403` — Forbidden. You do not have permission to modify this Flow. It may be marked read-only.
- `404` — The requested Flow does not exist.

---

[API](https://skmtc.net/aws-samples/apis/time-addressable-media-store.md) · [All operations](https://skmtc.net/aws-samples/apis/time-addressable-media-store/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws-samples/time-addressable-media-store/versions/c442607d1b16/schema)
