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

Terminal
curl https://vibecode.bitrix24.com/v1/note/documents/11 \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
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

javascript
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

javascript
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 author of the last change. List: GET /v1/users
data.createdAt string Creation date in ISO 8601 format
data.updatedAt string Last change date in ISO 8601 format

Response example

JSON
{
  "success": true,
  "data": {
    "id": 11,
    "collectionId": 9,
    "parentId": null,
    "title": "Chapter 1",
    "markdown": "# Chapter 1\n\nDocument text",
    "position": 1000,
    "createdBy": 1269,
    "updatedBy": 1269,
    "createdAt": "2026-06-23T19:07:29Z",
    "updatedAt": "2026-06-23T19:07:29Z"
  }
}

Error response example

404 — document not found:

JSON
{
  "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.

See also