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

Delete a pipeline

DELETE /v1/categories/:entityTypeId/:id

Deletes a pipeline of the specified CRM entity type by identifier. A deleted pipeline cannot be restored through the API — create a new one if needed.

Parameters

Parameter Type Required Description
entityTypeId (path) number yes CRM entity type ID. 2 for deals, 31 for invoices, for a smart process — the value from GET /v1/smart-processes
id (path) number yes Pipeline identifier

Examples

In the examples entityTypeId = 2 (deals), id = 15 — replace with your values.

curl — personal key

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

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/categories/2/15" \
  -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/categories/2/15', {
  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/categories/2/15', {
  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 is returned with an empty body — success is checked by the status.

Response example

HTTP/1.1 204 No Content

Error response example

404 — pipeline with the specified id not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Item not found"
  }
}

Errors

HTTP Code Description
404 ENTITY_NOT_FOUND Pipeline with the specified id not found — message Item not found
404 ENTITY_NOT_FOUND entityTypeId does not match an existing type — message Smart process not found
403 SCOPE_DENIED API key lacks the crm scope
401 TOKEN_MISSING API key has no configured tokens

Full list of common API errors — Errors.

See also