---
title: Update document reference
slug: topic-api/update-document-reference
docTags: 
createdAt: 2024-06-10T16:49:07.009Z
---

{
  "id": "3GN3sXZRKZR21nOUcyD9P",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/document_references/{document-reference-id}",
    "servers": [
      {
        "url": "https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/document_references/{document-reference-id}"
      }
    ],
    "name": "Update document reference",
    "description": "<p>Update a topic document reference.</p>\n<p>To reference a document set <code>document_guid</code>. To reference a link set <code>url</code>.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "topic-board-id",
          "type": "string",
          "example": "e18a2d10-1595-4e52-a941-22d43bf8d7ad",
          "description": "Id of the topic board"
        },
        {
          "kind": "required",
          "name": "topic-id",
          "type": "string",
          "example": "18d0273d-e15c-4924-97b3-6f47b233eebe",
          "description": "Topic id"
        },
        {
          "kind": "required",
          "name": "document-reference-id",
          "type": "string",
          "example": "cd8daaee-1775-4b9d-a1c4-01bf503658f4",
          "description": "Document reference id"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "document_guid",
              "kind": "optional",
              "type": "string",
              "description": "Id of the referenced document",
              "example": ""
            },
            {
              "name": "url",
              "kind": "optional",
              "type": "string",
              "description": "Referenced URL",
              "example": ""
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "Description of the document reference",
              "example": "Document reference description"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [],
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "guid",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the document reference",
                    "example": "cd8daaee-1775-4b9d-a1c4-01bf503658f4"
                  },
                  {
                    "name": "document_guid",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the referenced document",
                    "example": "bd266fbe-78bd-493c-8751-3c8925e7fbc2"
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": "Description of the document reference",
                    "example": "Document reference description"
                  }
                ],
                "modelRef": "#/components/schemas/document-reference-document",
                "customType": "document-reference-document"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "guid",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the document reference",
                    "example": "cd8daaee-1775-4b9d-a1c4-01bf503658f4"
                  },
                  {
                    "name": "url",
                    "kind": "optional",
                    "type": "string",
                    "description": "URL content of the referenced link",
                    "example": ""
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": "Description of the document reference",
                    "example": "Document reference description"
                  }
                ],
                "modelRef": "#/components/schemas/document-reference-link",
                "customType": "document-reference-link"
              }
            ],
            "complexType": "oneOf",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "_YCb-julFbj53DFiqm99t",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/document_references/{document-reference-id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "BeZCpB-WcWSRhe3QGAYQK",
          "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: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/document_references/{document-reference-id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "3DgKN2gN98unFrvT-RdhL",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/document_references/{document-reference-id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "OErKE_D5sUuEdu-bcCcGA",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/topics/{topic-id}/document_references/{document-reference-id}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "_YCb-julFbj53DFiqm99t"
    },
    "results": {
      "languages": [
        {
          "id": "sDXdB_5XoW_kMRUhyQ2dC",
          "language": "200",
          "code": "// OK\n{}"
        }
      ],
      "selectedLanguageId": "sDXdB_5XoW_kMRUhyQ2dC"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}