For AI agents: markdown of this page — /docs-content-en/entities/crm-tracking/sources-unarchive.md documentation index — /llms.txt
This method is rolling out with
crm 26.2100.0. It is not available on every Bitrix24 account yet. If it is not available, the API returns422 METHOD_NOT_YET_AVAILABLE.
Restore an analytics source
POST /v1/crm-tracking/sources/:id/unarchive
POST /v1/crm-tracking/sources/by-code/:code/unarchive
Restores an archived end-to-end analytics source to the active sources list.
Requires the crm scope, a READWRITE key, the crm-tracking-v3 flag enabled, and the method enabled in the Bitrix24 account.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredfor the ID path | Default— | DescriptionPositive integer ID from the sources list. |
Parametercode (path) |
Typestring | Requiredfor the code path | Default— | DescriptionNonempty built-in source code from the sources list. |
Use exactly one address: :id or by-code/:code. Query parameters are not accepted. Omit the request body or send {}. Body fields are not accepted.
Examples
curl — personal key
curl -i -X POST "https://vibecode.bitrix24.com/v1/crm-tracking/sources/2/unarchive" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -i -X POST "https://vibecode.bitrix24.com/v1/crm-tracking/sources/2/unarchive" \
-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/sources/2/unarchive', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY'
}
})
console.log(res.status === 204)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/crm-tracking/sources/2/unarchive', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN'
}
})
console.log(res.status === 204)
Response
Success returns 204 No Content with an empty body. Check the HTTP status without parsing JSON.
Response example
HTTP/1.1 204 No Content
Error response example
400 — the request body contains fields:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "This action takes no body fields"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionInvalid ID, empty code, or unsupported request body. |
| HTTP400 | CodeUNKNOWN_FILTER_FIELD |
DescriptionA query parameter was supplied. |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the crm scope. |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key access mode blocks writes. |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionThe source with the specified ID was not found. |
| HTTP422 | CodeMETHOD_NOT_YET_AVAILABLE |
DescriptionThe crm-tracking-v3 flag is off or the method is not yet available in the Bitrix24 account. |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 returned an invalid response. |
Other Bitrix24 refusal codes, statuses, and messages are preserved. See Errors for shared API errors.
Known specifics
Restoring an already active source leaves its state unchanged.