Skip to main content
POST
Enhance or revise a note
Only the note owner can use this endpoint. Custom-agent note read grants do not allow enhancement. Provide instructions to revise existing saved enhanced HTML, note_template_id to regenerate from raw user notes and transcript, or both. Read the note first and supply its revision as expected_revision. Raw notes, transcript, and the template remain unchanged. A 200 response contains a terminal snapshot; 202 means the operation is still running. Only enhancement.status: completed with enhancement.ai_note confirms a saved result. Failed previews are not saved. Use GET enhancement to observe progress, including after disconnecting. An optional UUID operation_id makes identical retries idempotent. Reusing it with different inputs or starting another operation while one runs returns 409. A concurrent note edit prevents the final save and produces a failed operation with error code 409; read the note again before retrying. See CLI flags and MCP operations.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

team_id
string
required

Team ID is an alphanumerical string that identifies a Team. This is externally referred to as a "Workspace".

note_id
string
required

Note ID is a numerical string that identifies a Note.

Body

application/json

Instructions or an explicit template, with optional retry and concurrency guards.

At least one of non-empty instructions or an explicit note_template_id is required. Existing template-only clients may continue using ApplyNoteTemplateRequest unchanged.

instructions
string

Instructions to revise current enhanced HTML, or to apply while regenerating with an explicit template.

Maximum string length: 102400
note_template_id
string

Explicit template to regenerate from raw user notes and transcript. Omit to revise current enhanced HTML.

enhanced_note_id
string

Target for an instruction-only revision. Omit to use the entry matching the note's last_note_template_id. An explicit template selects its own entry.

operation_id
string<uuid>

Optional client-generated UUID for idempotent retries. The server generates an ID when omitted.

expected_revision
integer<int64> | null

Revision from the latest GetNote response. A stale value is rejected with 409; omission captures the current note revision.

Required range: x >= 0

Response

Terminal enhancement snapshot; completed results have been durably saved.

enhancement
object
required