01
Create the narrow token
Verify an Excaliwow account and mint a Personal Access Token with read + write only. Publish and delete are unnecessary for this create, render, patch, and browser-review loop.
Excalidraw REST API · runnable workflow
Create a persistent diagram from JSON, render it for automation, hand the same canvas to a person in the browser, then make an optimistic-concurrency update after review.
01
Source
Bounded input
02
REST
Create + render
03
Canvas
Stable URL
04
Human
Review + edit
05
REST
Guarded patch
A useful diagram API needs more than image output. The create response should lead to a stable artifact that code can update and a person can inspect without rebuilding it elsewhere.
Product boundary: Excaliwow is not affiliated with or endorsed by Excalidraw. Excalidraw+ has its own REST API in public beta for Plus workspaces. Choose Excalidraw+ when your diagrams already live in that workspace or its workspace surface is the better fit; choose Excaliwow when its Founding Free, persistent REST + CLI + MCP workflow fits your project.
Reproduce it
01
Verify an Excaliwow account and mint a Personal Access Token with read + write only. Publish and delete are unnecessary for this create, render, patch, and browser-review loop.
02
This compact cross-platform request is runnable with curl and jq. It creates one persistent diagram, downloads an SVG render, and prints its editor URL for browser review.
Terminal · create + render
export EXCALIWOW_TOKEN=excw_pat_…
CREATE_RESPONSE=$(curl -fsS https://excaliwow.com/api/v1/diagrams \
-H "Authorization: Bearer $EXCALIWOW_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"title": "OAuth PKCE review",
"spec": {
"version": "1",
"layout": { "direction": "LR" },
"nodes": [
{ "id": "browser", "label": "Browser redirect" },
{ "id": "app-validate", "label": "Validate state" },
{ "id": "token", "label": "Code + verifier exchange" },
{ "id": "session", "label": "Opaque session cookie" }
],
"edges": [
{ "from": "browser", "to": "app-validate", "label": "code + state" },
{ "from": "app-validate", "to": "token", "label": "state matches" },
{ "from": "token", "to": "session", "label": "server to server" }
]
}
}')
DIAGRAM_ID=$(printf '%s' "$CREATE_RESPONSE" | jq -r .id)
curl -fsS "https://excaliwow.com/api/v1/diagrams/$DIAGRAM_ID/render?format=svg" \
-H "Authorization: Bearer $EXCALIWOW_TOKEN" \
-o oauth-pkce.svg
printf 'Open for review: https://excaliwow.com/c/%s\n' "$DIAGRAM_ID"03
After the editor has loaded the collaborative document, read its live revision and send it back as expectedUpdatedAt. A concurrent browser edit produces stale_read instead of being silently overwritten. A newly created, never-opened diagram reports a null revision because no live collaborative document exists yet.
Terminal · post-review guarded patch
READ_RESPONSE=$(curl -fsS \
"https://excaliwow.com/api/v1/diagrams/$DIAGRAM_ID" \
-H "Authorization: Bearer $EXCALIWOW_TOKEN")
REVISION=$(printf '%s' "$READ_RESPONSE" | jq -r .docUpdatedAt)
jq -n --arg revision "$REVISION" '{
ops: [{
op: "update",
id: "app-validate",
set: { strokeColor: "#c92a2a", backgroundColor: "#ffe3e3" }
}],
expectedUpdatedAt: $revision
}' | curl -fsS \
"https://excaliwow.com/api/v1/diagrams/$DIAGRAM_ID/patch" \
-H "Authorization: Bearer $EXCALIWOW_TOKEN" \
-H "Content-Type: application/json" \
--data-binary @-Human review
Same-canvas follow-up
Update the same diagram in place: add the explicit state-mismatch rejection and secure cookie flags without moving the human-highlighted trust boundary.
Start free—no credit card. First 10,000 verified accounts keep the core workspace free; 3 diagrams to start and earn more capacity.