---
title: Update / Create document
slug: test-archbee/update-create-document
docTags: 
createdAt: 2026-02-24T08:46:16.000Z
---

\{
"id": "DBznd-pUW8CnPNKGzasDd",
"type": "api-oas-v2",
"data": \{
"method": "POST",
"url": "[https://api.archbee.com/api/public-api/doc](https://api.archbee.com/api/public-api/doc)",
"servers": \[
\{
"url": "[https://api.archbee.com/api/public-api/doc](https://api.archbee.com/api/public-api/doc)",
"description": "Archbee API Server"
}
],
"name": "Update / Create document",
"description": "Create / Update Doc by&#x20;

:::Iframe{code="<code>"}

:::

docId",
"contentType": "application/json",
"request": \{
"pathParameters": \[],
"headerParameters": \[
\{
"kind": "required",
"name": "Content-Type",
"type": "string",
"example": "application/json",
"description": ""
}
],
"queryParameters": \[],
"bodyDataParameters": \[
\{
"kind": "required",
"name": "body",
"type": "object",
"description": "",
"schema": \[
\{
"name": "content",
"kind": "required",
"type": "string",
"description": "markdown or JSON content used to update the document.",
"example": "# this is a h1 title\nAnd this is a paragraph\n- list item 1\n- list item 2"
},
\{
"name": "format",
"kind": "optional",
"type": "string\<markdown | json>",
"description": "OPTIONAL. Specify the format of the content. Default is markdown.",
"example": "markdown"
},
\{
"name": "title",
"kind": "optional",
"type": "string",
"description": "OPTIONAL, set the name of the document.",
"example": ""
},
\{
"name": "description",
"kind": "optional",
"type": "string",
"description": "OPTIONAL, set the description of the document.",
"example": ""
},
\{
"name": "previewImgURL",
"kind": "optional",
"type": "string",
"description": "OPTIONAL, set the preview image URL of the document.",
"example": ""
},
\{
"name": "slug",
"kind": "optional",
"type": "string",
"description": "OPTIONAL, set the slug (url key) of the document.",
"example": ""
},
\{
"name": "alias",
"kind": "optional",
"type": "string",
"description": "OPTIONAL, set the url alias.",
"example": ""
},
\{
"name": "conditionalRuleId",
"kind": "optional",
"type": "string",
"description": "OPTIONAL, set the conditional rule id.",
"example": ""
},
\{
"name": "sorting",
"kind": "optional",
"type": "string\<alphabetical | chronological>",
"description": "OPTIONAL. Specify the type of ordering for document insertion.",
"example": "alphabetical"
},
\{
"name": "hidden",
"kind": "optional",
"type": "boolean",
"description": "OPTIONAL, set document as hidden or not.",
"example": ""
},
\{
"name": "docId",
"kind": "optional",
"type": "string",
"description": "OPTIONAL, document id. If present and valid, the doc will be updated.",
"example": "21-character\_\_string0"
},
\{
"name": "parentDocId",
"kind": "optional",
"type": "string",
"description": "OPTIONAL, parent document id. If present and valid, the parent docId will be updated. If sent empty, the document will be moved to the root of the tree.\n",
"example": "21-character\_\_string0"
}
],
"isExpanded": true
}
],
"formDataParameters": \[],
"oAuthParameters": \[
\{
"id": "bearerAuth",
"name": "bearerAuth",
"kind": "optional",
"type": "http",
"description": "Requires the&#x20;

:::Iframe{code="<code>"}

:::

Authorization header in the form&#x20;

:::Iframe{code="<code>"}

:::

Authorization: Bearer \{base64(docSpaceId\~apiKey)} Where the token is base64 encoding of docSpaceId, tilde, and apiKey.",
"scheme": "bearer"
}
]
},
"responses": \[
\{
"statusCode": "200",
"description": "Process status",
"jsonExample": "",
"isExpanded": true,
"schema": \[
\{
"kind": "optional",
"type": "object",
"description": "Process status",
"schema": \[
\{
"name": "status",
"kind": "optional",
"type": "string

:::Iframe{code="<OK>"}

:::

",
"description": "Response status.",
"example": ""
},
\{
"name": "data",
"kind": "optional",
"type": "object",
"description": "",
"example": "",
"schema": \[
\{
"name": "docId",
"kind": "optional",
"type": "string",
"description": "",
"example": ""
},
\{
"name": "newRecord",
"kind": "optional",
"type": "boolean",
"description": "",
"example": ""
}
]
}
],
"isExpanded": true
}
]
},
\{
"statusCode": "400",
"description": "Invalid request",
"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"
},
\{
"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": "LRxQSANJ687YXSMZfIYkK",
"language": "curl",
"label": "cURL",
"code": "curl --request POST \\\n     --url [https://api.archbee.com/api/public-api/doc](https://api.archbee.com/api/public-api/doc) \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '\{\n     "content": "# this is a h1 title\nAnd this is a paragraph\n- list item 1\n- list item 2"\n     }'"
},
\{
"id": "I-CmB6QrTcYRtSzGdmxrJ",
"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   "content": "# this is a h1 title\nAnd this is a paragraph\n- list item 1\n- list item 2"\n});\n\nvar requestOptions = \{\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch("[https://api.archbee.com/api/public-api/doc](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": "B3Kuf-erwm89OOSkHhBhJ",
"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](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\::Post.new(url)\nrequest\["accept"] = "application/json"\nrequest\["content-type"] = "application/json"\nrequest.body = JSON.dump(\{\n   "content": "# this is a h1 title\nAnd this is a paragraph\n- list item 1\n- list item 2"\n})\n\nresponse = https.request(request)\nputs response.read\_body\n"
},
\{
"id": "zbnwhKx8DaEs4NEGxlzWM",
"language": "python",
"label": "Python",
"code": "import requests\nimport json\n\nurl = "[https://api.archbee.com/api/public-api/doc"\n\npayload](https://api.archbee.com/api/public-api/doc"\n\npayload) = json.dumps(\{\n   "content": "# this is a h1 title\nAnd this is a paragraph\n- list item 1\n- list item 2"\n})\nheaders = \{\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request("POST", url, headers=headers, data=payload)\n\nprint(response.text)\n"
}
],
"selectedLanguageId": "LRxQSANJ687YXSMZfIYkK"
},
"results": \{
"languages": \[
\{
"id": "gDMkHtZa1pM7H64twkajW",
"language": "200",
"code": "// Process status\n\{\n  "status": "",\n  "data": \{\n    "docId": "",\n    "newRecord": false\n  }\n}"
},
\{
"id": "xjnzGFSk1TnfQy7wioyT9",
"language": "400",
"code": "// Invalid request\n\{\n  "status": "Not OK",\n  "messages": \[\n    "Some error message"\n  ]\n}"
}
],
"selectedLanguageId": "gDMkHtZa1pM7H64twkajW"
}
},
"children": \[
\{
"text": ""
}
]
}













