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

Delete a pipeline

DELETE /v1/deal-categories/:id

Deletes a sales pipeline by ID. The main pipeline (ID 0) cannot be deleted. On deletion, all deals are moved to the main pipeline.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionPipeline ID. List: GET /v1/deal-categories

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/deal-categories/3" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/deal-categories/3" \
  -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/deal-categories/3', {
  method: 'DELETE',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

if (res.status === 204) {
  console.log('Pipeline deleted')
}

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/deal-categories/3', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

if (res.status === 204) {
  console.log('Deleted')
}

Response

On successful deletion an HTTP status 204 No Content with an empty body is returned — success is determined by the status.

Response example

HTTP/1.1 204 No Content

Error response example

404 — pipeline not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Not found."
  }
}

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionPipeline not found
HTTP422 CodeBITRIX_ERROR DescriptionID is invalid or an attempt to delete the main pipeline (ID 0)
HTTP403 CodeSCOPE_DENIED DescriptionThe API key lacks the crm scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing

Full list of errors — Errors.

See also