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

GET/v1/timelineleads:read or contacts:read or companies:read
ParameterDescription
entity_typelead, contact or company (required)
entity_idThe record's id (required)
kindsOptional comma-separated filter: message, note, task, call, change, stage, payment, automation, app, system, email
limit, cursorUp to 250 per page, see Pagination

Needs the read scope of the record type (leads:read for a lead's timeline).

Response
{
  "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

POST/v1/notesnotes:write
Request
curl 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.

POST/v1/notes/{id}/pinnotes:write
DELETE/v1/notes/{id}/pinnotes:write

Pin a note to the top of the timeline, or unpin it.

DELETE/v1/notes/{id}leads:write or contacts:write or companies:write

Deleting 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.