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
Parameterid (path) Typenumber Requiredyes DescriptionDocument 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
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.id Typenumber DescriptionDocument identifier
Fielddata.collectionId Typenumber DescriptionThe knowledge base the document belongs to. List: GET /v1/note/collections
Fielddata.parentId Typenumber or null DescriptionParent document in the knowledge base tree. null for a top-level document
Fielddata.title Typestring DescriptionDocument title
Fielddata.markdown Typestring DescriptionDocument contents in Markdown
Fielddata.position Typenumber DescriptionSort order among sibling documents
Fielddata.createdBy Typenumber DescriptionCreator identifier. List: GET /v1/users
Fielddata.updatedBy Typenumber DescriptionIdentifier of the last editor. List: GET /v1/users
Fielddata.createdAt Typestring DescriptionCreation date in ISO 8601 format
Fielddata.updatedAt Typestring DescriptionLast modification date in ISO 8601 format. Changes on any edit, including a title change and archiving
Fielddata.contentUpdatedAt Typestring DescriptionDate of the last change to the markdown content in ISO 8601 format. A title-only edit does not change it
Fielddata.isArchived Typeboolean Descriptiontrue for an archived document
Fielddata.isTrashed Typeboolean Descriptiontrue for a document in the trash
Fielddata.isOrphan Typeboolean Descriptiontrue for a document that belongs to no knowledge base. Observed as false on every document checked

Response example

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

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Record with ID = `999999` not found"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS Descriptionid is not a positive integer
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo document exists with the given id
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the note scope
HTTP401 CodeTOKEN_MISSING DescriptionThe 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.

See also