For AI agents: markdown of this page — /docs-content-en/entities/folders/get.md documentation index — /llms.txt

Get a folder

GET /v1/folders/:id

Returns a single folder by its identifier.

Parameters

Parameter Type Required Description
id (path) number yes Folder ID. List: GET /v1/folders
include (query) string no Load a related object. The available value is storage. The result arrives in the _included block

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/folders/27" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth app

Terminal
curl "https://vibecode.bitrix24.com/v1/folders/27" \
  -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/folders/27', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log(data.name)

JavaScript — OAuth app

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/folders/27', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()

Response fields

Field Type Description
success boolean Always true on success
data object Folder object. All fields — see Folder fields

GET /v1/folders/:id addresses folders only. A file identifier returns 404 ENTITY_NOT_FOUND — the file card is available via GET /v1/files/:id.

Response example

JSON
{
  "success": true,
  "data": {
    "id": 27,
    "name": "Uploaded files",
    "code": "FOR_UPLOADED_FILES",
    "storageId": 1,
    "type": "folder",
    "realObjectId": 27,
    "parentId": 1,
    "deletedType": 0,
    "createdAt": "2020-04-21T16:09:38.000Z",
    "updatedAt": "2026-06-09T12:29:04.000Z",
    "deletedAt": null,
    "createdBy": 1,
    "updatedBy": 1,
    "deletedBy": null,
    "detailUrl": "https://<portal>.bitrix24.com/company/personal/user/1/disk/path/Uploaded files"
  }
}

With the include=storage parameter an _included block is added. The main folder fields are shown:

JSON
{
  "success": true,
  "data": {
    "id": 27,
    "name": "Uploaded files",
    "storageId": 1,
    "type": "folder",
    "parentId": 1,
    "_included": {
      "storage": {
        "id": 1,
        "name": "John Smith",
        "code": null,
        "module": "disk",
        "entityType": "user",
        "entityId": "1",
        "rootFolderId": 1
      }
    }
  }
}

Error response example

404 — folder not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Could not find entity with id '999999'."
  }
}

Errors

HTTP Code Description
400 INVALID_INCLUDE The include value is not supported. The available value is storage
404 ENTITY_NOT_FOUND There is no folder with the given id, or the id belongs to a file
403 SCOPE_DENIED The API key does not have the disk scope
401 TOKEN_MISSING The API key has no configured portal tokens

Full list of general API errors — Errors.

See also