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

Update activity

PATCH /v1/activity-configurable/:id

Overwrites a configurable activity. fields and layout are passed in full — the method replaces the activity rather than updating individual fields. Unset values are reset.

Parameters

Parameter Type Req. Description
id (path) number yes Activity ID. Obtained on creation

Request fields (body)

Field Type Req. Description
fields object yes Activity fields
fields.typeId string no Activity type. Defaults to CONFIGURABLE
fields.completed boolean no Activity is closed. Accepts true/false, 1/0, Y/N
fields.deadline string no Due date, ISO 8601. Incompatible with fields.isIncomingChannel
fields.pingOffsets number[] no Offsets in minutes relative to fields.deadline at which reminders are generated
fields.isIncomingChannel boolean no Activity created from an incoming channel. Accepts true/false, 1/0, Y/N
fields.responsibleId number no ID of the responsible employee. List: GET /v1/users
fields.badgeCode string no Activity badge code on the kanban
fields.originatorId string no ID of the external data source
fields.originId string no ID of the record in the external source
layout object yes Activity styling
layout.icon.code string yes Activity icon code
layout.header.title string yes Activity title
layout.body.logo.code string yes Logo code in the body. Bitrix24 rejects a body without logo
layout.body.blocks object no Named body blocks
layout.footer.buttons object no Footer buttons

A block in layout.body.blocks has a type and properties. Main block types:

  • text — value
  • link — link with an action
  • lineOfBlocks — a row of nested blocks
  • withTitle — block with a caption

The action of links and buttons is defined by the type field:

  • redirect — navigation to the address from the uri field
  • openRestApp — opening the application with the actionParams parameters
  • restEvent — an event to the application by id, for menu items

Examples

Examples are given only for an OAuth application.

curl — OAuth application

Terminal
curl -X PATCH https://vibecode.bitrix24.com/v1/activity-configurable/8053 \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fields": { "typeId": "CONFIGURABLE", "completed": true, "responsibleId": 5 },
    "layout": {
      "icon": { "code": "call-completed" },
      "header": { "title": "Call handled" },
      "body": { "logo": { "code": "call-incoming" }, "blocks": {} },
      "footer": { "buttons": {} }
    }
  }'

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/activity-configurable/8053', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    fields: { typeId: 'CONFIGURABLE', completed: true, responsibleId: 5 },
    layout: {
      icon: { code: 'call-completed' },
      header: { title: 'Call handled' },
      body: { logo: { code: 'call-incoming' }, blocks: {} },
      footer: { buttons: {} },
    },
  }),
})

const { data } = await res.json()

Response fields

Field Type Description
success boolean Always true on success
data.activity.id number ID of the updated activity

Response example

JSON
{
  "success": true,
  "data": { "activity": { "id": 8053 } }
}

Error response example

404 — activity not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Item not found"
  }
}

Errors

HTTP Code Description
400 VALIDATION_ERROR id in the path is not a number, or fields or layout not provided
404 ENTITY_NOT_FOUND An activity with the given id does not exist
422 BITRIX_ERROR Bitrix24 rejected the request: activity created by another application ERROR_WRONG_APPLICATION, layout.body.logo not filled, empty layout
403 SCOPE_DENIED The key lacks the crm scope
401 TOKEN_MISSING The authorization key was passed without a session token in the Authorization: Bearer header

Full list of common API errors — Errors.

Known specifics

Only in application context. An authorization key vibe_app_* with a session token in the Authorization: Bearer header is required. A personal API key vibe_api_* is rejected by Bitrix24 with ERROR_WRONG_CONTEXT.

Only the author application updates. Only the application that created an activity can modify it. Bitrix24 rejects another application's activity with ERROR_WRONG_APPLICATION.

See also