{"openapi":"3.1.1","info":{"title":"Static Forms Public Submission API","version":"1.0.0","description":"Submit form data using a form API key in the request body. This specification covers the public submission API, not authenticated workspace management or MCP. Submissions can send email and trigger integrations. Spam filtering can return a success response without delivery."},"servers":[{"url":"https://api.staticforms.dev"}],"externalDocs":{"url":"https://www.staticforms.dev/docs/api-reference"},"paths":{"/submit":{"post":{"operationId":"submitForm","summary":"Submit a form","description":"Include apiKey (or its accessKey alias) in the body. Arbitrary named form fields are supported. CAPTCHA and required fields depend on the form configuration. Send Accept: application/json for programmatic requests. URL-encoded requests accepting text/html receive plain text. A valid redirectTo can produce a 303 redirect. Submission keys do not grant read or management access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","anyOf":[{"required":["apiKey"]},{"required":["accessKey"]}],"properties":{"apiKey":{"type":"string","minLength":1,"description":"The form submission API key. Required unless accessKey is supplied."},"accessKey":{"type":"string","minLength":1,"description":"Accepted alias for apiKey."},"email":{"type":"string","description":"Submitter email; used for replies when valid."},"replyTo":{"type":"string","description":"Optional reply address; a valid value takes precedence over email."},"redirectTo":{"type":"string","format":"uri","description":"Optional HTTP(S) destination after submission. Form Rules may override it."},"honeypot":{"type":"string","description":"Leave empty. Custom honeypot field names depend on the form configuration."},"recaptchaToken":{"type":"string","description":"reCAPTCHA response token when the form requires it."},"g-recaptcha-response":{"type":"string","description":"reCAPTCHA widget response."},"altchaToken":{"type":"string","description":"ALTCHA solution when the form requires it."},"altcha":{"type":"string","description":"ALTCHA widget solution."},"cf-turnstile-response":{"type":"string","description":"Cloudflare Turnstile response token."},"h-captcha-response":{"type":"string","description":"hCaptcha response token."}},"additionalProperties":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","anyOf":[{"required":["apiKey"]},{"required":["accessKey"]}],"properties":{"apiKey":{"type":"string","minLength":1,"description":"The form submission API key. Required unless accessKey is supplied."},"accessKey":{"type":"string","minLength":1,"description":"Accepted alias for apiKey."},"email":{"type":"string","description":"Submitter email; used for replies when valid."},"replyTo":{"type":"string","description":"Optional reply address; a valid value takes precedence over email."},"redirectTo":{"type":"string","format":"uri","description":"Optional HTTP(S) destination after submission. Form Rules may override it."},"honeypot":{"type":"string","description":"Leave empty. Custom honeypot field names depend on the form configuration."},"recaptchaToken":{"type":"string","description":"reCAPTCHA response token when the form requires it."},"g-recaptcha-response":{"type":"string","description":"reCAPTCHA widget response."},"altchaToken":{"type":"string","description":"ALTCHA solution when the form requires it."},"altcha":{"type":"string","description":"ALTCHA widget solution."},"cf-turnstile-response":{"type":"string","description":"Cloudflare Turnstile response token."},"h-captcha-response":{"type":"string","description":"hCaptcha response token."}},"additionalProperties":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},"multipart/form-data":{"schema":{"type":"object","anyOf":[{"required":["apiKey"]},{"required":["accessKey"]}],"properties":{"apiKey":{"type":"string","minLength":1,"description":"The form submission API key. Required unless accessKey is supplied."},"accessKey":{"type":"string","minLength":1,"description":"Accepted alias for apiKey."},"email":{"type":"string","description":"Submitter email; used for replies when valid."},"replyTo":{"type":"string","description":"Optional reply address; a valid value takes precedence over email."},"redirectTo":{"type":"string","format":"uri","description":"Optional HTTP(S) destination after submission. Form Rules may override it."},"honeypot":{"type":"string","description":"Leave empty. Custom honeypot field names depend on the form configuration."},"recaptchaToken":{"type":"string","description":"reCAPTCHA response token when the form requires it."},"g-recaptcha-response":{"type":"string","description":"reCAPTCHA widget response."},"altchaToken":{"type":"string","description":"ALTCHA solution when the form requires it."},"altcha":{"type":"string","description":"ALTCHA widget solution."},"cf-turnstile-response":{"type":"string","description":"Cloudflare Turnstile response token."},"h-captcha-response":{"type":"string","description":"hCaptcha response token."},"file":{"type":"string","format":"binary","description":"Example file field name; any file field name is accepted."}},"additionalProperties":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"Use arbitrary field names for files or repeated files. File uploads require an eligible plan and are subject to per-file size and form validation limits. See the file upload guide."}}}},"responses":{"200":{"description":"Submission accepted. Acceptance does not guarantee email delivery or storage.","content":{"application/json":{"schema":{"type":"object","required":["success","message"],"properties":{"success":{"const":true},"message":{"type":"string"},"id":{"type":"string","description":"Present only when a stored submission ID is available."}}}},"text/plain":{"schema":{"type":"string"}}}},"303":{"description":"Redirect to the valid submission or rule-configured destination.","headers":{"Location":{"schema":{"type":"string","format":"uri"}}}},"400":{"description":"Missing API key, malformed request, CAPTCHA failure, or invalid form data.","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"const":false},"error":{"type":"string"},"code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}},"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Invalid submission API key.","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"const":false},"error":{"type":"string"},"code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}},"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Submission not permitted for this form or account.","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"const":false},"error":{"type":"string"},"code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}},"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Form builder field validation failed. JSON responses contain field errors.","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"const":false},"error":{"type":"string"},"code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}},"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Rate or submission limits exceeded.","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"const":false},"error":{"type":"string"},"code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}},"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Submission processing failed.","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"const":false},"error":{"type":"string"},"code":{"type":"string"},"errors":{"type":"array","items":{"type":"object","required":["field","message"],"properties":{"field":{"type":"string"},"message":{"type":"string"}}}}}}},"text/plain":{"schema":{"type":"string"}}}}}}}}}