For AI agents: markdown of this page — /docs-content-en/entities/leads/list.md documentation index — /llms.txt

List leads

GET /v1/leads

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

Parameters

Parameter Type Default Description
Parameterlimit Typenumber Default50 DescriptionNumber of records (up to 5000). When limit > 50, auto-pagination is applied
Parameteroffset Typenumber Default0 DescriptionSkip N records. When offset > 0, limit <= 500 is recommended. To walk the entire collection, a cursor is cheaper — order[id]=asc plus filter[>id] from meta.nextAfterId
Parameterselect Typestring Default— DescriptionField selection: ?select=id,title,stageId,amount. Unknown fields are ignored
Parametersort Typestring Default— DescriptionSorting via the short syntax: ?sort=-createdTime (a leading minus means descending)
Parameterorder Typeobject Default— DescriptionSorting: ?order[createdTime]=desc. Sort field names come from GET /v1/leads/fields
Parameterfilter Typeobject Default— DescriptionFilter by fields from GET /v1/leads/fields.
Filtering syntax. Example: ?filter[stageId]=NEW
ParameterwithTotal Typestring Default— DescriptionWhether you need the count: true or false. false — do not request a count. This is the only way to guarantee that meta.total is absent from the response. Without the parameter: the API key setting applies, then the platform default — and in that case a short page still carries the exact count even without an explicit request. Paging and counts

Examples

curl — personal key

Terminal
curl -g "https://vibecode.bitrix24.com/v1/leads?limit=10&filter[stageId]=NEW&select=id,title,stageId,amount" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -g "https://vibecode.bitrix24.com/v1/leads?limit=10&filter[stageId]=NEW&select=id,title,stageId,amount" \
  -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/leads?limit=10&filter[stageId]=NEW&select=id,title,stageId,amount', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

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

JavaScript — OAuth application

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

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

Response fields

Field Type Description
Fielddata Typearray DescriptionArray of leads (fields — see Fields)
Fieldmeta.total Typenumber DescriptionTotal number of records. An optional field: if no count was requested, it is absent from the response
Fieldmeta.hasMore Typeboolean DescriptionWhether there are more records
Fieldmeta.nextAfterId Typestring DescriptionThe identifier of the last returned record. Returned when the sort is strictly id ascending, while hasMore is true. Pass it back as filter[>id] — a cheap replacement for a growing offset

The card URL of any lead from the data array is built from its id:

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

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

Response example

JSON
{
  "success": true,
  "data": [
    {
      "id": 42,
      "title": "Website request #42",
      "name": "John",
      "lastName": "Smith",
      "stageId": "NEW",
      "opportunity": 1500,
      "currencyId": "USD",
      "assignedById": 1,
      "sourceId": "WEB",
      "createdTime": "2026-04-10T14:30:00+00:00"
    }
  ],
  "meta": {
    "total": 834,
    "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
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP429 CodeRATE_LIMITED DescriptionRate 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.

Known specifics

The phone filter is not suitable for every search. A value without an operator is compared against the whole stored string: a lead whose number is stored as +1 (202) 555-0123 matches that exact string, but not 12025550123, because the plus sign, spaces, parentheses, and hyphens are part of the value. The filter also checks only the first number stored on a record: if both a work number and a mobile number are stored, searching by the mobile one returns an empty list. To find a lead by phone number in any format and by any of its numbers, use Duplicate search.

Filtering and sorting by stage semantics. The stageSemanticId field takes three values — P for stages in progress, S for successful ones, and F for failed ones. It works in both filter and order. A value outside those three is not rejected: no record matches it, and data comes back empty. Grouping by this field is not supported in Aggregate leads.

Auto-pagination: when limit > 50, Vibecode automatically requests multiple pages.

When to use search: for compound conditions, use POST /v1/leads/search — parameters are passed in the request body. See Search leads.

See also