## List storages

`GET /v1/storages`

Returns a list of Bitrix24 Drive storages with exact field-value filtering and auto-pagination.

**Result ordering.** Without an explicit sort, the list is returned in ascending order of `id`. `id` is appended to your sort as a final key, so the order is always total and unambiguous and paging over it is repeatable: when sorting by a non-unique field, a row sharing that value could otherwise land on two pages at once, or drop out, at a page boundary. If you sort by `id` yourself, your direction is preserved.

Types user, common, group are described in the [type dictionary](/docs/entities/storages/types). It is incomplete; Bitrix24 may return other entityType values. [Create a folder at root](/docs/entities/storages/folders) by storage ID.

## Parameters

| Parameter | Type | Default | Description |
|----------|-----|-----------|---------|
| `limit` | number | `50` | Number of records (up to 5000). When `limit > 50`, the request is automatically assembled from several pages on the server side |
| `offset` | number | `0` | Skip N records. Used to read result sets larger than 5000 records: increase `offset` by the number of records received until `meta.hasMore` turns `false` |
| `select` | string | — | Field selection: `?select=id,name`. Only the listed fields are returned |
| `sort` | string | — | Sort field. A leading minus indicates descending order: `?sort=-id`. The fields that change the order are `id`, `name`, `entityType`, `entityId`, `rootFolderId` (verified live). The method also accepts `code` and `module`, but on the accounts we checked those fields hold the same value for every storage, so ordering by them changes nothing |
| `order` | object | — | The same in object form: `?order[id]=desc`. When both are passed, `sort` wins |
| `filter` | object | — | Exact equality and `$in` (IN-set) only, over the fields `id`, `name`, `code`, `entityType`, `entityId`. Operators (`>`, `>=`, `<`, `<=`, `!`, `%`, `$ne`, `$contains`, `$nin`) and other fields (for example `rootFolderId`) are not supported — you get `400 UNSUPPORTED_FILTER`.<br>[Filtering syntax](/docs/filtering). Example: `?filter[entityType]=group` |

## Examples

### curl — personal key

```bash
curl -g "https://vibecode.bitrix24.com/v1/storages?limit=10&filter[entityType]=group" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -g "https://vibecode.bitrix24.com/v1/storages?limit=10&filter[entityType]=group" \
  -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/storages?limit=10&filter[entityType]=group', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data, meta } = await res.json()
console.log(`Total storages matching the filter: ${meta.total}`)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/storages?limit=10&filter[entityType]=group', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

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

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | array | Array of storages |
| `data[].id` | number | Storage identifier |
| `data[].name` | string | Storage name |
| `data[].code` | string \| null | Symbolic code. `null` on the accounts checked |
| `data[].module` | string | Owner module of the storage, `disk` for Drive |
| `data[].entityType` | string | Owner type: `user`, `group`, `common` |
| `data[].entityId` | string | Owner identifier. A string, non-numeric for the shared drive |
| `data[].rootFolderId` | number | Identifier of the storage root folder |
| `meta.total` | number | Total number of records matching the filter |
| `meta.hasMore` | boolean | Whether more records are available |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "John Smith",
      "code": null,
      "module": "disk",
      "entityType": "user",
      "entityId": "1",
      "rootFolderId": 1
    },
    {
      "id": 11,
      "name": "Shared drive",
      "code": null,
      "module": "disk",
      "entityType": "common",
      "entityId": "shared_files_s1",
      "rootFolderId": 19
    }
  ],
  "meta": {
    "total": 490,
    "hasMore": true
  }
}
```

## Error response example

400 — operator or unsupported field in the filter:

```json
{
  "success": false,
  "error": {
    "code": "UNSUPPORTED_FILTER",
    "message": "UNSUPPORTED_FILTER: 'rootObjectId' is not filterable on 'storages'. Its Bitrix24 method (disk.storage.getlist) filters by exact match only. Filterable: id, name, code, entityType, entityId."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `UNSUPPORTED_FILTER` | Operator or unsupported field in the filter. Filter by exact equality or `$in` over `id`, `name`, `code`, `entityType`, `entityId` |
| 403 | `SCOPE_DENIED` | The API key does not have the `disk` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |
| 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 |

For the full list of common API errors, see [Errors](/docs/errors).

## See also

- [Get storage](/docs/entities/storages/get)
- [Storage fields](/docs/entities/storages/fields)
- [Storages](/docs/entities/storages)
- [Filtering syntax](/docs/filtering)
- [Batch](/docs/batch)
- [Limits and optimization](/docs/optimization)