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

Element property files

GET /v1/lists/:iblockId/elements/:elementId/files/:fieldId

Returns links to files stored in a list element property.

Parameters

Parameter Type Required Default Description
ParameteriblockId (path) Typestring Requiredyes Default— DescriptionList identifier or symbolic code. Values come from the ID or CODE fields of List lists
ParameterelementId (path) Typenumber Requiredyes Default— DescriptionElement identifier, a positive integer from the ID field of List elements
ParameterfieldId (path) Typenumber Requiredyes Default— DescriptionNumeric property identifier, a positive integer. Take FIELD_ID from List fields and remove the PROPERTY_ prefix. For example, pass 1223 for PROPERTY_1223. List field routes use the full FIELD_ID with the prefix
ParameteriblockTypeId (query) Typestring Requiredno Defaultlists DescriptionInfoblock type. Values:
lists — regular lists, default
lists_socnet — workgroup lists
bitrix_processes — service workflows
structure — company structure type containing the built-in absence calendar infoblock absence
ParametersocnetGroupId (query) Typenumber Requiredno Default— DescriptionWorkgroup identifier for lists of type lists_socnet. A positive integer from the id field of List workgroups. Omit for regular lists

Examples

curl — personal key

Terminal
curl https://vibecode.bitrix24.com/v1/lists/161/elements/7165/files/1223 \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl https://vibecode.bitrix24.com/v1/lists/161/elements/7165/files/1223 \
  -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/lists/161/elements/7165/files/1223', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
console.log('File links:', data)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/lists/161/elements/7165/files/1223', {
  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 Typestring[] DescriptionArray of links to the property files. Each item is a string containing a file URL. An empty array [] is returned if there are no files, the property is not a file property, or the property does not exist

A link can be a relative path starting with /. To build the full URL, prepend your Bitrix24 account URL, for example https://example.bitrix24.com. Opening the link may require signing in to the account. A request without authentication to the account may return an HTML page instead of the file.

Response example

A property with two files. The values of the internal _esd parameter have been replaced with FILE_LINK_TOKEN:

JSON
{
  "success": true,
  "data": [
    "/company/lists/161/file/0/7165/PROPERTY_1223/38641/?ncc=y&download=y&_esd=FILE_LINK_TOKEN",
    "/company/lists/161/file/0/7165/PROPERTY_1223/38643/?ncc=y&download=y&_esd=FILE_LINK_TOKEN"
  ]
}

Error response example

400 — fieldId passed with the PROPERTY_ prefix:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "fieldId must be the numeric property id WITHOUT the PROPERTY_ prefix (e.g. 423, not PROPERTY_423)."
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionfieldId is passed with the PROPERTY_ prefix or is not a positive integer
HTTP400 CodeINVALID_PARAMS DescriptionelementId is not a positive integer
HTTP400 CodeINVALID_IBLOCK_TYPE DescriptioniblockTypeId is not in the set lists, bitrix_processes, lists_socnet, structure
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionNo access to the list or its element
HTTP404 CodeLIST_NOT_FOUND DescriptionNo list with the given iblockId exists
HTTP422 CodeBITRIX_ERROR DescriptionThe element does not exist (b24Code: ERROR_ELEMENT_NOT_FOUND), or the list type does not match the request parameters (b24Code: "0"), for example when socnetGroupId is passed for a regular list
HTTP409 CodeLISTS_MODULE_NOT_ENABLED DescriptionThe "Lists" module is not enabled on the portal
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the lists scope
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no access tokens configured

The full list of common API errors — Errors.

See also