This page documents the canonical HTTP contract. Switch to the CLI example when you want the operator workflow.
Notes and journals are independent, organization-shared resources. Identity, organization, author, timestamps, and harness provenance are server-owned. Developer keys need the endpoint scope; notes:write does not grant notes:read. These calls complete synchronously and do not consume research credits or start scheduled work.
For longitudinal research, create a journal once, then create a new research_update note per observation with journal_id, explicit related_records, observed_at, and sources. Journal links are independent of entry links. Lead, company, and Deal profiles link to their scoped Notes views. Use the existing Scheduled harness for recurrence; note creation itself does not schedule it.
Writes return {note,replayed} or {journal,replayed}. Retrying a committed write with the same key and input returns the resource's current state and replayed=true. Lists return bounded summaries and next_cursor; get and revision reads contain full content. Lists are ordered by created_at descending with ID as tie-breaker. Revision cursors are scoped to one note. DELETE /api/notes/{note_id} archives a note and preserves its revision history; no hard-delete endpoint is exposed. Failed write candidates are excluded from history.
Clients should preserve unknown BlockNote block data when editing; conversion between Markdown and BlockNote is not performed by the API. File uploads, collaborative editing, and revision restoration are not part of this API.
Body parameters
titlerequiredstring
Non-empty title, at most 300 characters.
contentrequiredobject
{format:"markdown",markdown:"..."} or {format:"blocknote",blocks:[...]}. Exactly one representation. At most 128 KB; complete note at most 192 KB. Bodies are stored as data; rendering clients must validate their editor schema and sanitize imported content.
kind· optionalstring
general (default), meeting, or research_update. Independent of the types of linked records.
related_records· optionalarray
Up to 32 unique {entity_type:"lead"|"company"|"deal",entity_id:string} links. Each record must exist in the authenticated organization. No implicit inheritance from a journal.
journal_id· optionalstring | null
Optional research journal ID in this organization. On update, null detaches the note.
observed_at· optionalstring | null
Optional ISO 8601 timestamp of the research observation; distinct from server creation time. Null clears it on update.
sources· optionalarray
Up to 100 {url,title?,observed_at?} evidence references; HTTP(S) URLs only. The server does not fetch these URLs.
pinned· optionalboolean
Whether the note is pinned. Default false.
idempotency_keyrequiredstring
Required 8-200 character key, scoped to the authenticated author and operation/resource. Reuse exactly the same payload on retry. Changed input with the same key returns 409.
| Name | Type | Description |
|---|---|---|
| titlerequired | string | Non-empty title, at most 300 characters. |
| contentrequired | object | {format:"markdown",markdown:"..."} or {format:"blocknote",blocks:[...]}. Exactly one representation. At most 128 KB; complete note at most 192 KB. Bodies are stored as data; rendering clients must validate their editor schema and sanitize imported content. |
| kind | string | general (default), meeting, or research_update. Independent of the types of linked records. |
| related_records | array | Up to 32 unique {entity_type:"lead"|"company"|"deal",entity_id:string} links. Each record must exist in the authenticated organization. No implicit inheritance from a journal. |
| journal_id | string | null | Optional research journal ID in this organization. On update, null detaches the note. |
| observed_at | string | null | Optional ISO 8601 timestamp of the research observation; distinct from server creation time. Null clears it on update. |
| sources | array | Up to 100 {url,title?,observed_at?} evidence references; HTTP(S) URLs only. The server does not fetch these URLs. |
| pinned | boolean | Whether the note is pinned. Default false. |
| idempotency_keyrequired | string | Required 8-200 character key, scoped to the authenticated author and operation/resource. Reuse exactly the same payload on retry. Changed input with the same key returns 409. |
Errors
| Status | Meaning |
|---|---|
| 401 | Missing or invalid authentication. |
| 403 | Developer key lacks the required Notes scope. |
| 404 | Note, journal, or linked record is unavailable in this organization. |
| 409 | Stale expected_version or idempotency key reused with changed input. |
| 422 | Invalid fields, content bounds, paired record filter, or cursor. |
