
## 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 |
|----------|-----|:-----:|:---------:|---------|
| `iblockId` (path) | string | yes | — | List identifier or symbolic code. Values come from the `ID` or `CODE` fields of [List lists](/docs/lists/lists/list) |
| `elementId` (path) | number | yes | — | Element identifier, a positive integer from the `ID` field of [List elements](./list.md) |
| `fieldId` (path) | number | yes | — | Numeric property identifier, a positive integer. Take `FIELD_ID` from [List fields](/docs/lists/fields/list) and remove the `PROPERTY_` prefix. For example, pass `1223` for `PROPERTY_1223`. List field routes use the full `FIELD_ID` with the prefix |
| `iblockTypeId` (query) | string | no | `lists` | Infoblock type. Values:<br>`lists` — regular lists, default<br>`lists_socnet` — workgroup lists<br>`bitrix_processes` — service workflows<br>`structure` — company structure type containing the built-in absence calendar infoblock `absence` |
| `socnetGroupId` (query) | number | no | — | Workgroup identifier for lists of type `lists_socnet`. A positive integer from the `id` field of [List workgroups](/docs/entities/workgroups/list). Omit for regular lists |

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
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 |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | string[] | Array 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 |
|------|-----|---------|
| 400 | `INVALID_PARAMS` | `fieldId` is passed with the `PROPERTY_` prefix or is not a positive integer |
| 400 | `INVALID_PARAMS` | `elementId` is not a positive integer |
| 400 | `INVALID_IBLOCK_TYPE` | `iblockTypeId` is not in the set `lists`, `bitrix_processes`, `lists_socnet`, `structure` |
| 403 | `BITRIX_ACCESS_DENIED` | No access to the list or its element |
| 404 | `LIST_NOT_FOUND` | No list with the given `iblockId` exists |
| 422 | `BITRIX_ERROR` | The 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 |
| 409 | `LISTS_MODULE_NOT_ENABLED` | The "Lists" module is not enabled on the portal |
| 403 | `SCOPE_DENIED` | The key lacks the `lists` scope |
| 401 | `TOKEN_MISSING` | The key has no access tokens configured |

The full list of common API errors — [Errors](/docs/errors).

## See also

- [Get element](./get.md)
- [List elements](./list.md)
- [List fields](/docs/lists/fields/list)
