---
title: "Create a collection"
method: PUT
path: "/collections"
tags: ["Collections"]
---

# Create a collection

`PUT /collections`

Creates an empty collection. Leave object_type out for a mixed collection, or set it to pin the collection to a single type so anything else is refused when it is added.

## Query parameters

- `name` string
- `type` 'public' | 'private'
- `object_type` string

## Request body

- CollectionCreateRequest
  - `name` string, required
  - `type` 'public' | 'private'
  - `object_type` string

## Response `200`

The collection that was created

- CollectionsResponse
  - `collection` CollectionObject[], required
    - `id` string, required
    - `name` string, required
    - `owner` string, nullable, required
    - `type` string, nullable, required
    - `object_type` string, nullable, required
    - `items` integer, required
    - `has_art` boolean, required
    - `playlist_folder_id` string
    - `playlist_folder_sort_order` integer

## Other responses

- `400` — HTTP 400 Bad Request (errors 4705, 4710).
- `401` — HTTP 401 Unauthorized (error 4701).
- `403` — HTTP 403 Forbidden (errors 4700, 4703, 4742).
- `500` — HTTP 500 Internal Server Error (error 4702).

---

[API](https://skmtc.net/ampache/apis/ampache-rest-api.md) · [All operations](https://skmtc.net/ampache/apis/ampache-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ampache/ampache-rest-api/revisions/535feee32afb/schema)
