API Reference
Base URL:
https://api.formerie.comThis reference covers the API /v1 surface. Public hosted forms, embeds, and
customer runtime hostnames use clean runtime routes on https://forms.formerie.com or verified customer hostnames:
GET /{workspaceHandle}/{formHandle}/schema
POST /{workspaceHandle}/{formHandle}/validate
POST /{workspaceHandle}/{formHandle}/submitWorkspace-bound customer hostnames use /{formHandle}/schema, /{formHandle}/validate,
and /{formHandle}/submit. Form-bound hostnames use /schema, /validate, and /submit.
Health
GET /health{
"ok": true,
"service": "formerie-api",
"version": "0.1.0"
}Submit Form
Canonical route:
POST /v1/{workspaceHandle}/{formHandle}API branded route:
POST /v1/{formHandle}Payload:
{
"fields": {
"name": "Jane Example",
"email": "jane@example.com",
"message": "Hello"
},
"verificationToken": "token-from-client",
"metadata": {
"pageUrl": "https://example.com/contact",
"idempotencyKey": "frontend-generated-random-uuid"
}
}Accepted response:
{
"ok": true,
"submissionId": "uuid",
"status": "accepted"
}Validate Fields
Validation checks provided values without storing a submission, reserving quota, verifying CAPTCHA tokens, or sending email.
POST /v1/{workspaceHandle}/{formHandle}/validate
POST /v1/{formHandle}/validatePublic Schema
GET /v1/{workspaceHandle}/{formHandle}/schema
GET /v1/{formHandle}/schemaThe public schema endpoint is intentionally safe for browsers. It exposes field labels, types, validation hints, verification requirements, and public metadata. It does not expose recipients, provider configuration, delivery rules, templates, allowed origins, rate-limit rules, or secrets.
Final submit remains authoritative and validates the full form.
Error Shape
{
"ok": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "The submitted form contains invalid fields.",
"fields": {
"contact.email": [
{
"path": "contact.email",
"code": "FIELD_EMAIL_INVALID",
"message": "Invalid email address.",
"rule": "email",
"params": {}
}
]
},
"issues": [
{
"path": "contact.email",
"code": "FIELD_EMAIL_INVALID",
"message": "Invalid email address.",
"rule": "email",
"params": {}
}
]
}
}Rate-limited requests return HTTP 429 with the public error code RATE_LIMITED. When a Retry-After header is present, clients should wait at
least that many seconds before retrying. Do not retry submissions in a tight
loop; show a calm retry state to the visitor instead.