API referenceForms
Create a signup form
POST
/formsReturns the hosted page (hosted_url), the public endpoint it posts to (action_url) and embed snippets. Double opt-in needs at least one list and a default_from in the marketing settings (it sends the confirmation email).
Authorization
apiKey AuthorizationBearer <token>
A project API key: Authorization: Bearer s0_…
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/forms" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "fields": [ { "name": "email", "label": "string", "type": "email" } ] }'{ "object": "form", "id": "string", "name": "string", "status": "active", "fields": [ { "name": "email", "label": "string", "type": "email", "required": false, "placeholder": "string" } ], "list_ids": [ "string" ], "double_opt_in": true, "redirect_url": "string", "success_message": "string", "spam_protection": { "honeypot": true, "turnstile": false, "max_per_ip_per_hour": 20 }, "action_url": "string", "hosted_url": "string", "embed": { "iframe": "string", "html": "string" }, "submission_count": 0, "last_submitted_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}