لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/timeline-logs/notes.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Notes

A text note attached to a single timeline item. Each timeline item can have only one note — saving again overwrites the previous one.

Bitrix24 API: crm.timeline.note.* Scope: crm

Save note

POST /v1/timeline-logs/:id/note

Saves a note to a single timeline item. Each timeline item can have only one note — calling again with the same :id overwrites the previous text.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionID of the log entry (or another timeline item) the note is attached to

Request fields (body)

Field Type Required Default Description
FieldentityTypeId Typenumber Requiredyes Default— DescriptionType of the parent CRM entity — the one whose timeline contains the item. See Entity types
FieldentityId Typenumber Requiredyes Default— DescriptionID of the parent record
Fieldtext Typestring Requiredyes Default— DescriptionNote text. Overwrites the existing note, if any
FielditemType Typenumber Requiredno Default1 DescriptionItem type: 1 — timeline history entry (including log entries), 2 — activity (see /v1/activities)

Examples

curl — personal key

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/timeline-logs/5012/note \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entityTypeId": 2,
    "entityId": 100,
    "text": "The client usually replies within 2 days."
  }'

curl — OAuth application

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/timeline-logs/5012/note \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "entityTypeId": 2,
    "entityId": 100,
    "text": "The client usually replies within 2 days."
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/timeline-logs/5012/note', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    entityTypeId: 2,
    entityId: 100,
    text: 'The client usually replies within 2 days.',
  }),
})

const { success, data } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/timeline-logs/5012/note', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    entityTypeId: 2,
    entityId: 100,
    text: 'The client usually replies within 2 days.',
  }),
})

const { success, data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.saved Typeboolean DescriptionAlways true — operation confirmation

Response example

HTTP 201:

JSON
{
  "success": true,
  "data": { "saved": true }
}

Error response example

400 — a required field is missing:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "Required body: entityTypeId (positive int), entityId (positive int), text (string). Optional: itemType (default 1)"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionentityTypeId / entityId / text are missing or invalid, or itemType is not 1 or 2
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejected the request (for example, no item with the given id exists)
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 single call creates or updates. If the item has no note — one is created; if it does — the text is overwritten. There is no separate update method; a repeat POST with new text is the "update".

Does not validate the existence of the :id log entry. If you pass the id of a nonexistent entry — save still returns 201 + {saved: true}. The note will not actually attach — when you try to read it via GET /:id/note, the response will be 404 ENTITY_NOT_FOUND. Before save, make sure the log entry exists.

itemType: 1 works for log entries and timeline comments. Use itemType: 2 only if you are working with an activity from /v1/activities.

A note and a log entry are different concepts. A log entry is a standalone item in the timeline history (created via POST /v1/timeline-logs). A note is a short comment attached to an item. An item has at most one note.

A note cannot be retrieved without entityTypeId + entityId. Even though a note is tied to a specific itemId, B24 requires the parent entity context when reading and deleting. Keep these parameters from the time of creation.

See also