For AI agents: markdown of this page — /docs-content-en/entities/activities/update.md documentation index — /llms.txt
Update activity
PATCH /v1/activities/:id
Updates fields of an existing activity. Pass only the fields you want to change. For the full list, see the field reference.
The activity type typeId is set at creation only — a request that includes it returns 400 READONLY_FIELD. To change the type, create a new activity via POST /v1/activities and delete the previous one.
The deadline deadline is not sent in the body — a request that includes it returns 400 READONLY_FIELD. To change the activity deadline, use POST /v1/activities/:id/deadline. To shift it by a given amount of time, use POST /v1/activities/:id/postpone.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionActivity ID. List: GET /v1/activities |
Request fields (body)
All body fields are optional.
| Field | Type | Description |
|---|---|---|
Fieldcompleted |
Typeboolean | DescriptionMark as completed |
Fieldsubject |
Typestring | DescriptionSubject |
FieldresponsibleId |
Typenumber | DescriptionResponsible person. List: GET /v1/users |
Fieldpriority |
Typenumber | DescriptionPriority: 1 — low, 2 — medium, 3 — high |
Fielddescription |
Typestring | DescriptionDescription |
Examples
curl — personal key
curl -X PATCH "https://vibecode.bitrix24.com/v1/activities/3894" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"completed": true,
"subject": "Project meeting (completed)"
}'
curl — OAuth application
curl -X PATCH "https://vibecode.bitrix24.com/v1/activities/3894" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"completed": true,
"subject": "Project meeting (completed)"
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/activities/3894', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
completed: true,
subject: 'Project meeting (completed)',
}),
})
const { success, data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/activities/3894', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
completed: true,
subject: 'Project meeting (completed)',
}),
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionUpdated activity object with all fields — see Activity fields |
Response example
The main fields are shown. Full list: Activity fields.
{
"success": true,
"data": {
"id": 3894,
"typeId": 1,
"ownerTypeId": 3,
"ownerId": 17,
"subject": "Project meeting (completed)",
"completed": true,
"status": 2,
"responsibleId": 1,
"startTime": "2026-10-21T07:00:00.000Z",
"endTime": "2026-10-21T08:00:00.000Z",
"updatedAt": "2026-10-19T13:36:49.000Z"
}
}
Error response example
404 — activity not found:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Activity is not found."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionActivity not found |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionThe key's user has no permission for this activity in Bitrix24 |
| HTTP400 | CodeREADONLY_FIELD |
DescriptionThe body contains a field this request cannot change: typeId is set at creation only, the deadline deadline is changed by POST /v1/activities/:id/deadline, and id, authorId, editorId, associatedEntityId are read-only |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionA field value does not match its declared type — for example, a string instead of a number in priority |
| HTTP400 | CodeINVALID_PARAMS |
Descriptionid is not a non-negative integer. Message: id must be a non-negative integer |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is read-only — see access rights |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key lacks the crm scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
Full list of common API errors — Errors.