canvas-actions

Sandboxed JS batch edit. Failures are atomic; committed-but-imperfect is success + requires_repair.

The response revision is advisory-until-read (the CRDT write-back settles asynchronously); pin only tokens obtained from reads.

post/canvases/{canvas_ref}/edit

Request

  • Base URL
    https://api.moda.app/v1
  • URL
    https://api.moda.app/v1/canvases/{canvas_ref}/edit
  • Auth
    HTTP bearer

Path parameters

canvas_refstring required

Headers

Moda-Version'2026-04-12' | '2026-05-01'
Example:2026-05-01

Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.

Request body

codestring required

Sandboxed JS batch edit program.

page_idstring nullable

Scope the nodes snapshot to one page.

expected_revisionstring required

Revision token from your last read. Stale -> typed stale_revision.

idempotency_keystring nullable

Response

Successful Response

object required

Changes