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

Complete a task

POST /v1/bizproc-tasks/:id/complete

This is a real approval, not a test run. approve, reject, ok, cancel are sent as 1, 2, 3, 4. Bitrix24 checks which decisions the task type allows. Re-read the list after a timeout: a retry may be refused because the task is already completed.

Bitrix24 API: bizproc.task.complete Scope: bizproc

Parameters

Parameter Type Required Description
Parameterid (path) Typeinteger Requiredyes DescriptionPositive task ID from the task list

Request fields (body)

Field Type Required Description
Fieldstatus Typestring Requiredyes DescriptionDecision: approve, reject, ok or cancel
Fieldcomment Typestring Requiredno DescriptionDecision comment. Required when the task form demands one
Fieldfields Typeobject Requiredno DescriptionValues keyed by field code from the task's parameters.Fields[].Id in the task list. A file is [name, base64]. Request body limit: 1 MiB

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/bizproc-tasks/42/complete" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"approve","comment":"VIBE-PROBE"}'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/bizproc-tasks/42/complete" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"status":"approve","comment":"VIBE-PROBE"}'

JavaScript — personal key

javascript
const response = await fetch("https://vibecode.bitrix24.com/v1/bizproc-tasks/42/complete", {
  method: "POST",
  headers: { "X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"status":"approve","comment":"VIBE-PROBE"})
});
console.log(await response.json());

JavaScript — OAuth application

javascript
const response = await fetch("https://vibecode.bitrix24.com/v1/bizproc-tasks/42/complete", {
  method: "POST",
  headers: { "X-Api-Key": "YOUR_APP_KEY", "Authorization": "Bearer USER_SESSION_TOKEN", "Content-Type": "application/json" },
  body: JSON.stringify({"status":"approve","comment":"VIBE-PROBE"})
});
console.log(await response.json());

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue
Fielddata Typeboolean Descriptiontrue, only if Bitrix24 returned true

Response example

JSON
{"success":true,"data":true}

Error response example

404 — no task with this id among the current user's tasks:

JSON
{"success":false,"error":{"code":"ENTITY_NOT_FOUND","message":"Task not found or inaccessible"}}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS Descriptionid is not a positive integer, status is not in the list, comment is not a string, fields is not an object, or the body contains other fields
HTTP401 CodeTOKEN_MISSING DescriptionNo Bitrix24 credentials
HTTP403 CodeSCOPE_DENIED DescriptionMissing bizproc scope
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionBitrix24 denies access
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionKey blocks writes
HTTP404 CodeENTITY_NOT_FOUND DescriptionTask not found for the current user
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 business refusal. The message is preserved with secrets removed
HTTP502 CodeBITRIX_RESPONSE_INVALID DescriptionUnexpected response shape or action result

Common refusals and limits: API errors.

See also