Create Submission

POST/v1/forms/{form_id}

Submits data to a form. View examples.

Request Formats

This endpoint accepts submissions in two formats:

  • application/json
  • multipart/form-data

Special Handling for multipart/form-data

  • If a field named $ is present, all other non-file fields are ignored.
  • If $ contains a valid stringified JSON object, it will be parsed and used as the submission data.
  • If $ contains any other value, it will be ignored.

Common Errors

We have separated common errors to 422 (303 if you are using Accept: text/html) response to help you better handle them.

Here is a breakdown of all common error codes:

CodeDescription
file_storage_limit_reachedYour team has reached its file storage limit.
form_disabledThe form is currently disabled. You can enable or disable the form in the dashboard or by using this endpoint.
no_dataNo data was submitted.
rate_limitThe rate limit has been exceeded. Please wait at least 10 seconds before submitting another form from the same IP address.
submission_limit_reachedConfigured form limit has been reached or your team has reached the total submission limit counted across all forms it owns.
validation_errorThe submission did not pass validation. (Reserved for future use.)

Submission Data Limits

The following limits apply to all submissions. Any submission that exceeds a limit will be rejected with a 413 Payload Too Large error.

LimitMax ValueDescription
Field Name100 BMaximum length of a field name (JSON key or name attribute in an input).
Property Count1000Maximum number of fields/properties per submission.
File Count10Maximum number of files that can be uploaded in a single submission.
Submission Size100 KBMaximum total size of all non-file data after being stringified as JSON.
File Upload Limit100 MBCombined size limit for all uploaded files per submission.

Path Parameters

form_id*string

Header Parameters

Accept?string

Specifies preferred response format: application/json for JSON or text/html for a redirect.

Response Body

application/json

application/json

application/json

application/json

const body = JSON.stringify({  "email": "test@vexrun.com",  "name": "John Doe",  "message": "Hello!"})fetch("https://example.com/v1/forms/{form_id}", {  method: "POST",  headers: {    "Content-Type": "application/json"  },  body})
{  "success_title": "string",  "success_message": "string",  "redirect_url": "string"}
Empty
{  "message": "string"}
{  "message": "string",  "error": "form_disabled"}
{  "message": "string"}