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
id (path) number yes Pipeline ID

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
404 ENTITY_NOT_FOUND Pipeline not found
422 BITRIX_ERROR ID is invalid or an attempt to delete the main pipeline (ID 0)
403 SCOPE_DENIED The API key lacks the crm scope
401 TOKEN_MISSING No API key provided

Full list of errors — Errors.

See also