---
title: Get document
slug: test-mdx-pdf/get-document
docTags: 
createdAt: 2026-07-21T14:09:11.897Z
---

{
  "id": "3zlqpG4gIGIrMLzZRQIUs",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.archbee.com/api/public-api/doc",
    "servers": [
      {
        "url": "https://api.archbee.com/api/public-api/doc",
        "description": "Archbee API Server"
      }
    ],
    "name": "Get document",
    "description": "<p>Retrieve a document in <code>markdown</code>, <code>html</code>, <code>json</code>, or <code>source</code> format.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "docId",
              "kind": "required",
              "type": "string",
              "description": "The ID of the document to be returned.",
              "example": "21-character__string0"
            },
            {
              "name": "format",
              "kind": "optional",
              "type": "string<markdown | html | json | source>",
              "description": "<p>The format of the returned data. Default is <code>markdown</code>.</p>",
              "example": "markdown",
              "enum": [
                "markdown",
                "html",
                "json",
                "source"
              ]
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>Requires the <code>Authorization</code> header in the form <code>Authorization: Bearer {base64(docSpaceId~apiKey)}</code> Where the token is base64 encoding of docSpaceId, tilde, and apiKey.</p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful response containing the document content.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "content",
                "kind": "optional",
                "type": "string",
                "description": "The content of the document in the specified format."
              },
              {
                "name": "format",
                "kind": "optional",
                "type": "string",
                "description": "The format of the returned document."
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid request parameters.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Response400",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string<OK | Not OK>",
                "description": "Response Status",
                "example": "Not OK",
                "enum": [
                  "OK",
                  "Not OK"
                ]
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "array",
                "description": "Array of messages",
                "example": "[\"Some error message\"]",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "Some error message",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/Response400",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "4kmbHdzfHaxZ2Kxan1eIr",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.archbee.com/api/public-api/doc \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"docId\": \"21-character__string0\"\n     }'"
        },
        {
          "id": "PSniRuFD7IxhlQfYzGITp",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"docId\": \"21-character__string0\"\n});\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.archbee.com/api/public-api/doc\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "wz_Q0g_F7OUyBCP-1jLJ6",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.archbee.com/api/public-api/doc\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"docId\": \"21-character__string0\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "aDnhwNmkni2xoTT3bYDOR",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.archbee.com/api/public-api/doc\"\n\npayload = json.dumps({\n   \"docId\": \"21-character__string0\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "4kmbHdzfHaxZ2Kxan1eIr"
    },
    "results": {
      "languages": [
        {
          "id": "THhk2uQJkbyJ6lz5sYEKU",
          "language": "200",
          "code": "// Successful response containing the document content.\n{\n  \"content\": \"\",\n  \"format\": \"\"\n}"
        },
        {
          "id": "QC0Umml2FQhPE7SZEhb27",
          "language": "400",
          "code": "// Invalid request parameters.\n{\n  \"status\": \"Not OK\",\n  \"messages\": [\n    \"Some error message\"\n  ]\n}"
        }
      ],
      "selectedLanguageId": "THhk2uQJkbyJ6lz5sYEKU"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}