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

File fields

GET /v1/files/fields

Returns the schema of available entity fields: data types and the read-only flag.

Examples

curl — personal key

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

curl — OAuth app

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

const { success, data } = await res.json()
console.log('Fields:', Object.keys(data.fields).length)

JavaScript — OAuth app

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

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

Response fields

The label and description field captions are returned in English. Request headers do not switch the language.

Field Bitrix24 Type RO Description
id ID number yes Object identifier
name NAME string File or folder name
size SIZE number yes File size in bytes. Returned for file records
folderId PARENT_ID number Parent folder ID. Folder list: GET /v1/folders
storageId STORAGE_ID number yes Storage ID. List: GET /v1/storages
type TYPE string yes Object type: "file" or "folder"
code CODE string Symbolic code of the object
fileId FILE_ID number yes Internal file ID. Returned for file records
downloadUrl DOWNLOAD_URL string yes Temporary download link. Returned for file records. For programmatic download — GET /v1/files/:id/download
detailUrl DETAIL_URL string yes Link to the object in the interface
contentProvider CONTENT_PROVIDER string yes Content provider. Returned only for files from external content providers — not returned for files on the Bitrix24 Drive
globalContentVersion GLOBAL_CONTENT_VERSION number yes File version counter. Returned for file records
deletedType DELETED_TYPE number yes Deletion status: 0 — not deleted, 3 — in trash, 4 — deleted together with the folder
realObjectId REAL_OBJECT_ID number yes Internal object ID
createdBy CREATED_BY number yes Creator user ID. Search: GET /v1/users
updatedBy UPDATED_BY number yes ID of the last editor. Search: GET /v1/users
deletedBy DELETED_BY number yes ID of the user who deleted the object. Search: GET /v1/users
createdAt CREATE_TIME datetime yes Creation date and time (ISO 8601 UTC)
updatedAt UPDATE_TIME datetime yes Date and time of the last change
deletedAt DELETE_TIME datetime yes Deletion date and time; null — object not deleted

The name, folderId, and code fields are available when creating and updating an object. Via PATCH /v1/files/:id only the name field is updated.

Response example

JSON
{
  "success": true,
  "data": {
    "fields": {
      "id": { "type": "number", "readonly": true, "label": "ID", "description": "Identifier of the file or folder on Disk." },
      "name": { "type": "string", "readonly": false, "label": "Name", "description": "Name of the file or folder." },
      "size": { "type": "number", "readonly": true, "label": "Size", "description": "File size in bytes; provided only for file records." },
      "folderId": { "type": "number", "readonly": false, "label": "Folder ID", "description": "Identifier of the parent folder containing the object." },
      "storageId": { "type": "number", "readonly": true, "label": "Storage ID", "description": "Identifier of the Disk storage the object belongs to." },
      "type": { "type": "string", "readonly": true, "label": "Object type", "description": "Type of the object — file or folder." },
      "code": { "type": "string", "readonly": false, "label": "Symbolic code", "description": "Symbolic code of the object, set on creation or update." },
      "fileId": { "type": "number", "readonly": true, "label": "File ID", "description": "Internal identifier of the file; provided only for file records." },
      "downloadUrl": { "type": "string", "readonly": true, "label": "Download link", "description": "Temporary link for downloading the file." },
      "detailUrl": { "type": "string", "readonly": true, "label": "Object link", "description": "Link to view the object in the Bitrix24 interface." },
      "contentProvider": { "type": "string", "readonly": true, "label": "Content provider", "description": "External content provider; not returned for files on Bitrix24 Disk." },
      "globalContentVersion": { "type": "number", "readonly": true, "label": "Content version", "description": "Version counter of the file's content." },
      "deletedType": { "type": "number", "readonly": true, "label": "Deletion status", "description": "Whether and how the object was deleted — not deleted, in trash, or deleted along with its folder." },
      "createdBy": { "type": "number", "readonly": true, "label": "Created by", "description": "Identifier of the user who created the object." },
      "updatedBy": { "type": "number", "readonly": true, "label": "Updated by", "description": "Identifier of the user who last modified the object." },
      "createdAt": { "type": "datetime", "readonly": true, "label": "Created at", "description": "Date and time the object was created." },
      "updatedAt": { "type": "datetime", "readonly": true, "label": "Updated at", "description": "Date and time the object was last modified." },
      "deletedAt": { "type": "datetime", "readonly": true, "label": "Deleted at", "description": "Date and time the object was deleted; null if the object is not deleted." },
      "realObjectId": { "type": "number", "readonly": true, "label": "Internal ID", "description": "Internal identifier of the object on Disk." },
      "deletedBy": { "type": "number", "readonly": true, "label": "Deleted by", "description": "Identifier of the user who deleted the object; null if the object is not deleted." }
    }
  }
}

Error response example

403 — no disk scope:

JSON
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'disk' scope"
  }
}

Errors

HTTP Code Description
403 SCOPE_DENIED API key lacks the disk scope
401 TOKEN_MISSING API key has no configured portal tokens
401 INVALID_API_KEY Invalid or expired API key
429 RATE_LIMITED Rate limit exceeded: 300 requests per minute per portal, all API keys of the portal share one limit. The exact value arrives in the x-ratelimit-limit header (the cap is divided across replicas). Retry after the delay in the Retry-After header

Full list of common API errors — Errors.

See also