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. Pass only the comment field — it is the only writable one. 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 a silent no-op.

Frequently updated fields

Field Type Description
comment string New comment text

Full field list — GET /v1/timelines/fields.

Examples

curl — personal key

Terminal
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

Terminal
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

javascript
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

javascript
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
data object Updated comment object — all fields, see Comment fields

Response example

JSON
{
  "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:

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

Errors

HTTP Code Description
400 READONLY_FIELD The body carries a field that cannot be changed: entityType, entityId, authorId, id or createdAt
404 ENTITY_NOT_FOUND A comment with the specified ID does not exist
403 SCOPE_DENIED The API key lacks the crm scope
401 TOKEN_MISSING The API key has no configured tokens

Full list of common API errors — Errors.

See also