Submit a form
Sends an answer to a published form from your own interface.
https://app.getera.io/api/forms/{slug}Era's /public/forms/<slug> page sends its answers to this address. If you want to draw the form yourself on your own site, you can use the same address. In most cases it is easier to embed the form with the Embed code in the form editor.
A submission passes the same rules as the form on screen: visibility conditions, required fields, validation, the consent box, spam checks and the rate limit. Depending on the form's type it opens a lead or adds a record to a table. See Forms and Tables.
Authentication
None. If the form is not published, the request is refused.
Path parameter
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | The short name in the form's public address: /public/forms/<slug>. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
values | object | Yes | Question id → answer. Keys that are not on the form are ignored. |
meta.__website | string | No | A trap field. Real people leave it empty; if it is filled, the submission counts as spam. |
meta.__started | number | No | When the form was opened (Unix milliseconds). A submission faster than the form's setting (2 seconds by default) counts as spam. |
meta.__consent | boolean | Yes, if the form has consent text | Whether the visitor ticked the consent box. |
Example
curl -X POST https://app.getera.io/api/forms/demo-contact \
-H "Content-Type: application/json" \
-d '{
"values": { "QUESTION_ID_NAME": "Alex Demo", "QUESTION_ID_EMAIL": "[email protected]" },
"meta": { "__website": "", "__started": 1791970200000, "__consent": true }
}'Response
{ "ok": true, "successMessage": "Thanks, we will get back to you.", "redirectUrl": null }If redirectUrl is set, send the visitor there.
Submissions caught as spam also answer 200 "success"; they are logged but create no lead or record. That way automated tools cannot learn what was caught.
Errors
| Status | Body | When |
|---|---|---|
400 | {"error": "That request was not readable."} | The body is not JSON, or values is not an object. |
400 | {"error": "Please check the fields marked below.", "fields": [...], "messages": {...}} | Required or invalid fields. |
400 | {"error": "Please tick the consent box to send this.", "fields": ["__consent"]} | Consent is required. |
403 | {"error": "...", "closed": "not_yet"} | The form has not opened yet (not_yet), has closed (ended) or reached its answer limit (full). |
404 | {"error": "This form is not accepting answers."} | No such form, or not published. |
429 | {"error": "Too many submissions from here. Please try again shortly."} | Rate limit. |
503 | {"error": "We could not accept that just now. Please try again later."} | The answer could not be saved; try again later. |
Limits
Submissions from the same address are limited per hour. The default is 60 an hour, and it can be changed in the workspace's form settings.