For AI agents: markdown of this page — /docs-content-en/entities/timelines/update.md documentation index — /llms.txt
Update comment
PATCH /v1/timelines/:id
Changes the text of an existing timeline comment and its set of attachments. entityType and entityId are fixed at creation (a comment cannot be moved to another record), authorId cannot be set at all — Bitrix24 derives the author from the credentials the call is made with — and id and createdAt are read-only. A request carrying any of them returns 400 READONLY_FIELD instead of silently ignoring the field.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typenumber | Requiredyes | DescriptionComment ID. To get a list of IDs — GET /v1/timelines |
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
Fieldcomment |
Typestring | Requiredyes | DescriptionNew comment text. An empty string is not accepted |
FieldFILES |
Typearray | Requiredno | DescriptionNew set of attachments — an array of [fileName, base64Content] pairs, same format as in Add comment. Replaces all previous attachments of the comment. Without the field the attachments stay unchanged; an empty array [] removes them all |
Full field list — GET /v1/timelines/fields.
Examples
curl — personal key
curl -X PATCH "https://vibecode.bitrix24.com/v1/timelines/66303" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"comment": "Follow-up: the client is ready to sign the contract next week"
}'
curl — OAuth application
curl -X PATCH "https://vibecode.bitrix24.com/v1/timelines/66303" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"comment": "Follow-up: the client is ready to sign the contract next week"
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/timelines/66303', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
comment: 'Follow-up: the client is ready to sign the contract next week',
}),
})
const { success, data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/timelines/66303', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
comment: 'Follow-up: the client is ready to sign the contract next week',
}),
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionUpdated comment object — all fields, see Comment fields |
Response example
{
"success": true,
"data": {
"id": 66303,
"entityId": 741,
"entityType": "deal",
"comment": "Follow-up: the client is ready to sign the contract next week",
"authorId": 1,
"createdAt": "2026-04-24T12:34:05.000Z"
}
}
Error response example
404 — comment not found:
{
"success": false,
"error": {
"code": "ENTITY_NOT_FOUND",
"message": "Item not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeREADONLY_FIELD |
DescriptionThe body carries a field that cannot be changed: entityType, entityId, authorId, id or createdAt |
| HTTP400 | CodeEMPTY_UPDATE_BODY |
DescriptionThe request body is empty |
| HTTP400 | CodeINVALID_FILES_SHAPE |
DescriptionThe FILES field is not an array of [[fileName, base64Content]] pairs |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionThe id in the path is not a non-negative integer |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionA comment with the specified ID does not exist |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionThe body has no comment, or it is an empty string. The message is Empty comment message |
| 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.