For AI agents: markdown of this page — /docs-content-en/automation/workflows/terminate.md documentation index — /llms.txt

Terminate a workflow

DELETE /v1/workflows/:id

Terminates a running workflow instance. By default it performs a soft termination — it waits for the current step to finish. With the ?force=true parameter it forcibly aborts the process immediately.

Parameters

Parameter In Type Required Description
Parameterid Inpath Typestring Requiredyes DescriptionWorkflow instance identifier. Source: GET /v1/workflows, the id field
Parameterforce Inquery Typestring Requiredno Descriptiontrue — force termination without waiting for the current step
Parameterstatus Inquery Typestring Requiredno DescriptionTermination reason — arbitrary text, passed through to Bitrix24

Examples

curl — personal key

Terminal
curl -X DELETE https://vibecode.bitrix24.com/v1/workflows/69f0c2d5ade389.22457798 \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE https://vibecode.bitrix24.com/v1/workflows/69f0c2d5ade389.22457798 \
  -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/workflows/69f0c2d5ade389.22457798',
  { method: 'DELETE', headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
)
if (res.status === 204) {
  console.log('Workflow terminated')
}

JavaScript — OAuth application

javascript
const res = await fetch(
  'https://vibecode.bitrix24.com/v1/workflows/69f0c2d5ade389.22457798',
  {
    method: 'DELETE',
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
    },
  }
)
if (res.status === 204) {
  console.log('Workflow terminated')
}

Response

On success it returns HTTP status 204 No Content with an empty body. The success signal is the response code, not the body.

Response example

HTTP/1.1 204 No Content

Error response example

404 — instance not found:

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

Errors

HTTP Code Description
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header was not provided
HTTP401 CodeINVALID_API_KEY DescriptionThe key is not recognized — no such key exists on the platform
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no connected Bitrix24 tokens
HTTP401 CodeTOKEN_EXPIRED DescriptionThe OAuth user session expired — re-authorize via /v1/oauth/authorize
HTTP403 CodeSCOPE_DENIED DescriptionThe key is missing the bizproc scope
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionBitrix24 denied access
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo workflow instance with the given id was found
HTTP409 CodeBIZPROC_MODULE_NOT_ENABLED DescriptionBusiness Processes are not available on the account: the module is not included in the plan, or it is switched off in account settings. Ask an account administrator to enable Business Processes — until then the method answers the same way for any number of retries
HTTP429 CodeRATE_LIMITED DescriptionRequest limit exceeded. Retry in 1–2 seconds
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionBitrix24 is unavailable

Full list of common API errors — Errors.

See also