edit_project_create
Create a canvas project from a Fabric.js toJSON serialization (canvas_json, required): every embedded data:image src is pulled out, hashed, and written to a tenant-scoped, content-addressed R2 key before the row is saved, so canvas_json never carries image bytes and identical images dedupe across projects. SVG, an unrecognized image type, an oversized embedded image, or a canvas still too large after externalization refuse the whole create — nothing is silently dropped. An optional thumbnail_data_url is externalized the same way into thumbnail_key; thumbnail_key and version are server-set and refuse if you pass them. NEXT: edit_project_update to autosave the same project as it changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| width | No | ||
| height | No | ||
| version | No | ||
| canvas_json | No | ||
| thumbnail_key | No | ||
| thumbnail_data_url | No | Optional thumbnail as a data: URL (PNG/JPEG/WebP/GIF, max 2MB) — externalized into thumbnail_key the same way embedded canvas images are. Omit to skip thumbnail externalization (create: no thumbnail_key is set; update: the existing thumbnail_key is left unchanged). |