Add Text
add_textCreate a NEW text node, or update an existing one (pass the same id to overwrite content/position in place — preferred over creating a duplicate). Supports cnvs markup (Markdown-ish) and Mermaid diagrams in the content. When using Mermaid, the ENTIRE content of this text node must be a single Mermaid diagram (one ```mermaid fenced block and nothing else — no heading, no prose before or after). If you need prose + a diagram, create two separate text nodes. postit: true renders as a yellow sticky; diagram: true renders as a framed box (2px border in the text colour, centred text) — the two are mutually exclusive. Coordinates are in board-world pixels, +x right, +y DOWN; pick a spot that does not overlap existing items (check get_preview first). Default width auto-fits content up to ~320 px; pass width for explicit wrapping (160–4096). Keep content under 100 000 chars.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| id | No | Optional stable id; generated when omitted. | |
| color | No | Named ink only (no hex). Accepted (case-insensitive): 'auto'/''/'black'/omitted for theme-aware ink, or 'red', 'blue', 'green', 'orange', 'yellow', 'pink', 'purple', 'maroon', 'brown', 'gray', 'lightgray', 'teal', 'sage', 'sky', 'lavender'. Anything else (including a literal hex) silently clamps to auto. | |
| width | No | Explicit width in px (160–4096). | |
| author | No | Author tag, defaults to ai:claude. | |
| postit | No | ||
| content | Yes | ||
| diagram | No | Render as a framed diagram box (2px border in the text colour, centred text). Mutually exclusive with postit. | |
| board_id | Yes | ||
| access_key | No | 8-character lowercase alphanumeric board access key when the board is locked (legacy 6-character lowercase alphanumeric keys are also accepted). Equivalent to setting the `X-Board-Key` HTTP header on the JSON-RPC POST. Omit for unlocked boards. Obtain via POST /api/boards/<id>/lock. |