
## List deals

`GET /v1/deals`

Returns a list of deals with support for filtering, sorting and auto-pagination.

## Parameters

| Parameter | Type | Default | Description |
|----------|-----|-----------|---------|
| `limit` | number | `50` | Number of records (up to 5000). When `limit > 50` Vibecode automatically requests several pages from B24 |
| `offset` | number | `0` | Skip N records. When `offset > 0`, we recommend `limit ≤ 500` |
| `select` | string | — | Field selection: `?select=id,title,amount` |
| `order` | object | — | Sorting: `?order[createdAt]=desc` |
| `filter` | object | — | Filter by `GET /v1/deals/fields` fields.<br>[Filtering syntax](/docs/filtering). Example: `?filter[stageId]=NEW` |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/deals?limit=10&order[amount]=desc&filter[stageId]=NEW" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth app

```bash
curl "https://vibecode.bitrix24.com/v1/deals?limit=10&order[amount]=desc&filter[stageId]=NEW" \
  -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/deals?limit=10&order[amount]=desc&filter[stageId]=NEW', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data, meta } = await res.json()
console.log(`Found ${meta.total} deals`)
```

### JavaScript — OAuth app

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

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

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `data` | array | Array of deals (each contains all fields — see [Fields](/docs/entities/deals/fields)) |
| `meta.total` | number | Total number of records matching the filter |
| `meta.hasMore` | boolean | Whether there are more records beyond `limit` |

The card URL of any deal from the `data` array — its `id`:

```
https://<portal>.bitrix24.com/crm/deal/details/<id>/
```

`<portal>` — the Bitrix24 portal domain. Access is restricted by the employee's permissions in Bitrix24.

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 741,
      "title": "Equipment delivery",
      "amount": 50000,
      "currency": "USD",
      "stageId": "NEW",
      "categoryId": 0,
      "assignedById": 1,
      "createdAt": "2026-04-14T08:43:59.000Z",
      "contactId": 71,
      "companyId": 0,
      "opened": true
    }
  ],
  "meta": {
    "total": 156,
    "hasMore": true
  }
}
```

## Error response example

403 — no scope:

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

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `UNKNOWN_FILTER_FIELD` | Filter on a field absent from the deal schema. The message contains the list of available fields |
| 403 | `SCOPE_DENIED` | API key lacks the `crm` scope |
| 401 | `TOKEN_MISSING` | API key has no configured tokens |

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

## Known specifics

**Auto-pagination:** when `limit > 50` Vibecode automatically requests several pages from Bitrix24 and returns all records in a single response.

**Offset limit:** when `offset ≥ 2500` Bitrix24 may return `INTERNAL_ERROR`. Use `limit ≤ 500` for large offsets.

**When to use search instead of list:** for complex filters with many conditions, `POST /v1/deals/search` is more convenient — parameters are passed in the body rather than the query string. Search also supports [windowed search by dates](/docs/batch) for large selections. See [Search deals](/docs/entities/deals/search).

## See also

- [Search deals](/docs/entities/deals/search) — POST request for complex filters
- [Create deal](/docs/entities/deals/create) — create a new one
- [Filtering syntax](/docs/filtering)
- [Entity API](/docs/entity-api) — select, order, pagination
- [Batch](/docs/batch) — combining several list requests
- [Limits and optimization](/docs/optimization) — rate limits
