REST API
WebForms REST API allows deep integration with your 3rd party software. Please configure your REST API role permissions first before using it.
Get form information
Get all available form information such as name, code, description texts, configuration options, fields and fieldsets.
Endpoint: /rest/V1/webforms/form/#FORM ID#
#FORM ID# is the actual form id number you can see on Manage Forms page.
Submit the form
Submit the form using the REST API. You can submit any custom data you would like to collect. Please use Hidden fields to store extra information with the submission.
Endpoint: /rest/V1/webforms/form/#FORM ID#/submit
Accepted parameters
| Parameter | Description |
|---|---|
| field[FIELD ID] | The value for the field. For example: field[15]=John & field[16]=Doe. |
| submitted_from | Use this parameter to set the page information where the form was submitted. It should be in JSON format: {"url":"URL of the page","title":"Title of the page"} |
| referrer_page | This parameter stores URL of the referrer page that the customer came from. For example: https://some-partner-site.com |
| customer_id | The ID of the customer. |
| result_id | Set the result ID if you want to update existing record. |
Update fields of an existing result
Update one or more fields of an existing submission without re-sending the whole form. Only the fields you pass are changed — every other stored value is left untouched.
Unlike the result_id option of the Submit the form endpoint, this endpoint stores the values you send as-is, regardless of conditional logic. This makes it possible to set Hidden and read-only fields that a regular submission would otherwise skip.
Endpoint: /rest/V1/webforms/result/#RESULT ID#/update (POST method)
Accepted parameters
| Parameter | Description |
|---|---|
| field[FIELD ID] | The new value for the field. For example: field[45]=Example value. Send an empty value to clear a simple field. |
Notes
- Only the fields present in the request are updated; all other values stay as they are.
- Each field must belong to the form of the result, otherwise the request is rejected.
- Submitted values are validated (required, patterns, and so on). If a check fails, nothing is saved and the call returns an error.
- File and image fields cannot be updated through this endpoint (the request is rejected). To add or replace uploaded files, use the file upload endpoint together with a form submission.
- Password fields cannot be updated through this endpoint.
- This endpoint requires the Update Submitted Result API permission.
- Updating fields does not change the submission's approval status — an already approved submission stays approved after the update. Re-moderate it from the admin if a change needs another review.
A successful call returns {"success": true, "result_id": #RESULT ID#}. Invalid input returns an error response describing the reason.
File upload
Please enable the Dropzone option for the file upload field.
The file upload should be performed before the form submission takes place.
Endpoint: /rest/V1/webforms/upload/#FIELD ID#
Accepted parameters
| Parameter | Description |
|---|---|
| filename | The name of the file. |
| mime_type | Mime type of the uploaded file. |
| content | The base64 encoded content of the file. |
The returned array has the following structure: [success(boolean), error messages(array), hash(string)]. You can upload multiple files by posting to the upload endpoint.
All obtained hashes should be joined with the ";" separator and sent in the field[FIELD ID] with the main submission. Example: hash1;hash2;hash3.
When you update an existing record (by passing result_id), previously uploaded files are kept. Upload and pass new hashes only for the files you want to add or replace.
Get form results
Get all form submissions.
Endpoint: /rest/V1/webforms/form/#FORM ID#/results
Accepted parameters
| Parameter | Description |
|---|---|
| filter | Filter results by parameters. |
filter can have queries like {"field_FIELD_ID" = "some value"}. Use % for wildcard search. Example of the filter query:
{"field_15":"Some Text%","created_at":{"from":"2020-01-01","to":"2020-01-31"},"customer_id":"15"}
You can use the result structure for possible filter parameters.
Get result by ID
Get individual result information.
Endpoint: /rest/V1/webforms/result/#RESULT ID#