REST: Form (3.x)
Overview
These routes are the form part of the REST API that WebForms 3 had. WebForms 4 keeps them unchanged so that existing clients keep working. New integrations should use the Management API instead: see REST API and REST: Forms.
| Route | What it does |
|---|---|
GET /V1/webforms/form/{id} | The live form: settings, sections and fields |
GET /V1/webforms/form/{id}/results | The form's submissions with their answers, oldest first |
POST /V1/webforms/form/{id}/submit | Sends a new submission to the form, as a visitor would |
Paths are relative to https://yourdomain.com/rest/all. A store view code works in place of all:
/rest/<store_code>/V1/webforms/form/{id}returns the store view's names and settings, and each field also carriesstore(the store view id) anduse_default(which keys fall back to the default values). Under/rest/allyou get the default values.submitreads the form as the store view named in the URL sees it.
Calls to GET /form/{id}/results and the Result routes that pass Magento's permission check add an entry to the WebForms audit log (event legacy_route), also when the form turns out to be outside the caller's form access. The entries show which clients still read submissions through the WebForms 3 routes. GET /form/{id} reads no submissions and adds no entry.
The submissions list returns personal answers in full only to a caller whose role holds Disclose Personal Data, and writes a Personal Data Read entry to the audit log. Without it, each personal answer is replaced by the same stand-in the Management API sends (see Personal data masking) and the field carries masked: true. The submission's customer_ip reads [redacted] and customer_id is null; in submitted_from_serialized the page addresses keep only their origin and the page title reads [redacted]. Empty values stay empty. The value of a password field is never returned. Without the permission, a filter on a personal field, a field that was ever personal, submitter_email, submitter_name, customer_ip, customer_id or inbox_label is refused with Filtering submissions by personal data needs the "Disclose Personal Data" permission.; the customerId route argument counts as a customer_id filter. With the permission, such a filter is recorded in the audit log, also when nothing matches.
Authentication
The routes accept any Magento web API credentials whose role holds the permission listed for the route: an integration signed with OAuth 1.0a, or an admin token (POST /V1/integration/admin/token). The permissions are under WebForms → API in the resource tree of the integration or the admin role:
| Permission | Routes |
|---|---|
| View Forms and Schema | GET /form/{id} |
| View Submissions (Masked) | GET /form/{id}/results; real answers only with Disclose Personal Data as well |
| Submit Forms and Upload Files | POST /form/{id}/submit |
| Edit Submissions | Needed as well when a submit carries result_id |
A request without credentials, or with credentials that lack the permission, is refused by Magento with 401 (The consumer isn't authorized to access %resources.).
The two reads follow the caller's form access: an integration or role limited to selected forms gets 404 for any other form, the same answer as for a form id that does not exist. A submit that carries result_id follows the caller's form access too: it needs Submit Forms and Upload Files and Edit Submissions, and a submission of a form outside the caller's reach answers Access denied. A submit that creates a new submission does not look at form access.
Limiting an integration to selected forms therefore does not limit new submissions through submit or the upload route: with Submit Forms and Upload Files it can submit to any form. Do not rely on form scope for these two 3.x routes. For a client that must stay within its forms, use the Management API instead and do not give it Submit Forms and Upload Files.
Operations
| Method | Path | Operation | ACL resource |
|---|---|---|---|
| GET | /V1/webforms/form/{id} | FormRepositoryInterface_getDataById | MageMe_WebForms::api_v1_forms_view |
| GET | /V1/webforms/form/{id}/results | One page of the form's submissions, oldest first (3.x route) | MageMe_WebForms::api_v1_results_view |
| POST | /V1/webforms/form/{id}/submit | Submit the form, or update one of its submissions (3.x route) | MageMe_WebForms::api_submission |
Reading a form
GET /V1/webforms/form/{id} answers with a JSON array holding one object: the form settings (form_id, name, code, is_active, success_text, submit_button_text, captcha_mode, url_key and others) and fieldsets, a list of groups of fields. Each field carries its field_id, code, type, name, is_required, pii_class, its type-specific settings, and logic_visibility.
- A group of a section has the section's id as
fieldset_id. - Fields outside any section are in a group with
fieldset_id: 0. - Fields shown below all sections, such as the submit button, are in a group whose
fieldset_idis a string ending in-below(for example"0-below").
Only live forms are found: the id of a draft or a saved version answers 404.
Listing submissions
GET /V1/webforms/form/{id}/results returns one page of submissions as a JSON array, oldest first: 20 without pageSize, at most 100. Read the pages until one comes back shorter than the page size. Query parameters, all optional:
| Parameter | Meaning |
|---|---|
filter | A JSON object. Keys are any column of the submissions table (for example result_id, store_id, customer_id, customer_ip, approved, is_read, is_replied, created_at, updated_at, reference_number, submitter_email, assignee_admin_user_id, custom_status_id; add-ons add columns of their own) or field_<field_id> for an answer. Any other key is refused, and so is a password field (400, Submissions cannot be filtered by the password field "%1". with the field's label). A value containing % matches as a pattern ("lena%"); any other value must match exactly. created_at also takes {"from": "2026-10-01", "to": "2026-10-31"} (whole days), result_id takes {"from": 100, "to": 200} |
customerId | Only the submissions of this customer account |
pageSize | Submissions per page, from 1. Default 20; a larger value than 100 is reduced to 100 |
currentPage | Page number, from 1; used with pageSize. A page past the last one is an empty array |
Each submission has result_id, form_id, store_id, customer_id, customer_ip, approved, created_at, updated_at, reference_number, custom_status and fields: one {field_id, code, value} entry per field of the form. A file field's value is the hash of the stored file; a password field's value is empty (a row of dots if the field was deleted from the form later). Answers to fields deleted from the form after the submission come last, with archived: true, label and display.
Submitting
POST /V1/webforms/form/{id}/submit takes the answers in a field object keyed by field id:
{"field": {"99193222": "Lena Hartmann", "99193223": "lena.hartmann@example.com", "99193224": "The oak dining tables and the Fjord sofa in grey.", "99193225": "<hash from the upload route>"}}
- For a file field, upload the file first with REST: Upload (3.x) and send the hash it returns.
- This route does not check the form's CAPTCHA: access is controlled by the API credentials and their permissions. The other checks of the storefront apply: required fields, validation rules, unique values.
- With
result_idin the body, the request rewrites that existing submission instead of creating a new one: answers you leave out are emptied (uploaded files stay). To change only some answers, usePOST /result/{id}/updatefrom REST: Result (3.x) instead. The submission must belong to the same form, within the caller's form access, and the caller needs Edit Submissions; otherwise the answer issuccess: falseandAccess denied. - A form with a Terms field can be submitted through this route without the visitor's consent. The submission is saved, and no consent is recorded for it.
The answer is a JSON array with one object. Validation problems are not HTTP errors: they come back with status 200 and success: false.
| Member | Meaning |
|---|---|
success | Whether the submission was saved |
errors | Messages meant for the visitor; empty on success |
result | Id of the saved submission (a string), or false |
A form switched off in the store view answers success: false and Web-form is not active.
Errors
These routes use Magento's own error shape: a message with %1-style placeholders and their values in parameters. There is no parameters.code as in the Management API.
| HTTP | When |
|---|---|
200 with success: false | Submit: a required field is empty, a value fails validation, the form is switched off, or result_id is refused |
| 400 | filter names a key that is neither a submission column nor field_<id> of this form (The filter key "%1" is not a submission column or a field_<id> reference.); pageSize or currentPage below 1 |
| 401 | No credentials, or the caller lacks the route's permission |
| 404 | No live form with this id, or a form outside the caller's form access (Unable to find form with ID "%1") |
Examples
Ids come back as strings in some members and as numbers in others ("form_id": "995656" on the form, "form_id": 995656 on a submission). Accept both.
Read a form:
curl https://yourdomain.com/rest/all/V1/webforms/form/995656 \
-H "Authorization: Bearer <admin-token>"
[{"form_id": "995656", "name": "Showroom Visit Request", "code": "showroom_visit", "is_active": true, "captcha_mode": "default", "submit_button_text": "Submit",
"fieldsets": [
{"fieldset_id": 0, "logic_visibility": "visible", "fields": [{"field_id": "99193222", "form_id": "995656", "type": "text", "name": "Your name", "code": "visitor_name", "is_required": "1", "pii_class": "pii", "logic_visibility": "visible"}]},
{"fieldset_id": "0-below", "name": "", "logic_visibility": "visible", "fields": [{"field_id": "99193226", "type": "submit", "name": "Submit", "code": "submit"}]}
]}]
The submissions whose email starts with lena, one per page, second page:
curl -G https://yourdomain.com/rest/all/V1/webforms/form/995656/results \
-H "Authorization: Bearer <admin-token>" \
--data-urlencode 'filter={"field_99193223": "lena%"}' \
--data-urlencode "pageSize=1" \
--data-urlencode "currentPage=2"
Submit:
curl -X POST https://yourdomain.com/rest/all/V1/webforms/form/995656/submit \
-H "Authorization: Bearer <admin-token>" \
-H "Content-Type: application/json" \
-d '{"field": {"99193222": "Lena Hartmann", "99193223": "lena.hartmann@example.com"}}'
[{"success": true, "errors": [], "result": "1136014"}]
The same request without the name and email:
[{"success": false, "errors": ["Your name is required", "Email is required"], "result": false}]