# Update collection

> Update collection metadata

```json
{
  "/collections/{id}": {
    "patch": {
      "tags": [
        "Collections"
      ],
      "summary": "Update collection",
      "operationId": "patchCollection",
      "description": "Update collection metadata",
      "security": [
        {
          "bearerAuth": []
        }
      ],
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "description": "Id ID",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
            "format": "uuid"
          }
        }
      ],
      "requestBody": {
        "required": true,
        "description": "Update collection data",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "thumbnailUrl": {
                  "anyOf": [
                    {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "isPublic": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "additionalProperties": true
            }
          }
        }
      },
      "responses": {
        "200": {
          "description": "Updated collection",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "thumbnailUrl": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "organizationId": {
                    "type": "string",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$",
                    "format": "uuid"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "folder",
                      "playlist"
                    ]
                  },
                  "isPublic": {
                    "type": "boolean"
                  },
                  "videoCount": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "enum": [
                          "Infinity",
                          "-Infinity",
                          "NaN"
                        ]
                      }
                    ]
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "description",
                  "thumbnailUrl",
                  "organizationId",
                  "type",
                  "isPublic",
                  "videoCount",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": true
              }
            }
          }
        },
        "400": {
          "description": "- Invalid request body"
        },
        "401": {
          "description": "- Unauthorized"
        },
        "404": {
          "description": "- Collection not found"
        }
      }
    }
  }
}
```
