For AI agents: markdown of this page — /docs-content-en/entities/crm-tracking/analytics-sources-list.md documentation index — /llms.txt
Source analytics
GET /v1/crm-tracking/analytics/sources
Get end-to-end analytics metrics for selected sources over a specified period.
The method ships in the
crm 26.2100.0update and is not yet available on all Bitrix24 accounts. If the method is not enabled yet, the API returns422 METHOD_NOT_YET_AVAILABLE.
Requires the crm scope, the crm-tracking-v3 flag, and the feature enabled in the Bitrix24 account. READONLY keys can read this resource.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
ParametersourceIds (query) |
Typestring | Requiredyes | Default— | DescriptionComma-separated positive integer IDs, such as 2,3. Get IDs from the source list. |
ParameterdateFrom (query) |
Typestring | Requiredyes | Default— | DescriptionPeriod start, YYYY-MM-DD. |
ParameterdateTo (query) |
Typestring | Requiredyes | Default— | DescriptionPeriod end, YYYY-MM-DD. |
Parameterlimit (query) |
Typenumber | Requiredno | Default50 |
DescriptionPage size, an integer from 1 to 500. |
Parameteroffset (query) |
Typenumber | Requiredno | Default0 |
DescriptionNumber of records to skip, a nonnegative integer. |
Pagination: each request returns one page without fetching subsequent pages automatically. Increase offset by limit to request the next page. Sorting, additional filters, and field selection are not supported.
A maximum of 100 unique sources is allowed. Bitrix24 validates the source count limit and the permitted period.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/crm-tracking/analytics/sources?sourceIds=2,3&dateFrom=2026-10-01&dateTo=2026-10-07&limit=50&offset=0" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/crm-tracking/analytics/sources?sourceIds=2,3&dateFrom=2026-10-01&dateTo=2026-10-07&limit=50&offset=0" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-tracking/analytics/sources?sourceIds=2,3&dateFrom=2026-10-01&dateTo=2026-10-07&limit=50&offset=0', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const result = await res.json()
console.log(result)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-tracking/analytics/sources?sourceIds=2,3&dateFrom=2026-10-01&dateTo=2026-10-07&limit=50&offset=0', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const result = await res.json()
console.log(result)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue |
Fielddata |
Typearray | DescriptionSource metrics. |
Fielddata[].sourceId |
Typenumber | DescriptionSource ID from the source list. |
Fielddata[].dateFrom |
Typestring | DescriptionPeriod start, YYYY-MM-DD. |
Fielddata[].dateTo |
Typestring | DescriptionPeriod end, YYYY-MM-DD. |
Fielddata[].currencyId |
Typestring | DescriptionBitrix24 accounting currency code. |
Fielddata[].stages |
Typearray | DescriptionMetrics by stage. |
Fielddata[].stages[].code |
Typestring | DescriptionStage code. |
Fielddata[].stages[].quantity |
Typenumber | DescriptionQuantity at the stage. |
Fielddata[].stages[].sum |
Typenumber | DescriptionStage amount in currencyId. |
Fielddata[].stages[].views |
Typenumber | DescriptionNumber of views. |
Fielddata[].cost |
Typenumber | DescriptionExpenses in currencyId. |
Fielddata[].income |
Typenumber | DescriptionIncome in currencyId. |
Fielddata[].roi |
Typenumber | DescriptionReturn on investment as a percentage. |
Fieldmeta.limit |
Typenumber | DescriptionRequested page size. |
Fieldmeta.offset |
Typenumber | DescriptionNumber of records to skip. |
The response does not include a total record count.
Response example
Response shape example.
{
"success": true,
"data": [
{
"sourceId": 2,
"dateFrom": "2026-10-01",
"dateTo": "2026-10-07",
"currencyId": "USD",
"stages": [
{
"code": "actions",
"quantity": 1,
"sum": 12.5,
"views": 2
}
],
"cost": 12.5,
"income": 0,
"roi": -100
}
],
"meta": {
"limit": 50,
"offset": 0
}
}
Error response example
400 — source list not supplied:
{
"success": false,
"error": {
"code": "MISSING_REQUIRED_FIELDS",
"message": "sourceIds is required"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeMISSING_REQUIRED_FIELDS |
DescriptionsourceIds, dateFrom, or dateTo was not supplied. An empty sourceIds also counts as missing. |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionInvalid ID list, date format, or pagination parameters. |
| HTTP400 | CodeUNKNOWN_FILTER_FIELD |
DescriptionAn unsupported parameter, filter, sort, or field selection was supplied. |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the crm scope. |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no configured tokens. |
| HTTP422 | CodeMETHOD_NOT_YET_AVAILABLE |
DescriptionThe flag is off or the method is not enabled in the account. error.release is crm 26.2100.0. |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 returned an invalid list structure. |
Other Bitrix24 refusal codes, HTTP statuses, and messages are preserved, with secret values removed from text. For common API errors, see Errors.
Known specifics
Metrics, monetary values, and accounting currency pass through from Bitrix24 without conversion. The API does not recalculate return on investment. Secret data is removed from text values.