For AI agents: markdown of this page — /docs-content-en/entities/leads/products-delete.md documentation index — /llms.txt
Delete a product from a lead
DELETE /v1/leads/:id/products/:rowId
Deletes a single product row from a lead by row ID. A deleted row cannot be restored via the API — add a new one if needed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionLead ID. List: GET /v1/leads |
ParameterrowId (path) |
Typenumber | Requiredyes | DescriptionProduct row ID, not the catalog productId. List: GET /v1/leads/:id/products |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/leads/1001333/products/2377" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/leads/1001333/products/2377" \
-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/leads/1001333/products/2377', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
if (res.status === 204) {
console.log('Product removed from the lead')
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/leads/1001333/products/2377', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
if (res.status === 204) {
console.log('Deleted')
}
Response
On success, the API returns HTTP 204 No Content with an empty body — check the status code to confirm success.
Response example
HTTP/1.1 204 No Content
Error response example
404 — no product row with this rowId:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Item not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_ROW_ID |
DescriptionrowId in the path is not a positive integer. The message is Product row ID must be a positive integer |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionNo product row with this rowId. The message is Item not found |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionA row with this rowId exists but belongs to another CRM record, not to lead id, or has no owner and fails the check. The message is Product row not found |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is read-only — see access rights |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionAPI key lacks the crm scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionAPI key has no configured tokens |
Full list of common API errors — Errors.