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

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

Timeline entries

Create, read, and delete log entries in a CRM entity's timeline. A log entry is a structured event that appears in a card's history (deal, lead, contact, company, smart process) as a message from an application with a title and text.

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

Create an entry

POST /v1/timeline-logs

Creates a new entry in a CRM entity's log (timeline). The entry will appear in the card history of a deal, lead, contact, company, or smart process as a message from an application.

Request fields (body)

Field Type Required Description
FieldentityTypeId Typenumber Requiredyes DescriptionParent CRM entity type: 1=lead, 2=deal, 3=contact, 4=company, 7=quote, 14=order, 31=invoice, ≥128=smart process. See Entity types
FieldentityId Typenumber Requiredyes DescriptionParent record ID. Source: GET /v1/deals, GET /v1/leads, GET /v1/contacts, GET /v1/companies, GET /v1/items/:entityTypeId
Fieldtitle Typestring Requiredyes DescriptionEntry title. Displayed in bold in the timeline card
Fieldtext Typestring Requiredyes DescriptionMain entry text. An empty string is allowed ("")
FieldiconCode Typestring Requiredno DescriptionIcon code next to the title. Example values: info, circle-check, document, link, unlink, view, stage-change, sum, store, relation, IM, call, call-incoming, call-completed. Defaults to the empty string "" (no icon)

Examples

curl — personal key

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/timeline-logs \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entityTypeId": 2,
    "entityId": 100,
    "title": "AI agent processed the request",
    "text": "Customer data analyzed. Recommendation: Enterprise plan."
  }'

curl — OAuth application

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/timeline-logs \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "entityTypeId": 2,
    "entityId": 100,
    "title": "AI agent processed the request",
    "text": "Customer data analyzed. Recommendation: Enterprise plan."
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/timeline-logs', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    entityTypeId: 2,
    entityId: 100,
    title: 'AI agent processed the request',
    text: 'Customer data analyzed. Recommendation: Enterprise plan.',
  }),
})

const { success, data } = await res.json()
console.log('Log ID:', data.id)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/timeline-logs', {
  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,
    title: 'AI agent processed the request',
    text: 'Customer data analyzed. Recommendation: Enterprise plan.',
  }),
})

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionThe created log entry
Fielddata.id Typenumber DescriptionID of the created log entry
Fielddata.created Typedatetime DescriptionCreation date, ISO 8601 with the Bitrix24 account timezone
Fielddata.authorId Typenumber DescriptionAuthor ID. When created via the API, it matches the API key's user
Fielddata.title Typestring DescriptionTitle
Fielddata.text Typestring DescriptionEntry text
Fielddata.iconCode Typestring DescriptionIcon code. Always present: the empty string "" if it was not passed on creation

Response example

JSON
{
  "success": true,
  "data": {
    "id": 5012,
    "created": "2026-04-27T10:00:00+00:00",
    "authorId": 1,
    "title": "AI agent processed the request",
    "text": "Customer data analyzed. Recommendation: Enterprise plan.",
    "iconCode": ""
  }
}

Error response example

400 — a required field is missing:

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

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionentityTypeId, entityId, title, text not provided or invalid, or iconCode type is not a string
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 rejected the request, for example, because the parent entity does not exist
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the crm scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only — see access rights
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

Full list of common API errors — Errors.

Known specifics

Only the application that created an entry can delete it. Bitrix24 forbids deleting a log entry through an application other than the one that created it. Personal keys (vibe_api_*) rotate OAuth tokens, so DELETE through them always returns 403 CROSS_APP_DELETE_FORBIDDEN. For the full "create → delete via API" lifecycle, use an OAuth application (vibe_app_* + Authorization: Bearer ...). See Delete an entry.

The text field is required but allows an empty string. Bitrix24 accepts text: "", and the title is still displayed. To leave an entry without a description, pass an empty string, not null.

See also