{"openapi":"3.1.0","info":{"title":"Make-frame API","version":"1.0","description":"Manage a Make-frame account (frames, theme, texts, banner, profile) with an API key. Create keys in Admin → Integrations. Read the frame design guide first: GET /api/v1/design-guide."},"servers":[{"url":"https://app.make-frame.com/api/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Authorization: Bearer mf_live_... (tenant API key). Scope \"read\" for GET, \"write\" for everything else."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"]}}},"PhotoArea":{"type":["object","null"],"properties":{"x":{"type":"integer"},"y":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"}}},"Frame":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"type":{"type":"string","enum":["square","story","profile"]},"order":{"type":"integer"},"active":{"type":"boolean"},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]},"photo_area":{"$ref":"#/components/schemas/PhotoArea"},"image_url":{"type":["string","null"]},"thumbnail_url":{"type":["string","null"]},"created_at":{"type":"string"}}},"Theme":{"type":"object","properties":{"primaryColor":{"type":"string"},"secondaryColor":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"borderColor":{"type":"string"},"iconColor":{"type":"string"},"fontFamily":{"type":"string"},"borderRadius":{"type":"string","description":"pixels, e.g. \"12\""}}}}},"paths":{"/design-guide":{"get":{"security":[],"summary":"Frame design guide (Markdown). Read before creating frames.","responses":{"200":{"description":"text/markdown"}}}},"/openapi.json":{"get":{"security":[],"summary":"This document","responses":{"200":{"description":"OpenAPI JSON"}}}},"/overview":{"get":{"summary":"Account overview: plan, remaining frames, public page URL and embed code, frames count, theme, setup checklist","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/usage":{"get":{"summary":"Remaining frames and last-30-day usage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/profile":{"get":{"summary":"Account name, public slug, share message","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}},"put":{"summary":"Update name, share_message or public_slug (slug change needs confirm)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"share_message":{"type":"string","maxLength":280},"public_slug":{"type":"string","pattern":"^[a-z0-9-]{3,60}$"},"confirm":{"type":"boolean","description":"Required (true) to apply a destructive or overwriting change. Without it the call returns a preview."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Slug taken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/theme":{"get":{"summary":"Current theme (8 keys)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"theme":{"$ref":"#/components/schemas/Theme"}}}}}}}},"put":{"summary":"Update any subset of theme keys","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Theme"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"No valid values","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/theme/reset":{"post":{"summary":"Reset theme to defaults (confirm)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean","description":"Required (true) to apply a destructive or overwriting change. Without it the call returns a preview."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/texts":{"get":{"summary":"All UI texts of the public page (merged with defaults) and which keys are customized","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"texts":{"type":"object","additionalProperties":{"type":"string"}},"customized_keys":{"type":"array","items":{"type":"string"}}}}}}}}},"put":{"summary":"Update any subset of text keys (unknown keys are ignored and reported)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Only unknown keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/texts/reset":{"post":{"summary":"Reset texts to defaults (confirm)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean","description":"Required (true) to apply a destructive or overwriting change. Without it the call returns a preview."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/banner":{"get":{"summary":"Banner above the generator","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}},"put":{"summary":"Set banner images (desktop 1920x200, mobile 600x100; PNG/JPG/WebP up to 400 KB each), link and enabled flag","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"desktop_svg":{"type":"string","description":"SVG 1920x200"},"desktop_image_url":{"type":"string"},"desktop_image_base64":{"type":"string"},"mobile_svg":{"type":"string","description":"SVG 600x100"},"mobile_image_url":{"type":"string"},"mobile_image_base64":{"type":"string"},"link_url":{"type":"string"},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove the banner (confirm)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean","description":"Required (true) to apply a destructive or overwriting change. Without it the call returns a preview."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/help":{"get":{"summary":"User guide (markdown, no key needed); optional ?topic= section id","security":[],"responses":{"200":{"description":"Markdown","content":{"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Unknown topic","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets":{"post":{"summary":"Upload a logo or picture once (PNG/JPEG/WebP/GIF, max 5 MB) and get a URL to use in <image href> of frame and banner SVGs","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image_base64":{"type":"string"},"image_url":{"type":"string"},"name":{"type":"string"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}}}}}},"400":{"description":"Not a supported image","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/frames":{"get":{"summary":"List frames","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"frames":{"type":"array","items":{"$ref":"#/components/schemas/Frame"}},"count":{"type":"integer"},"limit":{"type":"integer"}}}}}}}},"post":{"summary":"Upload a frame PNG (validated; photo area detected). Returns warnings about size and photo area.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["square","story","profile"],"default":"square"},"order":{"type":"integer"},"show_when":{"type":"string","enum":["face","no_face"],"default":"face","description":"face (default): normal frames. no_face: alternative frames shown only when no face is detected in the photo (e.g. products, groups)."},"svg":{"type":"string","description":"Frame as SVG text at the exact size; rendered to PNG by Make-frame (see the design guide, section 5). Alternative to image_url / image_base64."},"image_url":{"type":"string","format":"uri","description":"Public http(s) URL of the PNG. Alternative to image_base64."},"image_base64":{"type":"string","description":"PNG as data URL (data:image/png;base64,...) or raw base64."},"confirm":{"type":"boolean","description":"Upload even if no transparent photo area was detected."}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"frame":{"$ref":"#/components/schemas/Frame"},"warnings":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Invalid PNG / no photo area","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Frame limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/frames/validate":{"post":{"summary":"Validate a frame PNG without saving it","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["square","story","profile"]},"svg":{"type":"string","description":"Frame as SVG text at the exact size; rendered to PNG by Make-frame (see the design guide, section 5). Alternative to image_url / image_base64."},"image_url":{"type":"string","format":"uri","description":"Public http(s) URL of the PNG. Alternative to image_base64."},"image_base64":{"type":"string","description":"PNG as data URL (data:image/png;base64,...) or raw base64."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"photo_area":{"$ref":"#/components/schemas/PhotoArea"},"warnings":{"type":"array","items":{"type":"string"}}}}}}}}}},"/frames/{id}":{"patch":{"summary":"Rename, retype or reorder a frame","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["square","story","profile"]},"order":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a frame (confirm)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"confirm","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}