---
title: Update item
slug: document-api/update-item
docTags: 
createdAt: 2025-10-20T09:39:14.634Z
---

{
  "id": "cCRWw2atlDIfp4bp8dxu3",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://api.catenda.com/v2/projects/{project-id}/libraries/{library-id}/items/{library-item-id}",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/projects/{project-id}/libraries/{library-id}/items/{library-item-id}"
      }
    ],
    "name": "Update item",
    "description": "<p>Update a library item.</p>\n<p>Supported library types are <strong>document</strong>, and <strong>link</strong>.</p>\n<p>In the case of document libraries updating <strong>labels</strong>, <strong>name</strong> or <strong>parentId</strong> at the same time is not supported.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "project-id",
          "type": "string",
          "example": "af2d8af0fa54465b89bf26dd3d92cfd0",
          "description": "Catenda project id"
        },
        {
          "kind": "required",
          "name": "library-id",
          "type": "string",
          "description": "Id of the library"
        },
        {
          "kind": "required",
          "name": "library-item-id",
          "type": "string",
          "description": "Id of the library item"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "name",
              "kind": "optional",
              "type": "string",
              "description": "The name of the library item.",
              "example": "Name"
            },
            {
              "name": "parentId",
              "kind": "optional",
              "type": "string",
              "description": "A unique identifier for the parent of the library item represented as compacted UUID using 32 hexadecimal characters.\n\nIf no parent is present the item will keep its parent and not be modified.\n",
              "example": "924809076a694255b589d236517a55da"
            },
            {
              "name": "labelsToAdd",
              "kind": "optional",
              "type": "array",
              "description": "List of labels to add to the library item.",
              "example": "",
              "itemType": "object",
              "customType": "object[]",
              "schema": [
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "string",
                  "description": "Id of an existing label"
                },
                {
                  "name": "name",
                  "kind": "optional",
                  "type": "string",
                  "description": "Name of an existing label otherwise a new label is created with this name"
                }
              ]
            },
            {
              "name": "labelsToRemove",
              "kind": "optional",
              "type": "array",
              "description": "List of labels to add to the library item.",
              "example": "",
              "itemType": "object",
              "customType": "object[]",
              "schema": [
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "string",
                  "description": "Id of an existing label"
                },
                {
                  "name": "name",
                  "kind": "optional",
                  "type": "string",
                  "description": "Name of an existing label otherwise a new label is created with this name"
                }
              ]
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [],
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A unique identifier for a library item, represented as compacted UUID using 32 hexadecimal characters.</p>",
                    "example": "tttbe1ce36ce4b4c37f7060c76d241e7"
                  },
                  {
                    "name": "libraryId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the library that the item belongs to",
                    "example": "9f71c88b7d7942ffa316c7a450c89358"
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "The name of the library item",
                    "example": "Library item 1"
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string<document | folder>",
                    "description": "<p>Type of the document library item, valid values are:</p>\n<ul>\n<li>document</li>\n<li>folder</li>\n</ul>",
                    "example": "document",
                    "enum": [
                      "document",
                      "folder"
                    ]
                  },
                  {
                    "name": "parentId",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>A unique identifier for the parent of the library item.</p>\n<p>Represented as compacted UUID using 32 hexadecimal characters.</p>\n<p>If no parent is present, the value is null.</p>",
                    "example": "502b06247f744b7492fd1a44e386f21e"
                  },
                  {
                    "name": "document",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "complexType": "oneOf",
                    "complexItems": [
                      {
                        "name": "file",
                        "description": "",
                        "modelRef": "#/components/schemas/file",
                        "schema": [
                          {
                            "name": "type",
                            "kind": "optional",
                            "type": "string",
                            "description": "Value is file",
                            "example": "file"
                          },
                          {
                            "name": "createdAt",
                            "kind": "optional",
                            "type": "string",
                            "description": "The date and time the file was created in ISO 8601 format",
                            "example": "2023-12-09T10:07:56.000Z"
                          },
                          {
                            "name": "owner",
                            "kind": "optional",
                            "type": "string",
                            "description": "User id of the file owner",
                            "example": "gh7fe246cea6442834052404eth08drj"
                          },
                          {
                            "name": "revision",
                            "kind": "optional",
                            "type": "object",
                            "description": "",
                            "modelRef": "#/components/schemas/library-item-document-file-revision",
                            "customType": "library-item-document-file-revision",
                            "schema": [
                              {
                                "name": "id",
                                "kind": "optional",
                                "type": "string",
                                "description": "Id of the revision",
                                "example": "h4c21c0e89774c8e92f42959c73561yh"
                              },
                              {
                                "name": "parentId",
                                "kind": "optional",
                                "type": "string",
                                "nullable": true,
                                "description": "<p>A unique identifier for the parent of the library item.</p>\n<p>Represented as compacted UUID using 32 hexadecimal characters.</p>\n<p>If no parent is present, the value is null.</p>"
                              },
                              {
                                "name": "version",
                                "kind": "optional",
                                "type": "number",
                                "description": "Version of the revision",
                                "example": 9
                              },
                              {
                                "name": "extendedVersion",
                                "kind": "optional",
                                "type": "object",
                                "description": "Extended version of the revision",
                                "example": "",
                                "schema": [
                                  {
                                    "name": "major",
                                    "kind": "optional",
                                    "type": "number",
                                    "description": "Major version of the revision",
                                    "example": 1
                                  },
                                  {
                                    "name": "minor",
                                    "kind": "optional",
                                    "type": "string",
                                    "nullable": true,
                                    "description": "Minor version of the revision",
                                    "example": 1
                                  }
                                ]
                              },
                              {
                                "name": "name",
                                "kind": "optional",
                                "type": "string",
                                "description": "File name of the revision",
                                "example": "File.txt"
                              },
                              {
                                "name": "createdAt",
                                "kind": "optional",
                                "type": "string",
                                "description": "The date and time the revision was created in ISO 8601 format",
                                "example": "2023-03-01T11:52:45.000Z"
                              },
                              {
                                "name": "size",
                                "kind": "optional",
                                "type": "number",
                                "description": "Size of the file in bytes",
                                "example": 3745
                              },
                              {
                                "name": "createdBy",
                                "kind": "optional",
                                "type": "object",
                                "description": "<p>Represents a User, Organization or Team.</p>\n<p>A User is someone with a Catenda account, commonly representing a person.</p>\n<p>An Organization represents a company, project organization or an application. Organizations do not have a username and cannot sign in to Catenda.</p>\n<p>A Team represents a group of users within a project. Teams do not have a username and cannot sign in to Catenda.</p>",
                                "modelRef": "#/components/schemas/user",
                                "customType": "user",
                                "schema": [
                                  {
                                    "name": "id",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "Represented as compacted UUID using 32 hexadecimal characters",
                                    "example": "524809076a694255b989d236517a55da"
                                  },
                                  {
                                    "name": "name",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "<p>The name of the user, limited to 128 characters</p>",
                                    "example": "John Doe"
                                  },
                                  {
                                    "name": "username",
                                    "kind": "optional",
                                    "type": "string",
                                    "nullable": true,
                                    "description": "<p>The handle the user identifies with.</p>\n<p>Commonly the username will be in email address format. Usernames are unique but subject to change, we recommend using the id field to reference users instead.</p>\n<p>If the user represents an organization or a team the value is always null.</p>\n<p>Limited to 50 characters.</p>",
                                    "example": "john@doe.com"
                                  },
                                  {
                                    "name": "email",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "Email address of the User",
                                    "example": "john@doe.com"
                                  },
                                  {
                                    "name": "createdAt",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "The date and time the user was created in ISO 8601 format",
                                    "example": "2016-09-20T14:55:22.000Z"
                                  },
                                  {
                                    "name": "avatarUrl",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "The URL for the user avatar",
                                    "example": "https://api.catenda.com/v2/avatar/397t0ccd8f74516096c738de15dc6512"
                                  },
                                  {
                                    "name": "type",
                                    "kind": "optional",
                                    "type": "string<user | organization | team>",
                                    "description": "<p>The type of user, valid values are:</p>\n<ul>\n<li>user</li>\n<li>organization</li>\n<li>team</li>\n</ul>",
                                    "example": "user",
                                    "enum": [
                                      "user",
                                      "organization",
                                      "team"
                                    ]
                                  }
                                ]
                              },
                              {
                                "name": "additionalFormats",
                                "kind": "optional",
                                "type": "array",
                                "description": "Additional formats available for the file revision",
                                "example": "",
                                "itemType": "object",
                                "customType": "object[]",
                                "schema": [
                                  {
                                    "name": "size",
                                    "kind": "optional",
                                    "type": "number",
                                    "description": "Size of the file in bytes",
                                    "example": 7147
                                  },
                                  {
                                    "name": "mediaType",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "Media type of the additional format file",
                                    "example": "application/xod"
                                  }
                                ]
                              },
                              {
                                "name": "downloadFileName",
                                "kind": "optional",
                                "type": "string",
                                "description": "Filename on disk",
                                "example": "File-1.txt"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "folder",
                        "description": "",
                        "modelRef": "#/components/schemas/folder",
                        "schema": [
                          {
                            "name": "type",
                            "kind": "optional",
                            "type": "string",
                            "description": "Value is folder",
                            "example": "folder"
                          },
                          {
                            "name": "createdAt",
                            "kind": "optional",
                            "type": "string",
                            "description": "The date and time the folder was created in ISO 8601 format",
                            "example": "2023-12-09T10:07:56.000Z"
                          },
                          {
                            "name": "owner",
                            "kind": "optional",
                            "type": "string",
                            "description": "User id of the folder owner",
                            "example": "gh7fe246cea6442834052404eth08drj"
                          }
                        ]
                      }
                    ],
                    "schema": []
                  },
                  {
                    "name": "deleted",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Deletion status of the library item",
                    "example": false
                  }
                ],
                "modelRef": "#/components/schemas/library-item-document",
                "customType": "library-item-document"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A unique identifier for a library item, represented as compacted UUID using 32 hexadecimal characters.</p>",
                    "example": "tttbe1ce36ce4b4c37f7060c76d241e7"
                  },
                  {
                    "name": "libraryId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the library that the item belongs to",
                    "example": "9f71c88b7d7942ffa316c7a450c89358"
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "The name of the library item",
                    "example": "Library item 1"
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string<link>",
                    "description": "<p>Type of the library item, valid values are \"link\"</p>",
                    "example": "link",
                    "enum": [
                      "link"
                    ]
                  },
                  {
                    "name": "parentId",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>A unique identifier for the parent of the library item.</p>\n<p>Represented as compacted UUID using 32 hexadecimal characters.</p>\n<p>If no parent is present, the value is null.</p>",
                    "example": "502b06247f744b7492fd1a44e386f21e"
                  },
                  {
                    "name": "link",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "example": "",
                    "schema": [
                      {
                        "name": "url",
                        "kind": "optional",
                        "type": "string",
                        "description": "The URL of the link",
                        "example": "https://www.example.com"
                      }
                    ]
                  },
                  {
                    "name": "deleted",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Deletion status of the library item",
                    "example": false
                  }
                ],
                "modelRef": "#/components/schemas/library-item-link",
                "customType": "library-item-link"
              }
            ],
            "complexType": "oneOf",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "_FHi9LSTRXINNL2h2Bc7Y",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api.catenda.com/v2/projects/{project-id}/libraries/{library-id}/items/{library-item-id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "3fouD2bElb3RZJU34H3Bu",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/projects/{project-id}/libraries/{library-id}/items/{library-item-id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "UQDas58islIniuVtJHCu6",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/projects/{project-id}/libraries/{library-id}/items/{library-item-id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "BKHzUnV0eXIybvB6o_1_6",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/projects/{project-id}/libraries/{library-id}/items/{library-item-id}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "_FHi9LSTRXINNL2h2Bc7Y"
    },
    "results": {
      "languages": [
        {
          "id": "9Z_L27o_3AtSBHG1T91ol",
          "language": "200",
          "code": "// OK\n{}"
        }
      ],
      "selectedLanguageId": "9Z_L27o_3AtSBHG1T91ol"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}