Update Process Element rpa.item.update
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Scope:
rpaWho can execute the method: a user allowed to edit stage items or change the item stage, or the element author allowed to start the workflow
DEPRECATED
The development of this method has been halted. Please use Smart scripts as an alternative functionality.
This method updates the element with the identifier id in the process with the identifier typeId.
The method checks permissions in the following order.
-
The user must be able to view the element. All Bitrix24 employees can view elements; they are not available to extranet users. Without view access, the method returns an error and does not return the element data. The error code depends on the request:
RPA_ITEM_MOVE_ACCESS_DENIED— the request containsstageIdRPA_ITEM_MODIFY_ACCESS_DENIED— the request contains custom fieldsRPA_ITEM_VIEW_ACCESS_DENIED— in all other cases
-
If the request contains
stageId, the method checks the permission to change the stage. The user has it if any of the following is true:- the user is listed in the "Users allowed to change item stage" setting of the current stage
- the user is the element author and is listed in "Users allowed to start the workflow"
- the user is the element author, and the element is at the first stage
-
If the request changes custom field values, the method checks the permission to edit the element. The user has it if any of the following is true:
- the user is listed in the "Users allowed to edit stage items" setting of the current stage
- the user is the element author and is listed in "Users allowed to start the workflow". In this case, the user can edit their own element at any stage
A Bitrix24 administrator passes all checks. The permission to start the workflow does not allow editing or moving other users' elements.
If the request does not change field values, for example, it passes the current values, the edit permission is not checked.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
typeId |
Process identifier |
|
id |
Element identifier |
|
fields* |
Object containing values for custom fields of the element |
Parameter fields
|
Name |
Description |
|
stageId |
Stage identifier |
|
UF_RPA_... |
Values for custom fields. The format for passing values depends on the field type |
Code Examples
-
Upload a new file to replace the old one (non-multiple field)
To replace a file in a non-multiple field, simply upload the new file. The old one will be automatically deleted.
JS{ "fields": { "UF_RPA_1_1585069397": [ "myfile.pdf", "...base64_encoded_file_content..." ] } } -
Remove the value of a custom file field
To do this, simply pass an empty string
''instead of the value. -
Keep the value of a non-multiple file field unchanged
The simplest option is to not include the key for this field in
fields. However, if you need to pass it without changing it, you should provide a list where the keyidcontains the file identifier.JS{ "fields": { "UF_RPA_1_1585069397": { "id": 433 } } }Warning
If a value different from the current one is passed in
id, the field value will be reset and the file will be deleted. -
Working with a multiple file field
The value of a multiple field is an array. Each element of the array follows the same rules as for non-multiple values.
-
Partial overwrite of a multiple file field value
For example, currently the multiple file field contains the values
[12, 255, 44].You need to keep files
12and44, and upload a new file instead of255.The request should look as follows:
JS{ "fields": { "UF_RPA_1_1585069397": [ { "id": 12 }, { "id": 44 }, [ "myNewFile.pdf", "...base64_encoded_file_content..." ] ] } }
Error Handling
HTTP Status: 400
{
"error": "RPA_ITEM_MODIFY_ACCESS_DENIED",
"error_description": "You do not have permission to edit items in stage Approval"
}
|
Name |
Description |
|
error |
String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only |
|
error_description |
Error message for the developer. Do not show it to the end user without processing |
Possible Error Codes
|
Status |
Code |
Description |
Value |
|
|
|
You don't have permission to view this item |
The user cannot view the element, and the request contains neither |
|
|
|
You do not have permission to change item stage from stage #STAGE# |
No permission to change the element stage. If the user cannot view the element, the error description is "You don't have permission to view this item" |
|
|
|
You do not have permission to edit items in stage #STAGE# |
No permission to edit the element. If the user cannot view the element, the error description is "You don't have permission to view this item" |
Statuses and System Error Codes
HTTP Status: 4xx, 5xx
The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit |
|
|
|
The request contains no authorization data: neither an access token nor a webhook code was passed |
|
|
|
Methods are called over the HTTPS protocol only |
|
|
|
The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support |
|
|
|
REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — |
|
|
|
No active webhook with the specified user identifier and secret code was found |
|
|
|
No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope |
|
|
|
The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with |
|
|
|
The access token has expired |
|
|
|
The application is installed, but the Bitrix24 administrator has granted access to it only to specific users |
|
|
|
The public part of the site is closed. To open it on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |