For AI agents: markdown of this page — /docs-content-en/note/documents/get.md documentation index — /llms.txt
Get a document
GET /v1/note/documents/:id
Returns a single knowledge base document by its identifier. Use it to read the contents of a specific document.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id (path) |
number | yes | Document identifier. Knowledge base document list — GET /v1/note/collections/:collectionId/documents |
Examples
curl — personal key
curl https://vibecode.bitrix24.com/v1/note/documents/11 \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl https://vibecode.bitrix24.com/v1/note/documents/11 \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/note/documents/11', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
console.log('Document:', data)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/note/documents/11', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | Always true on success |
data.id |
number | Document identifier |
data.collectionId |
number | The knowledge base the document belongs to. List: GET /v1/note/collections |
data.parentId |
number or null | Parent document in the knowledge base tree. null for a top-level document |
data.title |
string | Document title |
data.markdown |
string | Document contents in Markdown |
data.position |
number | Sort order among sibling documents |
data.createdBy |
number | Creator identifier. List: GET /v1/users |
data.updatedBy |
number | Identifier of the last editor. List: GET /v1/users |
data.createdAt |
string | Creation date in ISO 8601 format |
data.updatedAt |
string | Last modification date in ISO 8601 format. Changes on any edit, including a title change and archiving |
data.contentUpdatedAt |
string | Date of the last change to the markdown content in ISO 8601 format. A title-only edit does not change it |
data.isArchived |
boolean | true for an archived document |
data.isTrashed |
boolean | true for a document in the trash |
data.isOrphan |
boolean | true for a document that belongs to no knowledge base. Observed as false on every document checked |
Response example
{
"success": true,
"data": {
"id": 65,
"collectionId": 27,
"parentId": null,
"title": "Chapter 1",
"markdown": "# Chapter 1\n\nDocument text",
"position": 1000,
"createdBy": 1295,
"updatedBy": 1295,
"createdAt": "2026-09-15T12:44:34Z",
"updatedAt": "2026-09-15T12:44:34Z",
"contentUpdatedAt": "2026-09-15T12:44:34Z",
"isArchived": false,
"isTrashed": false,
"isOrphan": false
}
}
Error response example
404 — document not found:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Record with ID = `999999` not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_PARAMS |
id is not a positive integer |
| 404 | ENTITY_NOT_FOUND |
No document exists with the given id |
| 403 | SCOPE_DENIED |
The key lacks the note scope |
| 401 | TOKEN_MISSING |
The API key has no tokens configured |
Full list of common API errors — Errors.
Known specifics
Inline attachments in the text. The markdown field may contain blocks like [[image fileId=17]], where the type is image, video, or file. This is how files uploaded to the document are embedded into its text. When rendering the document, handle these blocks separately from the rest of the Markdown.
Archived and trashed documents are still returned. After archiving and after deletion, the request still returns 200 — the state is visible in isArchived and isTrashed. Only a non-existent identifier returns 404. Such a document cannot be modified: PATCH on it returns 404.