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

Complete an activity

POST /v1/activities/:id/complete

Marks a CRM activity as completed: a call, meeting, task or email. Call it when the work on the activity is done.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionActivity ID, a positive integer. List: GET /v1/activities

No request body is sent. Send the request without a body and without the Content-Type header, or pass an empty object {} with the Content-Type: application/json header.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/activities/3894/complete" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/activities/3894/complete" \
  -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/activities/3894/complete', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Activity completed:', data.completed)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/activities/3894/complete', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue on a successful request
Fielddata Typeobject DescriptionThe activity, read back after completion. All fields: Activity fields
Fielddata.completed Typeboolean Descriptiontrue — the activity is completed
Fielddata.status Typenumber DescriptionActivity status: 2 — completed

Response example

The main fields are shown. Full list: Activity fields.

JSON
{
  "success": true,
  "data": {
    "id": 3894,
    "ownerTypeId": 3,
    "ownerId": 17,
    "subject": "Call the client",
    "completed": true,
    "status": 2,
    "startTime": "2026-10-23T12:00:00.000Z",
    "endTime": "2026-10-23T12:15:00.000Z",
    "deadline": "2026-10-23T12:00:00.000Z",
    "updatedAt": "2026-10-19T11:48:07.000Z"
  }
}

Error response example

404 — no activity with this ID:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Activity does not exist"
  }
}

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo activity with this id
HTTP400 CodeINVALID_PARAMS Descriptionid is not a positive integer. Message: id must be a positive integer
HTTP400 CodeINVALID_PARAMS DescriptionA field was passed in the body. Message: Unsupported action field
HTTP400 CodeFST_ERR_CTP_EMPTY_JSON_BODY DescriptionThe Content-Type: application/json header was sent with an empty body. Send {} or remove the header
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 refused to complete the activity. The refusal text is in message
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionThe key's user has no permission for this activity in Bitrix24
HTTP502 CodeBITRIX_ERROR DescriptionThe activity has no valid binding to a CRM entity. Message: Activity has no valid CRM owner
HTTP502 CodeBITRIX_ERROR DescriptionThe completion was sent, but the activity could not be read back. Message: Activity could not be read back. Check the activity state with GET /v1/activities/:id
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only — see access rights
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

Full list of common API errors: Errors.

Known specifics

Completing again returns no error. Calling the method on an already completed activity returns 200 and returns the activity unchanged: completed stays true, updatedAt does not change. There is no need to check the activity state before the call.

See also