# Collections (*collections*) ## Overview API Operations against the Collections ### Available Operations * [create_collection](#create_collection) - Create collection ## create_collection Create a collection in the library ### Example Usage ```python from plex_api_client import PlexAPI from plex_api_client.models import components with PlexAPI( accepts=components.Accepts.APPLICATION_XML, client_identifier="abc123", product="Plex for Roku", version="2.4.1", platform="Roku", platform_version="4.3 build 1057", device="Roku 3", model="4200X", device_vendor="Roku", device_name="Living Room TV", marketplace="googlePlay", token="", ) as plex_api: res = plex_api.collections.create_collection(request={ "section_id": "", "type": components.MediaType.TV_SHOW, }) assert res.media_container_with_metadata is not None # Handle response print(res.media_container_with_metadata) ``` ### Parameters | Parameter | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `request` | [operations.CreateCollectionRequest](../../models/operations/createcollectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response **[operations.CreateCollectionResponse](../../models/operations/createcollectionresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* |