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

Delete a template

DELETE /v1/bizproc-templates/:id

Deletes a business process template uploaded by the same application. A deleted template cannot be restored through the API — upload the file again if needed.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionTemplate identifier. Source: GET /v1/bizproc-templates

Examples

Only an authorization key can delete templates — 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-templates/1215" \
  -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-templates/1215', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

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

Response

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

Response example

http
HTTP/1.1 204 No Content

Error response example

422 — the template was uploaded by another application or created in the Bitrix24 business process designer:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "You can delete ONLY templates created by current application"
  }
}

Errors

HTTP Code Description
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 DescriptionThe template was uploaded by another application — message You can delete ONLY templates created by current application
HTTP422 CodeBITRIX_ERROR DescriptionThe template with the given id does not exist or has already been deleted — message Workflow template not found., the b24Code field contains ERROR_TEMPLATE_NOT_FOUND
HTTP403 CodeOAUTH_REQUIRED DescriptionThe request was sent with an API key. Only an authorization key can delete templates
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

On a Bitrix24-side error the error object gains a b24Code field — the machine-readable reason code.

The full list of common API errors — Errors.

Known specifics

Only your own templates can be deleted. You can delete a template uploaded by the same application whose authorization key is used to send the request. Deleting a template created in the Bitrix24 business process designer or uploaded by another application returns 422, and the template remains in your Bitrix24 account.

See also