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

Delete an automation rule

DELETE /v1/bizproc-robots/:code

Deletes a registered automation rule by code. A deleted automation rule cannot be restored through the API — register a new one if needed.

Parameters

Parameter Type Required Description
Parametercode (path) Typestring Requiredyes DescriptionThe automation rule code set at registration. Source: GET /v1/bizproc-robots

Examples

Only an authorization key can delete an automation rule — both examples send the authorization key and the Authorization: Bearer header. The session token is issued by OAuth authorization, is valid for 24 hours, and cannot be renewed — Passing the key.

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/bizproc-robots/deal_notify" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — OAuth application

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

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

Response

On successful deletion, the API returns HTTP status 204 No Content with an empty body — check the status code to confirm success.

Response example

http
HTTP/1.1 204 No Content

Error response example

422 — an automation rule with the given code was not found:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Activity or Robot not found!"
  }
}

Errors

HTTP Code Description
HTTP403 CodeOAUTH_REQUIRED DescriptionThe request was sent with an API key. Only an authorization key can delete automation rules
HTTP401 CodeTOKEN_MISSING DescriptionAuthorization key without the Authorization: Bearer header
HTTP401 CodeWRONG_AUTH_SCHEME DescriptionThe authorization key was sent in the Authorization: Bearer header. The key goes in X-Api-Key, while Authorization: Bearer carries the session token
HTTP401 CodeINVALID_SESSION DescriptionThe session token has expired or is invalid — authorize again
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the bizproc scope
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
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 did not find an automation rule with the given code or rejected the deletion — the reason is in error.message

The full list of common API errors — Errors.

See also