For AI agents: markdown of this page — /docs-content-en/entities/automated-solutions/update.md documentation index — /llms.txt
Update workspace
PATCH /v1/automated-solutions/:id
Updates a CRM digital workspace — this call binds smart process types to the workspace and unbinds them from it.
Fields are passed flat at the JSON root — without a fields wrapper.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionWorkspace ID. List: GET /v1/automated-solutions |
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
Fieldtitle |
Typestring | Requiredno | DescriptionNew workspace name |
FieldtypeIds |
Typenumber[] | Requiredno | DescriptionThe full set of IDs of the smart process types that must be bound to the workspace — the type id field from GET /v1/smart-processes, not its entityTypeId. The array you send replaces the current set entirely. If the typeIds key is omitted, the set does not change; an empty array [] unbinds all types. A value that matches no type of the portal (an entityTypeId included) is rejected with 400 UNKNOWN_TYPE_ID before the portal is called, when the portal's type list is available — see Errors. Current set: GET /v1/automated-solutions/:id |
Examples
curl — personal key
curl -X PATCH "https://vibecode.bitrix24.com/v1/automated-solutions/11" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"typeIds": [63]
}'
curl — OAuth application
curl -X PATCH "https://vibecode.bitrix24.com/v1/automated-solutions/11" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"typeIds": [63]
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/automated-solutions/11', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
typeIds: [63],
}),
})
const { success, data } = await res.json()
console.log('Bound types:', data.typeIds)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/automated-solutions/11', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
typeIds: [63],
}),
})
const { success, data } = await res.json()
console.log('Bound types:', data.typeIds)
Response fields
The response contains the whole workspace, not only the fields you sent.
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on a successful update |
Fielddata.id |
Typenumber | DescriptionWorkspace ID |
Fielddata.title |
Typestring | DescriptionWorkspace name after the update |
Fielddata.typeIds |
Typenumber[] | DescriptionIDs of the smart process types actually bound to the workspace after the update |
Response example
{
"success": true,
"data": {
"id": 11,
"title": "Procurement",
"typeIds": [63]
}
}
Error response example
404 — no workspace with this id:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Item not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionNo workspace with this id |
| HTTP400 | CodeUNKNOWN_TYPE_ID |
DescriptiontypeIds contains a value that matches no smart process type of the portal — an entityTypeId instead of the id, for example. The request is rejected before the portal is called, when the portal's type list is available; error.details.unknown names such values and error.details.knownIds the available IDs |
| HTTP400 | CodeINVALID_PARAMS |
DescriptiontypeIds was sent as an object: that shape names no type at all |
| HTTP400 | CodeREADONLY_FIELD |
DescriptionThe body contains id — a read-only field. The request is rejected before it reaches the Bitrix24 portal |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionThe workspace was installed by a Marketplace application and is locked against changes, or the key owner lacks permissions. The response has no b24Code field; the hint in error.hint names both causes |
| HTTP403 | CodeB24_AUTOMATED_SOLUTION_LIMIT_EXCEEDED |
DescriptionThe portal has reached its limit on the number of workspaces; in the Bitrix24 cloud the limit depends on the plan. Retrying the request does not help. error.hint suggests what to do: move the types and delete an empty workspace, or upgrade the plan |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is missing |
| 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
A smart process type belongs to only one workspace. If a type in typeIds is already bound to another workspace, the call moves it: the type disappears from the previous workspace's set without a separate request. This is how types are moved before a workspace is deleted.
A typeIds value with no matching type rejects the request. A value that matches no smart process type of the portal, including an entityTypeId passed instead of the id, is answered with 400 UNKNOWN_TYPE_ID before the portal is called: Bitrix24 would drop such a value in silence, and because the set is replaced entirely, the call would unbind every type the request does not repeat. The response lists the unknown values in error.details.unknown and the available IDs in error.details.knownIds; when an entityTypeId was sent, it names the id of the matching type. To unbind every type deliberately, send an empty array []. The check relies on the portal's type list: if it is unavailable or incomplete, the write proceeds unchecked — in that case compare typeIds in the response.