API reference
Notes and timeline
Every lead, contact and company has a timeline: messages, notes, calls, tasks, stage moves, payments and field changes, newest first.
Read a timeline
/v1/timelineleads:read or contacts:read or companies:read| Parameter | Description |
|---|---|
entity_type | lead, contact or company (required) |
entity_id | The record's id (required) |
kinds | Optional comma-separated filter: message, note, task, call, change, stage, payment, automation, app, system, email |
limit, cursor | Up to 250 per page, see Pagination |
Needs the read scope of the record type (leads:read for a lead's timeline).
{
"data": [
{
"id": "note_01j8z8c4d6e8f0g2h4j6k8m0n2",
"kind": "note",
"entity_type": "lead",
"entity_id": "lead_01j8z7c2d4f6g8h0j2k4m6n8p0",
"actor": { "type": "api_key", "id": "key_01j8z6q3m7e2x9c4v5b6n7p8r0" },
"ref_id": null,
"data": { "text": "Client asked for delivery on Friday.", "mentions": [] },
"pinned": false,
"occurred_at": "2026-09-27T09:50:00Z",
"editable": false,
"deletable": true
}
],
"next_cursor": null
}data depends on kind: for a note it has text and mentions, for a change field, label, from and to. editable and deletable say whether this caller may change the item.
Add a note
/v1/notesnotes:writecurl https://api.kweko.uz/v1/notes \
-H "Authorization: Bearer $KWEKO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"entity_type": "lead", "entity_id": "lead_01j8z7c2d4f6g8h0j2k4m6n8p0",
"text": "Client asked for delivery on Friday."}'mentions (member ids) notifies those members. The record must be visible to the key (its read scope). Answers with the timeline item and sends note.created.
/v1/notes/{id}/pinnotes:write/v1/notes/{id}/pinnotes:writePin a note to the top of the timeline, or unpin it.
/v1/notes/{id}leads:write or contacts:write or companies:writeDeleting a note needs the write scope of its record. Only the member who wrote a note can edit it (PATCH /v1/notes/{id}, within 24 hours), so API keys cannot edit notes.