{"openapi":"3.0.0","info":{"title":"Flexweg API","version":"1.0.0","description":"Flexweg is a static HTML hosting platform. Users get a custom subdomain (e.g., mysite.flexweg.com). Upload HTML, CSS, JS, and images to build websites. Files are served statically: index.html = homepage, blog\/index.html = \/blog\/ section. Use \/ai\/publish for temporary demos (1 hour, no auth needed). Use \/api\/v1\/files\/* endpoints with an API key for permanent hosting with full file management.","contact":{"name":"Flexweg","email":"contact@flexweg.com","url":"https:\/\/www.flexweg.com"}},"servers":[{"url":"https:\/\/www.flexweg.com","description":"Production server"}],"paths":{"\/ai\/publish":{"post":{"summary":"Publish HTML content (simplified)","description":"Lightweight endpoint for AI agents. Upload HTML and get a public URL. Content is stored temporarily (1 hour).","operationId":"publishHtmlSimple","tags":["AI","Publishing"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["html"],"properties":{"html":{"type":"string","description":"Complete HTML content (must include DOCTYPE, html, head, and body tags)","example":"\u003C!DOCTYPE html\u003E\u003Chtml\u003E\u003Chead\u003E\u003Ctitle\u003EMy Page\u003C\/title\u003E\u003C\/head\u003E\u003Cbody\u003E\u003Ch1\u003EHello World\u003C\/h1\u003E\u003C\/body\u003E\u003C\/html\u003E"}}}}}},"responses":{"200":{"description":"HTML published successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"url":{"type":"string","format":"uri","description":"Public URL of the published content","example":"https:\/\/www.flexweg.com\/demo\/view\/abc123"}}}}}},"400":{"description":"Bad request (missing html field, empty content, or exceeds 1MB)","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"string","example":"Missing required field: html"}}}}}},"500":{"description":"Internal server error","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"string","example":"Internal server error"}}}}}}}}},"\/demo\/api\/publish":{"post":{"summary":"Publish HTML content (full-featured)","description":"Full-featured publishing endpoint with additional metadata. Compatible with WebMCP protocol.","operationId":"publishHtmlFull","tags":["Publishing","WebMCP"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["html_content"],"properties":{"html_content":{"type":"string","description":"Complete HTML content (must include DOCTYPE, html, head, and body tags)","example":"\u003C!DOCTYPE html\u003E\u003Chtml\u003E\u003Chead\u003E\u003Ctitle\u003EMy Page\u003C\/title\u003E\u003C\/head\u003E\u003Cbody\u003E\u003Ch1\u003EHello World\u003C\/h1\u003E\u003C\/body\u003E\u003C\/html\u003E"},"title":{"type":"string","description":"Optional page title for reference","example":"My Demo Page"}}}}}},"responses":{"200":{"description":"HTML published successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"url":{"type":"string","format":"uri","example":"https:\/\/www.flexweg.com\/demo\/view\/abc123"},"filename":{"type":"string","example":"abc123.html"},"message":{"type":"string","example":"Content published successfully! It will be automatically deleted after 1 hour."},"expires_in":{"type":"string","example":"1 hour"}}}}}},"400":{"description":"Bad request","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"HTML content is required"},"error":{"type":"string","example":"Missing html_content parameter"}}}}}}}}},"\/api\/v1\/files\/list":{"get":{"summary":"List all files in storage folder","description":"Requires API key authentication. Returns paginated file tree with parent\/child relationships. Default 100 items per page, maximum 100 items per page.","operationId":"listFiles","tags":["File API"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number (default: 1)"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":100},"description":"Number of items per page (default: 100, maximum: 100)"},{"name":"site_id","in":"query","required":false,"schema":{"type":"integer"},"description":"Storage folder ID (optional, uses default if not specified when using session authentication)"}],"responses":{"200":{"description":"Files listed successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"storage_folder":{"type":"object","properties":{"slug":{"type":"string","example":"mysite"},"name":{"type":"string","example":"My Site"},"file_count":{"type":"integer","example":3},"storage_used":{"type":"integer","example":12345},"storage_used_formatted":{"type":"string","example":"12.06 KB"}}},"pagination":{"type":"object","properties":{"current_page":{"type":"integer","example":1,"description":"Current page number"},"per_page":{"type":"integer","example":100,"description":"Items per page"},"total_items":{"type":"integer","example":3,"description":"Total number of items"},"total_pages":{"type":"integer","example":1,"description":"Total number of pages"},"has_more":{"type":"boolean","example":false,"description":"True if there are more pages"},"is_last_page":{"type":"boolean","example":true,"description":"True if this is the last page"}},"description":"Pagination metadata"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","example":"index.html"},"name":{"type":"string","example":"index.html"},"type":{"type":"string","enum":["file","directory"],"example":"file"},"size":{"type":"integer","example":1234},"url":{"type":"string","format":"uri","example":"https:\/\/mysite.flexweg.com\/index.html"},"depth":{"type":"integer","example":0},"parent":{"type":"string","nullable":true,"example":null}}}}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"}}}},"\/api\/v1\/files\/get":{"get":{"summary":"Get file content","description":"Requires API key authentication.","operationId":"getFile","tags":["File API"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string"},"description":"File path (e.g., index.html or folder\/file.html)"}],"responses":{"200":{"description":"File content retrieved","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"path":{"type":"string"},"content":{"type":"string"},"size":{"type":"integer"},"url":{"type":"string","format":"uri"}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/files\/upload":{"post":{"summary":"Upload or update a file","description":"Upload any file to your Flexweg storage. Supports HTML, CSS, JS, images (jpg, png, gif, svg, webp, ico), PDF, fonts (woff, woff2, ttf, otf), JSON, XML, TXT. For binary files (images, PDF, fonts), use base64 encoding. Max 10 MB per file. Requires API key authentication.","operationId":"uploadFile","tags":["File API"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string","description":"File path with extension (e.g., index.html, css\/style.css, img\/logo.png)","example":"index.html"},"content":{"type":"string","description":"File content. For text files (HTML, CSS, JS), provide text content. For binary files (images, PDF), provide base64-encoded content.","example":"\u003C!DOCTYPE html\u003E\u003Chtml\u003E\u003Cbody\u003EHello\u003C\/body\u003E\u003C\/html\u003E"}}}}}},"responses":{"200":{"description":"File uploaded successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"path":{"type":"string"},"size":{"type":"integer"},"url":{"type":"string","format":"uri"}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"}}}},"\/api\/v1\/files\/rename":{"post":{"summary":"Rename or move a file","description":"Requires API key authentication.","operationId":"renameFile","tags":["File API"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["old_path","new_path"],"properties":{"old_path":{"type":"string","example":"old.html"},"new_path":{"type":"string","example":"new.html"}}}}}},"responses":{"200":{"description":"File renamed successfully"},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"}}}},"\/api\/v1\/files\/delete":{"delete":{"summary":"Delete a file","description":"Requires API key authentication.","operationId":"deleteFile","tags":["File API"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string"},"description":"File path to delete"}],"responses":{"200":{"description":"File deleted successfully"},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/keys\/generate-temp":{"post":{"summary":"Generate temporary API key for AI agents","description":"Requires user authentication. Generates a temporary key valid for up to 24 hours.","operationId":"generateTempKey","tags":["API Keys"],"security":[{"BearerAuth":[]}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"type":"object","properties":{"storage_folder_id":{"type":"integer","description":"Storage folder ID (optional, uses default if not specified)"},"expires_in":{"type":"integer","description":"Expiration in seconds (default: 3600, max: 86400)","example":3600}}}}}},"responses":{"200":{"description":"Temporary API key generated","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"temp_api_key":{"type":"string"},"expires_in":{"type":"integer"},"expires_at":{"type":"string","format":"date-time"},"message":{"type":"string"}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"}}}},"\/api\/v1\/files\/storage-limits":{"get":{"summary":"Get storage usage and limits","description":"Requires API key authentication. Returns current storage usage, plan limits, and warnings when approaching capacity.","operationId":"getStorageLimits","tags":["File API"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Storage limits retrieved successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"plan":{"type":"object","properties":{"name":{"type":"string","example":"Plan gratuit"},"type":{"type":"string","example":"free"}}},"usage":{"type":"object","properties":{"files":{"type":"object","properties":{"current":{"type":"integer","example":5},"limit":{"type":"integer","example":10},"percentage":{"type":"number","format":"float","example":50},"available":{"type":"integer","example":5}}},"storage":{"type":"object","properties":{"current":{"type":"integer","example":2048000},"current_formatted":{"type":"string","example":"2 MB"},"limit":{"type":"integer","example":10485760},"limit_formatted":{"type":"string","example":"10 MB"},"percentage":{"type":"number","format":"float","example":19.53},"available":{"type":"integer","example":8437760},"available_formatted":{"type":"string","example":"8 MB"}}}}},"warnings":{"type":"object","properties":{"files_near_limit":{"type":"boolean","example":false},"storage_near_limit":{"type":"boolean","example":false}},"description":"Warning flags when usage exceeds 80% of plan limits"}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"}}}},"\/api\/v1\/videos\/upload":{"post":{"summary":"Upload video file","description":"Direct video upload via multipart\/form-data. Simple single-request upload. Supports MP4, WebM, OGG, MOV up to 50 MB. File is uploaded to Symfony then stored automatically.","operationId":"uploadVideo","tags":["Video Upload"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"type":"object","required":["file","path"],"properties":{"file":{"type":"string","format":"binary","description":"Video file (binary data)"},"path":{"type":"string","description":"Destination path (e.g., \u0022videos\/background.mp4\u0022)","example":"videos\/background.mp4"}}}}}},"responses":{"200":{"description":"Video uploaded successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"url":{"type":"string","format":"uri","example":"https:\/\/storage.example.com\/abc12345\/videos\/background.mp4"},"path":{"type":"string","example":"videos\/background.mp4"},"size":{"type":"integer","example":12345678},"message":{"type":"string","example":"Video uploaded successfully"}}}}}},"400":{"description":"Invalid request (no file, missing path, bad extension, file too large, storage limit exceeded)","content":{"application\/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"File too large"},"message":{"type":"string","example":"Video files must be smaller than 50 MB"},"max_size":{"type":"integer","example":52428800}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"},"500":{"description":"Upload failed","content":{"application\/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Upload failed"},"message":{"type":"string","example":"Failed to upload file to storage"}}}}}}}}},"\/api\/v1\/files\/create-folder":{"post":{"summary":"Create a new folder","description":"Create a new folder to organize files (e.g., \u0022css\u0022, \u0022images\u0022, \u0022blog\/2024\u0022). Requires API key authentication.","operationId":"createFolder","tags":["File API"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","description":"Folder path to create","example":"images"}}}}}},"responses":{"200":{"description":"Folder created successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"path":{"type":"string"}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"},"400":{"description":"Bad request","content":{"application\/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}},"\/api\/v1\/files\/rename-folder":{"post":{"summary":"Rename or move a folder","description":"Rename or move a folder and all its contents. Requires API key authentication.","operationId":"renameFolder","tags":["File API"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["old_path","new_path"],"properties":{"old_path":{"type":"string","example":"images"},"new_path":{"type":"string","example":"photos"}}}}}},"responses":{"200":{"description":"Folder renamed successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"}}}},"\/api\/v1\/files\/delete-folder":{"delete":{"summary":"Delete a folder","description":"Permanently delete a folder and all its contents. This action cannot be undone. Requires API key authentication.","operationId":"deleteFolder","tags":["File API"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string"},"description":"Folder path to delete"}],"responses":{"200":{"description":"Folder deleted successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/hosting-info":{"get":{"summary":"Get hosting information","description":"Get detailed information about your Flexweg hosting environment: subdomain URL, storage usage, file structure rules, and URL routing. Requires API key authentication.","operationId":"getHostingInfo","tags":["File API"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Hosting information retrieved successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"subdomain":{"type":"string","example":"mysite.flexweg.com"},"base_url":{"type":"string","example":"https:\/\/mysite.flexweg.com"},"storage_usage":{"type":"object","properties":{"files_count":{"type":"integer"},"storage_used":{"type":"string"}}}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"}}}},"\/api\/v1\/forms":{"post":{"summary":"Create a new form","description":"Create an embeddable form for collecting user submissions. Supports multiple field types (text, email, tel, number, url, textarea, select). Requires API key authentication.","operationId":"createForm","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["name","fields"],"properties":{"name":{"type":"string","description":"Form name","example":"Contact Form"},"description":{"type":"string","description":"Optional internal description","example":"Main contact form"},"fields":{"type":"array","description":"Array of form fields","items":{"type":"object","required":["name","label","type"],"properties":{"name":{"type":"string","example":"email"},"label":{"type":"string","example":"Email Address"},"type":{"type":"string","enum":["text","email","tel","number","url","textarea","select"]},"required":{"type":"boolean","default":false},"placeholder":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"description":"Required for select type"}}}},"success_message":{"type":"string","example":"Thank you for your submission!"},"redirect_url":{"type":"string","format":"uri"}}}}}},"responses":{"201":{"description":"Form created successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"form":{"type":"object","properties":{"id":{"type":"integer"},"uuid":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"submission_url":{"type":"string","format":"uri"}}}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"}}},"get":{"summary":"List all forms","description":"Get a list of all forms owned by the authenticated user.","operationId":"listForms","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"responses":{"200":{"description":"Forms listed successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"forms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"uuid":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"is_active":{"type":"boolean"},"submission_count":{"type":"integer"}}}}}}}}},"401":{"$ref":"#\/components\/responses\/UnauthorizedError"}}}},"\/api\/v1\/forms\/{id}":{"get":{"summary":"Get form details","description":"Retrieve full details of a specific form including all fields.","operationId":"getForm","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Form details retrieved","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"form":{"type":"object","properties":{"id":{"type":"integer"},"uuid":{"type":"string"},"name":{"type":"string"},"fields":{"type":"array"},"is_active":{"type":"boolean"}}}}}}}},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}},"put":{"summary":"Update form","description":"Update form name, fields, or settings.","operationId":"updateForm","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"fields":{"type":"array"},"success_message":{"type":"string"}}}}}},"responses":{"200":{"description":"Form updated successfully"},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}},"delete":{"summary":"Delete form","description":"Permanently delete a form and all its submissions.","operationId":"deleteForm","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Form deleted successfully"},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/forms\/{id}\/toggle":{"post":{"summary":"Toggle form status","description":"Enable or disable a form (stops accepting submissions when disabled).","operationId":"toggleForm","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Form status toggled","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"is_active":{"type":"boolean"}}}}}},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/forms\/{id}\/fields":{"post":{"summary":"Add field to form","description":"Add a new field to an existing form.","operationId":"addFormField","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["name","label","type"],"properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","enum":["text","email","tel","number","url","textarea","select"]},"required":{"type":"boolean"},"position":{"type":"integer"}}}}}},"responses":{"200":{"description":"Field added successfully"},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/forms\/{id}\/fields\/{fieldId}":{"put":{"summary":"Update field","description":"Update properties of an existing field.","operationId":"updateFormField","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"fieldId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"required":{"type":"boolean"},"placeholder":{"type":"string"}}}}}},"responses":{"200":{"description":"Field updated successfully"},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}},"delete":{"summary":"Delete field","description":"Remove a field from a form.","operationId":"deleteFormField","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"fieldId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Field deleted successfully"},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/forms\/{id}\/fields\/reorder":{"post":{"summary":"Reorder form fields","description":"Change the order of fields in a form.","operationId":"reorderFormFields","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["field_ids"],"properties":{"field_ids":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Fields reordered successfully"},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/forms\/{id}\/embed\/html":{"get":{"summary":"Get HTML embed code","description":"Generate HTML form snippet for embedding on websites.","operationId":"getFormEmbedHtml","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"HTML snippet generated","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"snippet":{"type":"string","description":"HTML form code"}}}}}},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/forms\/{id}\/embed\/react":{"get":{"summary":"Get React component code","description":"Generate React component code for the form.","operationId":"getFormEmbedReact","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"React component generated","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"snippet":{"type":"string","description":"React component code"}}}}}},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/forms\/{id}\/embed\/curl":{"get":{"summary":"Get cURL example","description":"Generate cURL command example for submitting to the form.","operationId":"getFormEmbedCurl","tags":["Form Management"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"cURL example generated","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"snippet":{"type":"string","description":"cURL command"}}}}}},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/forms\/{id}\/submissions":{"get":{"summary":"List form submissions","description":"Get all submissions for a form with filtering and pagination. Returns submission data, spam status, and statistics.","operationId":"getFormSubmissions","tags":["Form Submissions"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","default":50,"maximum":100}},{"name":"is_spam","in":"query","schema":{"type":"boolean"}},{"name":"is_archived","in":"query","schema":{"type":"boolean"}},{"name":"from_date","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to_date","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Submissions retrieved successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"submissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"uuid":{"type":"string"},"data":{"type":"object"},"is_spam":{"type":"boolean"},"spam_score":{"type":"integer"},"is_archived":{"type":"boolean"},"submitted_at":{"type":"string","format":"date-time"}}}},"pagination":{"type":"object","properties":{"current_page":{"type":"integer"},"total_pages":{"type":"integer"},"has_more":{"type":"boolean"}}},"stats":{"type":"object","properties":{"total":{"type":"integer"},"spam":{"type":"integer"},"legitimate":{"type":"integer"},"unread":{"type":"integer"}}}}}}}},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}},"\/api\/v1\/forms\/{id}\/submissions\/{uuid}":{"get":{"summary":"Get single submission","description":"Retrieve detailed information about a specific submission including metadata.","operationId":"getFormSubmission","tags":["Form Submissions"],"security":[{"ApiKeyAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Submission retrieved successfully","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"submission":{"type":"object","properties":{"id":{"type":"integer"},"uuid":{"type":"string"},"data":{"type":"object"},"metadata":{"type":"object","description":"IP hash, user agent, referer"},"spam_reasons":{"type":"array","items":{"type":"string"}},"submitted_at":{"type":"string","format":"date-time"}}}}}}}},"404":{"$ref":"#\/components\/responses\/NotFoundError"}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Use your permanent API key or temporary key generated by the user"},"BearerAuth":{"type":"http","scheme":"bearer","description":"Session-based authentication for logged-in users"}},"responses":{"UnauthorizedError":{"description":"Unauthorized - Invalid or missing API key","content":{"application\/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"hint_for_ai":{"type":"string","description":"Helpful message for AI agents"}}}}}},"NotFoundError":{"description":"Resource not found","content":{"application\/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}},"schemas":{"PublishRequest":{"type":"object","required":["html"],"properties":{"html":{"type":"string","description":"Complete HTML content"}}},"PublishResponse":{"type":"object","properties":{"success":{"type":"boolean"},"url":{"type":"string","format":"uri"}}},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}}}}},"tags":[{"name":"AI","description":"Simplified endpoints optimized for AI agents"},{"name":"Publishing","description":"HTML publishing and deployment"},{"name":"WebMCP","description":"Web Model Context Protocol compatible endpoints"},{"name":"File API","description":"File management operations (requires API key)"},{"name":"API Keys","description":"API key management for users and AI agents"},{"name":"Form Management","description":"Create and manage embeddable forms (requires API key)"},{"name":"Form Submissions","description":"Retrieve and analyze form submissions (requires API key)"},{"name":"Video Upload","description":"Upload video files (requires API key)"}],"externalDocs":{"description":"AI Agent Documentation","url":"https:\/\/www.flexweg.com\/ai.txt"}}