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
curl "https://vibecode.bitrix24.com/v1/files/fields" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/files/fields" \
-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/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 application
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 table describes the response envelope and the fields in the data.fields schema. For file fields, the types shown are the types of their values. Each schema field is an object with the keys type, readonly, label, and description.
The label and description field captions are returned in English. Request headers do not switch the language.
| Field | Bitrix24 | Type | RO | Description |
|---|---|---|---|---|
Fieldsuccess |
Bitrix24 | Typeboolean | RO | DescriptionAlways true on success |
Fielddata |
Bitrix24 | Typeobject | RO | DescriptionFile schema and available operations |
Fielddata.fields |
Bitrix24 | Typeobject | RO | DescriptionDictionary of file fields: each key is a field name and each value is an object describing it. The dictionary fields are listed below |
Fielddata.relations |
Bitrix24 | Typeobject | RO | DescriptionFile relations. The folder relation describes the parent folder and can be included in the response |
Fielddata.batch |
Bitrix24 | Typearray | RO | DescriptionWrite operations available in batch calls: update, delete |
Fielddata.include |
Bitrix24 | Typearray | RO | DescriptionRelation names accepted by the include parameter: folder |
Fieldid |
Bitrix24ID |
Typenumber | ROyes | DescriptionObject identifier |
Fieldname |
Bitrix24NAME |
Typestring | RO | DescriptionFile or folder name |
Fieldsize |
Bitrix24SIZE |
Typenumber | ROyes | DescriptionFile size in bytes. Returned for file records |
FieldfolderId |
Bitrix24PARENT_ID |
Typenumber | RO | DescriptionParent folder ID. Folder list: GET /v1/folders |
FieldstorageId |
Bitrix24STORAGE_ID |
Typenumber | ROyes | DescriptionStorage ID. List: GET /v1/storages |
Fieldtype |
Bitrix24TYPE |
Typestring | ROyes | DescriptionObject type: "file" or "folder" |
Fieldcode |
Bitrix24CODE |
Typestring | RO | DescriptionSymbolic code of the object |
FieldfileId |
Bitrix24FILE_ID |
Typenumber | ROyes | DescriptionInternal file ID. Returned for file records |
FielddownloadUrl |
Bitrix24DOWNLOAD_URL |
Typestring | ROyes | DescriptionVibecode API download address — GET /v1/files/:id/download. Returned for file records; send the X-Api-Key header when you follow it |
FielddetailUrl |
Bitrix24DETAIL_URL |
Typestring | ROyes | DescriptionLink to the object in the interface |
FieldcontentProvider |
Bitrix24CONTENT_PROVIDER |
Typestring | ROyes | DescriptionContent provider. Returned only for files from external content providers — not returned for files on the Bitrix24 Drive |
FieldglobalContentVersion |
Bitrix24GLOBAL_CONTENT_VERSION |
Typenumber | ROyes | DescriptionFile version counter. Returned for file records |
FielddeletedType |
Bitrix24DELETED_TYPE |
Typenumber | ROyes | DescriptionDeletion status: 0 — not deleted, 3 — in trash, 4 — deleted together with the folder |
FieldrealObjectId |
Bitrix24REAL_OBJECT_ID |
Typenumber | ROyes | DescriptionInternal object ID |
FieldcreatedBy |
Bitrix24CREATED_BY |
Typenumber | ROyes | DescriptionCreator user ID. Search: GET /v1/users |
FieldupdatedBy |
Bitrix24UPDATED_BY |
Typenumber | ROyes | DescriptionID of the last editor. Search: GET /v1/users |
FielddeletedBy |
Bitrix24DELETED_BY |
Typenumber | ROyes | DescriptionID of the user who deleted the object. Search: GET /v1/users |
FieldcreatedAt |
Bitrix24CREATE_TIME |
Typedatetime | ROyes | DescriptionCreation date and time (ISO 8601 UTC) |
FieldupdatedAt |
Bitrix24UPDATE_TIME |
Typedatetime | ROyes | DescriptionDate and time of the last change |
FielddeletedAt |
Bitrix24DELETE_TIME |
Typedatetime | ROyes | DescriptionDeletion 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
{
"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": "Vibecode API address that downloads the file: GET /v1/files/{id}/download. Send the X-Api-Key header of a key with disk or crm scope." },
"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." }
},
"relations": {
"folder": { "type": "one", "entity": "folders", "includable": true }
},
"batch": ["update", "delete"],
"include": ["folder"]
}
}
Error response example
403 — no disk scope:
{
"success": false,
"error": {
"code": "SCOPE_DENIED",
"message": "This endpoint requires 'disk' scope"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP403 | CodeSCOPE_DENIED |
DescriptionAPI key lacks the disk scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionAPI key has no configured portal tokens |
| HTTP401 | CodeINVALID_API_KEY |
DescriptionThe key is not recognized — no such key exists on the platform |
| HTTP429 | CodeRATE_LIMITED |
DescriptionRate limit exceeded: 300 requests per minute per portal. All API keys of the portal share one limit. The current limit is returned in the x-ratelimit-limit header. Retry after the delay in the Retry-After header |
For the full list of common API errors, see Errors.