> For the complete documentation index, see [llms.txt](https://docs.fylr.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fylr.io/for-developers/api/endpoints/collection.md).

# /api/v1/collection

Collections can store links to objects. It is possible to link other objects from **fylr** as well as foreign objects, unknown to **fylr**. Object links must be unique. Linked objects can be manually sorted.

### `POST /collection` — Create or update a collection.

{% openapi src="/files/kfiDjhyZfEICNBmt5f49" path="/collection" method="post" %}
[fylr-openapi.yml](https://4100607288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAdRFzQASDY2Elfdm3wXW%2Fuploads%2Fgit-blob-27a76749464f8079ac8ce2ee65518544084ed6fa%2Ffylr-openapi.yml?alt=media)
{% endopenapi %}

### `PUT /collection` — Create or update a collection.

{% openapi src="/files/kfiDjhyZfEICNBmt5f49" path="/collection" method="put" %}
[fylr-openapi.yml](https://4100607288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAdRFzQASDY2Elfdm3wXW%2Fuploads%2Fgit-blob-27a76749464f8079ac8ce2ee65518544084ed6fa%2Ffylr-openapi.yml?alt=media)
{% endopenapi %}

### `GET /collection/{collection_id}` — Retrieve a collection.

{% openapi src="/files/kfiDjhyZfEICNBmt5f49" path="/collection/{collection\_id}" method="get" %}
[fylr-openapi.yml](https://4100607288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAdRFzQASDY2Elfdm3wXW%2Fuploads%2Fgit-blob-27a76749464f8079ac8ce2ee65518544084ed6fa%2Ffylr-openapi.yml?alt=media)
{% endopenapi %}

### `POST /collection/{collection_id}` — Update collection.

{% openapi src="/files/kfiDjhyZfEICNBmt5f49" path="/collection/{collection\_id}" method="post" %}
[fylr-openapi.yml](https://4100607288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAdRFzQASDY2Elfdm3wXW%2Fuploads%2Fgit-blob-27a76749464f8079ac8ce2ee65518544084ed6fa%2Ffylr-openapi.yml?alt=media)
{% endopenapi %}

### `DELETE /collection/{collection_id}` — Delete collection. All child collections will be deleted too.

{% openapi src="/files/kfiDjhyZfEICNBmt5f49" path="/collection/{collection\_id}" method="delete" %}
[fylr-openapi.yml](https://4100607288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAdRFzQASDY2Elfdm3wXW%2Fuploads%2Fgit-blob-27a76749464f8079ac8ce2ee65518544084ed6fa%2Ffylr-openapi.yml?alt=media)
{% endopenapi %}
