Skip to main content

POST /v1/forms/:idOrSlug/submit

Submits data to a published form. The submitted data will be validated against the form’s field definitions.

Path Parameters

Body Parameters

The body of the request should be a JSON object where the keys correspond to the id of each form field, and the values are the submitted data for those fields.

Example Request

# By Slug
curl -X POST "https://api.example.com/v1/forms/contact-form/submit" \
     -H "Content-Type: application/json" \
     -d '{
       "name": "Jane Doe",
       "email": "[email protected]"
     }'

# By ID
curl -X POST "https://api.example.com/v1/forms/form_123/submit" \
     -H "Content-Type: application/json" \
     -d '{
       "name": "Jane Doe",
       "email": "[email protected]"
     }'

Example Response

{
  "success": true,
  "submission_id": "sub_abc",
  "message": {
    "en": "Thank you for your submission!"
  },
  "redirect_url": null
}