For AI agents: markdown of this page — /docs-content-en/entities/crm-tracking.md documentation index — /llms.txt
The methods are rolling out in update
crm 26.2100.0. They are not available on every Bitrix24 account. Until a method is available, the API returns422 METHOD_NOT_YET_AVAILABLE.
Analytics sources and channels
Sources attribute visits to campaigns and referrals. You can read built-in sources, configure them by code and create custom sources. Channels show which acquisition methods are configured on the account.
Bitrix24 API: crm.tracking.source.*, crm.tracking.channel.list
Scope: crm
The crm-tracking-v3 flag and the REST v3 analytics capability in the Bitrix24 account must be enabled. READONLY keys may read; writes require READWRITE.
Operations
GET /v1/crm-tracking/sources/by-code/:code — get a built-in source
PATCH /v1/crm-tracking/sources/by-code/:code — update a built-in source
POST /v1/crm-tracking/sources/by-code/:code/archive — archive by code
POST /v1/crm-tracking/sources/by-code/:code/unarchive — restore by code
GET /v1/crm-tracking/sources/:id/expenses — list manual expenses
POST /v1/crm-tracking/sources/:id/expenses — add manual expenses
DELETE /v1/crm-tracking/expenses/:id — delete manual expenses
GET /v1/crm-tracking/sources/:id/ad-account/authorization — Get an authorization link
GET /v1/crm-tracking/sources/:id/ad-accounts — List advertising accounts
POST /v1/crm-tracking/sources/:id/ad-account — Connect an advertising account
DELETE /v1/crm-tracking/sources/:id/ad-account — Disconnect an advertising account
GET /v1/crm-tracking/sources/:id/ad-tree — Read the advertising tree
POST /v1/crm-tracking/sources/:id/ad-expenses — Run an expense report step
GET /v1/crm-tracking/sources/:id/ad-expenses — Read report progress
Key fields
| Field | Description |
|---|---|
Fieldid |
DescriptionRecord identifier from the source list. null for an unconfigured built-in source. |
Fieldcode |
DescriptionBuilt-in source code from the source list, such as google. null for a custom source. |
Fieldkind |
DescriptionbuiltIn for a built-in source, own for a custom one. |
FieldisActive |
DescriptionWhether the source is active. Read archived records with archived=true. |
FieldrefDomains, utmSources |
DescriptionReferring domains and UTM source values. Writing a list replaces it completely. |
Before you start
- Address a source by exactly one value: numeric
idor stringcodein the path. A second address in the request is refused. - The first update of a built-in source by code creates its record. A missing identifier does not mean that the built-in source itself is absent.
- The default list includes active sources and unconfigured built-in sources.
archived=trueselects archived records. - Creation returns
data.id; an update returns the source read back after the write. Archive and restore are idempotent and return204without a body. Traces and expenses are retained. - Bitrix24 checks restrictions on built-in source changes and permissions. Names and codes in responses are account data.
Typical workflow
- Read sources and channels.
- Create a source with a name and UTM source values.
- Update the source, providing only fields to change.
- Archive the source and restore it when needed.
Limits
| Limit | Value |
|---|---|
| LimitPage size | Valuelimit: 1 to 500, default 50. |
| LimitOffset | Valueoffset: nonnegative integer, default 0. One request reads one page. |
| LimitDomain and UTM source lists | ValueUp to 100 values each, checked by Bitrix24. |
| LimitName and individual list values | ValueUp to 255 characters, checked by Bitrix24. |
| LimitSource filter | ValueOnly archived=true or false. No sorting. |
| LimitChannels | ValueNo filter or sort, with limit and offset. |