Headless errors

Use this page to identify errors returned by Headless submission and email verification requests.

Beta

This feature is available to all accounts. Its request and response format can change without a new API version. Do not depend on it for anything you cannot update quickly.

Submission errors

Submission errors use a JSON body with ok: false, error, and code. Validation responses can also include errors, whose entries have field and message, and fieldErrors, which maps field names to messages. Partial-save validation errors include fieldErrors but no errors array. Some errors include retryAfter in seconds and a matching Retry-After header.

StatusCodeMeaning
400validationThe submission failed form validation. In strict mode, an unknown field returns Unknown field for this form. File-upload fields fail validation because Headless uploads are unsupported. Page forms must use strict mode or the request returns 400. Check field errors and correct the answers.
400captchaA required Turnstile token is missing or failed validation.
400idempotency_key_invalidThe idempotency key is invalid, or the header and body keys do not match.
401authThe backend API key is missing or invalid.
403authThe request origin is not allowed.
403captchaThe form is a Page form with hosted CAPTCHA enabled, so it cannot accept Headless submissions.
403email_verificationEmail verification is required, but the submission used a backend key. The response uses verificationCode: "EMAIL_VERIFICATION_REQUIRED".
403unsupportedA partial save was sent to a Headless-only form.
404endpointThe endpoint is unknown, disabled, or unavailable. The submit URL requires the endpoint ID; using a form ID returns {"ok":false,"error":"Endpoint not found","code":"endpoint"}.
409idempotency_conflictThe same idempotency key was used with a different request.
409schema_changedThe schema was locked while a loose-mode request was in flight.
409email_verificationThe form’s verification settings changed after verification. The response uses verificationCode: "VERIFICATION_POLICY_CHANGED".
413validationThe request body exceeds 256 KB. Authentication is checked before size.
415unsupportedThe request uses an unsupported content type. application/json and application/x-www-form-urlencoded are accepted; multipart/form-data is unsupported.
422email_verificationVerification proof is missing or invalid. No proof, malformed _email_verification, missing _session_id, or an expired or unknown receipt returns verificationCode: "EMAIL_VERIFICATION_REQUIRED".
429rateThe request was rate limited. Wait for the time in retryAfter before retrying.
429quotaThe plan’s monthly Headless submission limit was reached. retryAfter gives the seconds until the next UTC month.
500serviceAn unexpected server error occurred. Retry later; an idempotency key makes a submission retry safe.
503serviceIn loose mode, the schema could not be confirmed. Keep the answers and retry the same submission.
503idempotency_unavailableIdempotency is unavailable.
503—Schema learning is unavailable.

A form that is not published returns 400. A redirect URL that is not allowed also returns 400.

Idempotency keys

An idempotency key must be 8–128 characters and use letters, digits, ., _, :, or -. You can send it in the Idempotency-Key header or as _idempotency_key in the body. If you send both, they must match. A retry is safe when you reuse the same key with the same request.

Browser origin and backend key

An Origin header makes the request a browser request. If you include a backend key too, the key is ignored. The origin must be allowed for the endpoint.

Email verification submission errors

When verification proof is missing or invalid, the submission response includes code: "email_verification" and a verificationCode with the specific reason. It can also include fieldId, errors, and fieldErrors. If fieldId is absent, discard every stored receipt and verify again.

{ "ok": false, "code": "email_verification", "error": "Verify the email address before submitting", "verificationCode": "EMAIL_VERIFICATION_REQUIRED", "fieldId": "FIELD_ID", "errors": [ { "field": "email", "message": "EMAIL_VERIFICATION_REQUIRED" } ], "fieldErrors": { "email": "EMAIL_VERIFICATION_REQUIRED" } }

Email verification errors

Most email verification endpoint errors include success: false, code, and error. They can include fieldId and retryAfter; when retryAfter is present, it is in seconds and is also sent in the Retry-After header. A 500 server error instead returns {"ok":false,"error":"Server error","code":"service"}.

StatusCodeMeaning
400 or 413validationThe body is not a JSON object or exceeds 8 KB.
400INVALID_REQUESTsessionId is missing or too long.
400CODE_INVALIDThe code is wrong, or a required code, attempt secret, session ID, or challenge ID is missing or malformed.
403authThe request has no Origin header, or its origin is not allowed.
404endpointThe endpoint is unknown or disabled.
409VERIFICATION_POLICY_CHANGEDThe field is not a verified email field on the published form, or the form’s verification setup changed. Drop stored field IDs and start again using field.
409UNSUPPORTED_VERIFICATION_POLICYThe form’s verification setup is invalid.
410CODE_EXPIREDThe code is too old. Request a new one.
415unsupportedThe request content type is not JSON.
422EMAIL_RISK_BLOCKEDThe address was rejected; no code was sent.
422VERIFICATION_VALUE_CHANGEDThe address, session, or origin differs from the one used to request the code.
423CODE_LOCKEDToo many incorrect codes were entered. Request a new code.
429RESEND_TOO_SOON, RATE_LIMITEDIt is too soon to request another code, or the request was rate limited. Wait for retryAfter.
429rateThe request was rate limited. Wait for retryAfter.
500serviceA server error occurred.
503DELIVERY_UNAVAILABLE, VERIFICATION_UNAVAILABLEThe email could not be sent, the form is closed, or the service is unavailable. Retry later.