
## List funnels

`GET /v1/deal-categories`

Returns a list of the sales funnels in your Bitrix24 account, with sorting and pagination support.

The main funnel with id `0` is not part of this list — it is available via `/v1/categories/2`.

## Parameters

| Parameter | Type | Default | Description |
|----------|-----|-----------|---------|
| `limit` | number | `50` | Number of records |
| `offset` | number | `0` | Skip N records |
| `select` | string | — | Field selection: `?select=id,name,sort` |
| `sort` | string | — | Sorting via the short syntax: `?sort=-sort`. A leading minus sign means descending order |
| `order` | object | — | Sorting: `?order[sort]=asc` |
| `filter` | object | — | Exact-match and `$in` (IN set) only, by `id`, `name`, `sort`. Operators (`>`, `>=`, `<`, `<=`, `!`, `%`, `$ne`, `$contains`, `$nin`) and filtering by `isLocked` / `createdAt` are not supported — you get `400 UNSUPPORTED_FILTER`.<br>[Filtering syntax](/docs/filtering). Example: `?filter[name]=Newest` |
| `withTotal` | boolean | — | Accepted, but does not change the response: `meta.total` is returned for any value of the parameter and at any `offset` |

## Examples

### curl — personal key

```bash
curl -g "https://vibecode.bitrix24.com/v1/deal-categories?order[sort]=asc" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -g "https://vibecode.bitrix24.com/v1/deal-categories?order[sort]=asc" \
  -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/deal-categories?order[sort]=asc', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { success, data, meta } = await res.json()
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/deal-categories?order[sort]=asc', {
  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 funnels |
| `data[].id` | number | Funnel ID |
| `data[].name` | string | Name |
| `data[].sort` | number | Sort order |
| `data[].isLocked` | boolean | Whether the funnel is locked — unavailable on the current plan |
| `data[].createdAt` | datetime | Creation date |
| `meta.total` | number | Number of funnels matching the filter. The main funnel is not counted |
| `meta.hasMore` | boolean | Whether there is a next page |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "Sales",
      "sort": 100,
      "isLocked": false,
      "createdAt": "2025-01-15T10:30:00.000Z"
    },
    {
      "id": 3,
      "name": "Corporate sales",
      "sort": 200,
      "isLocked": false,
      "createdAt": "2025-06-01T14:00:00.000Z"
    }
  ],
  "meta": { "total": 2, "hasMore": false }
}
```


## Error response example

403 — the API key lacks the `crm` scope:

```json
{
  "success": false,
  "error": { "code": "SCOPE_DENIED", "message": "This endpoint requires 'crm' scope" }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `UNSUPPORTED_FILTER` | An operator or a non-filterable field in the filter. Filter by exact match or `$in` on `id`, `name`, `sort` |
| 403 | `SCOPE_DENIED` | The API key lacks the `crm` scope |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 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 errors, see [Errors](/docs/errors).

## Known specifics

**Exact match only in the filter.** The filter applies exact match (and the `$in` set) on `id`, `name`, `sort`. Operators (`>`, `<`, `!`, `%`), `$ne`/`$contains`/`$nin` and filtering by `isLocked` / `createdAt` return `400 UNSUPPORTED_FILTER` — so you see immediately that the filter did not apply, instead of getting the whole list unfiltered. In Bitrix24, `isLocked` is a selection visibility toggle, not an equality field: the value `Y` returns all funnels, `N` returns all except locked ones. This field is returned as a boolean. Sorting with `order` by `sort` still works.

## See also

- [Sales pipelines](/docs/entities/deal-categories)
- [Create a pipeline](/docs/entities/deal-categories/create)
- [Deals](/docs/entities/deals)
- [Batch](/docs/batch)
