[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Ffiles\u002Ffields":3,"docs-tabs-entities\u002Ffiles\u002Ffields":6},{"content":4,"lastmod":5},"\n## File fields\n\n`GET \u002Fv1\u002Ffiles\u002Ffields`\n\nReturns the schema of available entity fields: data types and the read-only flag.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ffiles\u002Ffields\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ffiles\u002Ffields\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ffiles\u002Ffields', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Fields:', Object.keys(data.fields).length)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ffiles\u002Ffields', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\nThe 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`.\n\nThe `label` and `description` field captions are returned in English. Request headers do not switch the language.\n\n| Field | Bitrix24 | Type | RO | Description |\n|------|----------|-----|:--:|---------|\n| `success` | | boolean | | Always `true` on success |\n| `data` | | object | | File schema and available operations |\n| `data.fields` | | object | | Dictionary of file fields: each key is a field name and each value is an object describing it. The dictionary fields are listed below |\n| `data.relations` | | object | | File relations. The `folder` relation describes the parent folder and can be included in the response |\n| `data.batch` | | array | | Write operations available in [batch calls](\u002Fdocs\u002Fbatch): `update`, `delete` |\n| `data.include` | | array | | Relation names accepted by the `include` parameter: `folder` |\n| `id` | `ID` | number | yes | Object identifier |\n| `name` | `NAME` | string | | File or folder name |\n| `size` | `SIZE` | number | yes | File size in bytes. Returned for file records |\n| `folderId` | `PARENT_ID` | number | | Parent folder ID. Folder list: `GET \u002Fv1\u002Ffolders` |\n| `storageId` | `STORAGE_ID` | number | yes | Storage ID. List: `GET \u002Fv1\u002Fstorages` |\n| `type` | `TYPE` | string | yes | Object type: `\"file\"` or `\"folder\"` |\n| `code` | `CODE` | string | | Symbolic code of the object |\n| `fileId` | `FILE_ID` | number | yes | Internal file ID. Returned for file records |\n| `downloadUrl` | `DOWNLOAD_URL` | string | yes | Vibecode API download address — `GET \u002Fv1\u002Ffiles\u002F:id\u002Fdownload`. Returned for file records; send the `X-Api-Key` header when you follow it |\n| `detailUrl` | `DETAIL_URL` | string | yes | Link to the object in the interface |\n| `contentProvider` | `CONTENT_PROVIDER` | string | yes | Content provider. Returned only for files from external content providers — not returned for files on the Bitrix24 Drive |\n| `globalContentVersion` | `GLOBAL_CONTENT_VERSION` | number | yes | File version counter. Returned for file records |\n| `deletedType` | `DELETED_TYPE` | number | yes | Deletion status: `0` — not deleted, `3` — in trash, `4` — deleted together with the folder |\n| `realObjectId` | `REAL_OBJECT_ID` | number | yes | Internal object ID |\n| `createdBy` | `CREATED_BY` | number | yes | Creator user ID. Search: `GET \u002Fv1\u002Fusers` |\n| `updatedBy` | `UPDATED_BY` | number | yes | ID of the last editor. Search: `GET \u002Fv1\u002Fusers` |\n| `deletedBy` | `DELETED_BY` | number | yes | ID of the user who deleted the object. Search: `GET \u002Fv1\u002Fusers` |\n| `createdAt` | `CREATE_TIME` | datetime | yes | Creation date and time (ISO 8601 UTC) |\n| `updatedAt` | `UPDATE_TIME` | datetime | yes | Date and time of the last change |\n| `deletedAt` | `DELETE_TIME` | datetime | yes | Deletion date and time; `null` — object not deleted |\n\nThe `name`, `folderId`, and `code` fields are available when creating and updating an object. Via `PATCH \u002Fv1\u002Ffiles\u002F:id` only the `name` field is updated.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"fields\": {\n      \"id\": { \"type\": \"number\", \"readonly\": true, \"label\": \"ID\", \"description\": \"Identifier of the file or folder on Disk.\" },\n      \"name\": { \"type\": \"string\", \"readonly\": false, \"label\": \"Name\", \"description\": \"Name of the file or folder.\" },\n      \"size\": { \"type\": \"number\", \"readonly\": true, \"label\": \"Size\", \"description\": \"File size in bytes; provided only for file records.\" },\n      \"folderId\": { \"type\": \"number\", \"readonly\": false, \"label\": \"Folder ID\", \"description\": \"Identifier of the parent folder containing the object.\" },\n      \"storageId\": { \"type\": \"number\", \"readonly\": true, \"label\": \"Storage ID\", \"description\": \"Identifier of the Disk storage the object belongs to.\" },\n      \"type\": { \"type\": \"string\", \"readonly\": true, \"label\": \"Object type\", \"description\": \"Type of the object — file or folder.\" },\n      \"code\": { \"type\": \"string\", \"readonly\": false, \"label\": \"Symbolic code\", \"description\": \"Symbolic code of the object, set on creation or update.\" },\n      \"fileId\": { \"type\": \"number\", \"readonly\": true, \"label\": \"File ID\", \"description\": \"Internal identifier of the file; provided only for file records.\" },\n      \"downloadUrl\": { \"type\": \"string\", \"readonly\": true, \"label\": \"Download link\", \"description\": \"Vibecode API address that downloads the file: GET \u002Fv1\u002Ffiles\u002F{id}\u002Fdownload. Send the X-Api-Key header of a key with disk or crm scope.\" },\n      \"detailUrl\": { \"type\": \"string\", \"readonly\": true, \"label\": \"Object link\", \"description\": \"Link to view the object in the Bitrix24 interface.\" },\n      \"contentProvider\": { \"type\": \"string\", \"readonly\": true, \"label\": \"Content provider\", \"description\": \"External content provider; not returned for files on Bitrix24 Disk.\" },\n      \"globalContentVersion\": { \"type\": \"number\", \"readonly\": true, \"label\": \"Content version\", \"description\": \"Version counter of the file's content.\" },\n      \"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.\" },\n      \"createdBy\": { \"type\": \"number\", \"readonly\": true, \"label\": \"Created by\", \"description\": \"Identifier of the user who created the object.\" },\n      \"updatedBy\": { \"type\": \"number\", \"readonly\": true, \"label\": \"Updated by\", \"description\": \"Identifier of the user who last modified the object.\" },\n      \"createdAt\": { \"type\": \"datetime\", \"readonly\": true, \"label\": \"Created at\", \"description\": \"Date and time the object was created.\" },\n      \"updatedAt\": { \"type\": \"datetime\", \"readonly\": true, \"label\": \"Updated at\", \"description\": \"Date and time the object was last modified.\" },\n      \"deletedAt\": { \"type\": \"datetime\", \"readonly\": true, \"label\": \"Deleted at\", \"description\": \"Date and time the object was deleted; null if the object is not deleted.\" },\n      \"realObjectId\": { \"type\": \"number\", \"readonly\": true, \"label\": \"Internal ID\", \"description\": \"Internal identifier of the object on Disk.\" },\n      \"deletedBy\": { \"type\": \"number\", \"readonly\": true, \"label\": \"Deleted by\", \"description\": \"Identifier of the user who deleted the object; null if the object is not deleted.\" }\n    },\n    \"relations\": {\n      \"folder\": { \"type\": \"one\", \"entity\": \"folders\", \"includable\": true }\n    },\n    \"batch\": [\"update\", \"delete\"],\n    \"include\": [\"folder\"]\n  }\n}\n```\n\n## Error response example\n\n403 — no `disk` scope:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"SCOPE_DENIED\",\n    \"message\": \"This endpoint requires 'disk' scope\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 403 | `SCOPE_DENIED` | API key lacks the `disk` scope |\n| 401 | `TOKEN_MISSING` | API key has no configured portal tokens |\n| 401 | `INVALID_API_KEY` | The key is not recognized — no such key exists on the platform |\n| 429 | `RATE_LIMITED` | Rate 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 |\n\nFor the full list of common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [List files](\u002Fdocs\u002Fentities\u002Ffiles\u002Flist)\n- [Get file](\u002Fdocs\u002Fentities\u002Ffiles\u002Fget)\n- [Update file](\u002Fdocs\u002Fentities\u002Ffiles\u002Fupdate)\n- [Files](\u002Fdocs\u002Fentities\u002Ffiles)\n- [Filtering syntax](\u002Fdocs\u002Ffiltering)\n","2026-10-23",{},1794739376437]