# crm.activity.configurable.update

URL: https://chugunov.pro/api-bitrix24/crm/timeline/activities/configurable/crm-activity-configurable-update/
Проверено на Битрикс24 REST API, обновлено 11.09.2026 (ревизия источника fb39d6c).
Источник: официальная документация Битрикс24 (bitrix-tools/b24-rest-docs, лицензия MIT, © Bitrix). Справочник независимый, официальной документацией не является.

Обновить конфигурируемое дело
Scope: `crm`
Кто может выполнять метод: любой пользователь

## Описание

Метод `crm.activity.configurable.update` вносит изменения в конфигурируемое дело. 

Вызов метода возможен только в контексте того [приложения](https://helpdesk.bitrix24.ru/examples/app.zip), которое его создало.

## Параметры

- `id` `integer` — обязательный. Целочисленный идентификатор дела, например `999`
- `fields` `array` — обязательный. Ассоциативный массив значений [полей дела](https://chugunov.pro/api-bitrix24/crm/timeline/activities/configurable/crm-activity-configurable-add/#parametr-fields) в виде структуры:
  ```json
  fields:
  {
      "typeId": 'значение',
      "completed": 'значение',
      "deadline": 'значение',
      "pingOffsets": 'значение',
      "isIncomingChannel": 'значение',
      "responsibleId": 'значение',
      "badgeCode": 'значение',
      "originatorId": 'значение',
      "originId": 'значение',
  }
  ```
- `layout` `LayoutDto` — обязательный. [Ассоциативный массив особой структуры](https://apidocs.bitrix24.ru/api-reference/crm/timeline/activities/configurable/structure/layout.html#primer), описывающий внешний вид дела в таймлайне

## Ответ

HTTP-статус: 200

```json
{
    "result": {
        "activity": {
            "id": 999,
        },
    "time": {
        "start": 1724068028.331234,
        "finish": 1724068028.726591,
        "duration": 0.3953571319580078,
        "processing": 0.13033390045166016,
        "date_start": "2025-01-21T13:47:08+02:00",
        "date_finish": "2025-01-21T13:47:08+02:00",
        "operating": 0
        }
    }
}
```

### Возвращаемые данные

- `result` `object`. Корневой элемент ответа, содержащий информацию об идентификаторе дела `id` в случае успеха. В случае неудачи вернет `null`
- `time` `time`. Информация о времени выполнения запроса

## Ошибки

HTTP-статус: 400

```json
{
    "error": "NOT_FOUND",
    "error_description": "Not found."
}
```

- `ACCESS_DENIED` — Недостаточно прав для выполнения операции
- `NOT_FOUND` — Элемент не найден
- `100` — Не заполнены обязательные поля
- `ERROR_WRONG_CONTEXT` — Вызов метода возможен только в контексте приложения
- `ERROR_WRONG_APPLICATION` — Обновить дело может только приложение, которое его создало
- `WRONG_FIELD_VALUE` — Некорректное значение поля
- `INCOMING_ACTIVITY_CAN_NOT_BE_WITH_DEADLINE` — Входящее дело не может иметь крайний срок
- `ERROR_EMPTY_LAYOUT` — Поле layout должно быть заполнено
- `FIELD_IS_REQUIRED` — В объекте структуры не передано обязательное поле
- `FIELD_IS_REDUNDANT` — В объекте структуры передано поле, которого нет в его описании
- `ENUM_FIELD` — Значение поля не входит в список допустимых, например неизвестный тип тега
- `TOO_MANY_ITEMS` — Превышено количество элементов массива, например больше двух тегов или кнопок
- `KEY_CONTAIN_WRONG_SYMBOLS` — Ключ в ассоциативном массиве структуры содержит недопустимые символы. Допустимы только латинские буквы, цифры, дефис и подчеркивание
- `WRONG_LANG` — В мультиязычном значении передан код языка, не установленного на портале

## Примеры запроса

### cURL (OAuth)

```bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"id":999,"fields":{"typeId":"CONFIGURABLE","completed":false,"deadline":"**put_current_date_time_here**","pingOffsets":[300],"isIncomingChannel":"Y","responsibleId":5,"badgeCode":"CUSTOM"},"layout":{"icon":{"code":"call-completed"},"header":{"title":"Входящий звонок"},"body":{"logo":{"code":"call-incoming"},"blocks":{"responsible":{"type":"lineOfBlocks","properties":{"blocks":{"client":{"type":"link","properties":{"text":"Сергей Востриков","bold":true,"action":{"type":"redirect","uri":"/crm/lead/details/789/"}}},"phone":{"type":"text","properties":{"value":"+7 999 888 7777"}}}}}}},"footer":{"buttons":{"startCall":{"title":"О клиенте","action":{"type":"openRestApp","actionParams":{"clientId":456}},"type":"primary"}}}},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/crm.activity.configurable.update
```

### JS (TS)

```ts
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'

declare const $b24: B24Frame

// Shape of the payload returned in result (match the "response handling" section of the page)
type ActivityUpdateResult = {
  activity: {
    id: number
  }
}

try {
  const response = await $b24.actions.v2.call.make<ActivityUpdateResult>({
    method: 'crm.activity.configurable.update',
    params: {
      id: 999,
      fields: {
        typeId: 'CONFIGURABLE',
        completed: false,
        deadline: '2025-08-01T12:00:00+02:00',
        pingOffsets: [300],
        isIncomingChannel: 'Y',
        responsibleId: 5,
        badgeCode: 'CUSTOM',
      },
      layout: {
        icon: {
          code: 'call-completed',
        },
        header: {
          title: 'Incoming call',
        },
        body: {
          logo: {
            code: 'call-incoming',
          },
          blocks: {
            responsible: {
              type: 'lineOfBlocks',
              properties: {
                blocks: {
                  client: {
                    type: 'link',
                    properties: {
                      text: 'John Smith',
                      bold: true,
                      action: {
                        type: 'redirect',
                        uri: '/crm/lead/details/789/',
                      },
                    },
                  },
                  phone: {
                    type: 'text',
                    properties: {
                      value: '+7 999 888 7777',
                    },
                  },
                },
              },
            },
          },
        },
        footer: {
          buttons: {
            startCall: {
              title: 'About client',
              action: {
                type: 'openRestApp',
                actionParams: {
                  clientId: 456,
                },
              },
              type: 'primary',
            },
          },
        },
      },
    },
    requestId: Text.getUuidRfc4122()
  })

  // The payload is available only on a successful response
  if (!response.isSuccess) {
    console.error(response.getErrorMessages().join('; '))
  } else {
    const result = response.getData()!.result
    console.info('Updated activity id:', result.activity.id)
  }
} catch (error) {
  // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
  console.error(error)
}
```

### JS (UMD)

```html
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
  async function updateConfigurableActivity() {
    try {
      // Initialize the SDK inside a Bitrix24 frame
      const $b24 = await B24Js.initializeB24Frame()

      const response = await $b24.actions.v2.call.make({
        method: 'crm.activity.configurable.update',
        params: {
          id: 999,
          fields: {
            typeId: 'CONFIGURABLE',
            completed: false,
            deadline: '2025-08-01T12:00:00+02:00',
            pingOffsets: [300],
            isIncomingChannel: 'Y',
            responsibleId: 5,
            badgeCode: 'CUSTOM',
          },
          layout: {
            icon: {
              code: 'call-completed',
            },
            header: {
              title: 'Incoming call',
            },
            body: {
              logo: {
                code: 'call-incoming',
              },
              blocks: {
                responsible: {
                  type: 'lineOfBlocks',
                  properties: {
                    blocks: {
                      client: {
                        type: 'link',
                        properties: {
                          text: 'John Smith',
                          bold: true,
                          action: {
                            type: 'redirect',
                            uri: '/crm/lead/details/789/',
                          },
                        },
                      },
                      phone: {
                        type: 'text',
                        properties: {
                          value: '+7 999 888 7777',
                        },
                      },
                    },
                  },
                },
              },
            },
            footer: {
              buttons: {
                startCall: {
                  title: 'About client',
                  action: {
                    type: 'openRestApp',
                    actionParams: {
                      clientId: 456,
                    },
                  },
                  type: 'primary',
                },
              },
            },
          },
        },
        requestId: B24Js.Text.getUuidRfc4122()
      })

      // The payload is available only on a successful response
      if (!response.isSuccess) {
        console.error(response.getErrorMessages().join('; '))
        return
      }

      const result = response.getData().result
      console.info('Updated activity id:', result.activity.id)
    } catch (error) {
      // Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
      console.error(error)
    }
  }

  document.addEventListener('DOMContentLoaded', updateConfigurableActivity)
</script>
```

### Python

```python
from datetime import datetime, timedelta

from b24pysdk.errors import BitrixAPIError, BitrixSDKException

try:
    bitrix_response = client.crm.activity.configurable.update(
        bitrix_id=999,
        fields={
            "completed": True,
            "deadline": (datetime.now() + timedelta(days=1)).isoformat(timespec="seconds"),
            "pingOffsets": [
                30,
            ],
            "responsibleId": 1,
            "badgeCode": "CUSTOM_STATUS",
        },
    ).response
    result = bitrix_response.result
    print(result)
except BitrixAPIError as error:
    print(
        "Ошибка Bitrix API",
        f"error: {error.error}",
        f"error_description: {error.error_description}",
        sep="\n",
    )
except BitrixSDKException as error:
    print(f"Ошибка Bitrix SDK: {error.message}")
except Exception as error:
    print(f"Непредвиденная ошибка: {error}")
```

### PHP

```php
try {
    $response = $b24Service
        ->core
        ->call(
            'crm.activity.configurable.update',
            [
                'id'     => 999,
                'fields' => [
                    'typeId'            => 'CONFIGURABLE',
                    'completed'         => false,
                    'deadline'          => new DateTime(),
                    'pingOffsets'       => [300],
                    'isIncomingChannel' => 'Y',
                    'responsibleId'     => 5,
                    'badgeCode'         => 'CUSTOM',
                ],
                'layout' => [
                    'icon'   => [
                        'code' => 'call-completed',
                    ],
                    'header' => [
                        'title' => 'Входящий звонок',
                    ],
                    'body'   => [
                        'logo'   => [
                            'code' => 'call-incoming',
                        ],
                        'blocks' => [
                            'responsible' => [
                                'type'       => 'lineOfBlocks',
                                'properties' => [
                                    'blocks' => [
                                        'client' => [
                                            'type'       => 'link',
                                            'properties' => [
                                                'text'   => 'Сергей Востриков',
                                                'bold'   => true,
                                                'action' => [
                                                    'type' => 'redirect',
                                                    'uri'  => '/crm/lead/details/789/',
                                                ],
                                            ],
                                        ],
                                        'phone'  => [
                                            'type'       => 'text',
                                            'properties' => [
                                                'value' => '+7 999 888 7777',
                                            ],
                                        ],
                                    ],
                                ],
                            ],
                        ],
                    ],
                    'footer' => [
                        'buttons' => [
                            'startCall' => [
                                'title'  => 'О клиенте',
                                'action' => [
                                    'type'         => 'openRestApp',
                                    'actionParams' => [
                                        'clientId' => 456,
                                    ],
                                ],
                                'type'   => 'primary',
                            ],
                        ],
                    ],
                ],
            ]
        );

    $result = $response
        ->getResponseData()
        ->getResult();

    echo 'Success: ' . print_r($result, true);
    // Нужная вам логика обработки данных
    processData($result);

} catch (Throwable $e) {
    error_log($e->getMessage());
    echo 'Error updating configurable activity: ' . $e->getMessage();
}
```

### BX24.js

```js
BX24.callMethod(
    "crm.activity.configurable.update",
    {
        id: 999,
        fields:
        {
            typeId: 'CONFIGURABLE',
            completed: false,
            deadline: new Date(),
            pingOffsets: [300],
            isIncomingChannel: 'Y',
            responsibleId: 5,
            badgeCode: 'CUSTOM',
        },
        layout:
        {
            "icon": {
                "code": "call-completed"
            },
            "header": {
                "title": "Входящий звонок"
            },
            "body": {
                "logo": {
                    "code": "call-incoming"
                },
                "blocks": {
                    "responsible": {
                        "type": "lineOfBlocks",
                        "properties": {
                            "blocks": {
                                "client": {
                                    "type": "link",
                                    "properties": {
                                        "text": "Сергей Востриков",
                                        "bold": true,
                                        "action": {
                                            "type": "redirect",
                                            "uri": "/crm/lead/details/789/"
                                        }
                                    }
                                },
                                "phone": {
                                    "type": "text",
                                    "properties": {
                                        "value": "+7 999 888 7777"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "footer": {
                "buttons": {
                    "startCall": {
                        "title": "О клиенте",
                        "action": {
                            "type": "openRestApp",
                            "actionParams": {
                                "clientId": 456
                            }
                        },
                        "type": "primary"
                    }
                }
            }
        }
    }, result => {
        if (result.error())
            console.error(result.error());
        else
            console.dir(result.data());
    }    
);
```

### PHP CRest

```php
require_once('crest.php');

$result = CRest::call(
    'crm.activity.configurable.update',
    [
        'id' => 999,
        'fields' => [
            'typeId' => 'CONFIGURABLE',
            'completed' => false,
            'deadline' => date('c'), // Используем текущую дату и время в формате ISO 8601
            'pingOffsets' => [300],
            'isIncomingChannel' => 'Y',
            'responsibleId' => 5,
            'badgeCode' => 'CUSTOM',
        ],
        'layout' => [
            'icon' => [
                'code' => 'call-completed'
            ],
            'header' => [
                'title' => 'Входящий звонок'
            ],
            'body' => [
                'logo' => [
                    'code' => 'call-incoming'
                ],
                'blocks' => [
                    'responsible' => [
                        'type' => 'lineOfBlocks',
                        'properties' => [
                            'blocks' => [
                                'client' => [
                                    'type' => 'link',
                                    'properties' => [
                                        'text' => 'Сергей Востриков',
                                        'bold' => true,
                                        'action' => [
                                            'type' => 'redirect',
                                            'uri' => '/crm/lead/details/789/'
                                        ]
                                    ]
                                ],
                                'phone' => [
                                    'type' => 'text',
                                    'properties' => [
                                        'value' => '+7 999 888 7777'
                                    ]
                                ]
                            ]
                        ]
                    ]
                ]
            ],
            'footer' => [
                'buttons' => [
                    'startCall' => [
                        'title' => 'О клиенте',
                        'action' => [
                            'type' => 'openRestApp',
                            'actionParams' => [
                                'clientId' => 456
                            ]
                        ],
                        'type' => 'primary'
                    ]
                ]
            ]
        ]
    ]
);

if (isset($result['error'])) {
    echo 'Ошибка: ' . $result['error_description'];
} else {
    echo '<PRE>';
    print_r($result['result']);
    echo '</PRE>';
}
```

### Go

```go
// client и ctx уже созданы — см. раздел «SDK для Go»
res, err := client.Core().Call(ctx, "crm.activity.configurable.update", b24.Params{
	"id": 999,
	"fields": b24.Params{
		"typeId":            "CONFIGURABLE",
		"completed":         false,
		"deadline":          "**put_current_date_time_here**",
		"pingOffsets":       []int{300},
		"isIncomingChannel": "Y",
		"responsibleId":     5,
		"badgeCode":         "CUSTOM",
	},
	"layout": b24.Params{
		"icon": b24.Params{
			"code": "call-completed",
		},
		"header": b24.Params{
			"title": "Входящий звонок",
		},
		"body": b24.Params{
			"logo": b24.Params{
				"code": "call-incoming",
			},
			"blocks": b24.Params{
				"responsible": b24.Params{
					"type": "lineOfBlocks",
					"properties": b24.Params{
						"blocks": b24.Params{
							"client": b24.Params{
								"type": "link",
								"properties": b24.Params{
									"text": "Сергей Востриков",
									"bold": true,
									"action": b24.Params{
										"type": "redirect",
										"uri":  "/crm/lead/details/789/",
									},
								},
							},
							"phone": b24.Params{
								"type": "text",
								"properties": b24.Params{
									"value": "+7 999 888 7777",
								},
							},
						},
					},
				},
			},
		},
		"footer": b24.Params{
			"buttons": b24.Params{
				"startCall": b24.Params{
					"title": "О клиенте",
					"action": b24.Params{
						"type": "openRestApp",
						"actionParams": b24.Params{
							"clientId": 456,
						},
					},
					"type": "primary",
				},
			},
		},
	},
})
if err != nil {
	return fmt.Errorf("crm.activity.configurable.update: %w", err)
}

// Ответ приходит как json.RawMessage — разберите его
// в структуру под форму ответа, показанную ниже на этой странице.
fmt.Printf("%s\n", res.Result)
```

Оригинал в официальной документации: https://apidocs.bitrix24.ru/api-reference/crm/timeline/activities/configurable/crm-activity-configurable-update.html
