Content Blocks
/api/content-blocksList all content blocks for your company.
/api/content-blocksCreate a content block.
Parameters
namestringrequired— Block nametypestringrequired— image, video, text, widget, web, newsconfigobject— Block configuration/api/content-blocks/:idUpdate a content block.
/api/content-blocks/:idDelete a content block.
/api/media/sign-uploadStep 1 of direct-upload flow: server generates a Supabase signed upload URL. Browser then PUTs bytes directly to Supabase Storage.
Parameters
namestringrequired— Filename (used to derive extension)sizenumberrequired— File size in bytes (max 500 MiB)typestringrequired— MIME type (must start with image/ or video/)folder_idstring— Optional folder UUIDResponse
{ "signedUrl": "...", "token": "...", "path": "<companyId>/<uuid>.<ext>" }/api/media/finalize-uploadStep 3 of direct-upload flow: server HEADs the stored object, validates size + mime, writes the content_blocks row. Orphan is deleted on any failure.
Parameters
pathstringrequired— The path returned by sign-uploadnamestringrequired— Display filenamefolder_idstring— Optional folder UUIDResponse
{ "success": true, "block": {...}, "url": "...", "path": "..." }