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.)

Path Parameters

form_idstring

Header Parameters

Accept?string

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

Response Body

curl -X POST "https://forms.vexrun.com/v1/forms/string" \  -H "Accept: string"
{
  "success_title": "string",
  "success_message": "string",
  "redirect_url": "string"
}
Empty
{
  "message": "string"
}
{
  "message": "string",
  "error": "form_disabled"
}
{
  "message": "string"
}