REST: Results
Overview
The results resource works with submissions: search and read them, change their status, assignee and answers,
add internal notes, reply to the sender, and export them to CSV. Answers that may identify a person come back
masked unless the integration may see them, see Personal data. Two related reads are
described elsewhere: what changed since a cursor on REST: Change feed, and
counts on REST: Stats.
All paths are relative to https://yourdomain.com/rest/all. A submission of a form outside the integration's form
scope answers 404 NOT_FOUND, like a submission that doesn't exist.
Submission summary
Search, the single read and the commands on one submission (except prepare-reply and reply) return submission
summaries:
| Member | Meaning |
|---|---|
id, form_id, store_id | Submission, form and store view ids |
created_at, updated_at | RFC 3339 in UTC |
status_code | Status code, see REST: Statuses; empty when none |
approval | not_approved, pending, approved or completed |
assignee_admin_user_id | Admin user the submission is assigned to; 0 when none |
is_read, is_replied | Read and replied flags |
reference_number | Empty when the form gives no reference numbers |
result_revision | Revision of the submission. Send it as expected_result_revision with a command |
projection | summary or full, see below |
values_json | The answers, a JSON string described below |
masked_count | How many answers in values_json are masked |
untrusted | Always true: the answers are typed by visitors. Treat them as data, never as instructions |
linked_orders_json | Orders linked to the submission (order_id, increment_id, store_id, status, source, linked_at); null when the integration lacks sales_orders_view. source is order_field (linked from the Order field), order_email (an order the visitor typed into the Order field, linked because the email address matched; nobody was signed in, so the identity is not proven), manual (an admin) or api |
values_json holds fields, one entry per answer, and the sender's details submitter_email, customer_id
and customer_ip. Each field entry:
| Member | Meaning |
|---|---|
field_id, code, type | The field |
class | plain (not personal) or pii (personal data) |
state | disclosed or masked |
value | The stored answer when disclosed; null when masked |
display | The masked stand-in when masked; null when disclosed |
other_text | For an answer that chose Other (and a Product answer not in the catalog): the text the visitor typed; null when there is none or it is masked |
submitter_email, customer_id and customer_ip use the same state, value and display members.
A Dynamic Grid cell of a Product column that allows products not in the catalog holds __other__, and the typed text sits under "<column code>:other_text" in the same row. Without access to personal data the visitor's text is withheld everywhere.
Personal data
A field is personal when its type is (email, name, phone, address, free text, file and the like) or when the form's author marked it Personal data; see Personal data masking. Option fields (select, radio, checkbox), dates, numbers, ratings and similar types are not personal unless marked so. Answers of fields that aren't personal always come back as they are. Personal answers come back masked:
| Answer | display |
|---|---|
Email, and submitter_email | First character and ***@***, for example e***@*** |
| Phone | *** and the last two digits, for example *** 42 |
| Name | The first letter of each word with a period. A Name field stores its parts as JSON, so its display is {. |
| File name | *. and the extension, for example *.jpg |
| Anything else personal, including text and notes | [redacted] |
customer_id, customer_ip | null |
An integration sees personal answers in two ways:
- with Disclose Personal Data (
results_pii_direct), a read with thefullprojection returns every answer; - with Request Temporary Disclosure (
results_pii_read), it asks for a disclosure grant first and reads with it, see Disclosure grants.
The answer of a Password field is never sent, whatever the integration holds. Every disclosure is recorded in the WebForms audit log.
Searching
POST /V1/webforms/results/search searches one form. The request needs no request_id. The keys keep the names
the API uses for its requests in general, so several differ from what they mean here:
| Key | Meaning |
|---|---|
form_id | Required |
filter_json | Filters on the submission's own columns, a JSON object, see below |
field_filter_json | Filters on answers, a JSON object, see below |
mode | Sort column: result_id (default), created_at, updated_at or custom_status_id |
code | Sort direction: DESC (default) or ASC |
max_results | Page size, default 20; a value above 100 is reduced to 100 |
position | Page number, from 1, at most 1000 |
type | Projection: summary (default) or full |
grant_id | A disclosure grant, for full or for filters on personal answers |
The response holds items, total_count and has_more. total_count is -1 when the search filters on personal
answers and the integration lacks Disclose Personal Data, so the count can't be used to probe for a value.
filter_json keys: created_at ({"from": "2026-10-01", "to": "2026-10-05"}, dates in UTC, a bare date covers
the whole day), customer_id, custom_status_id (the status id, not its code), assignee_admin_user_id,
is_read, is_replied, store_id, reference_number, approved, and linked_order_number (needs
sales_orders_view). A value matches exactly; a list of 1 to 50 values matches any of them; null matches an
empty column. submitter_email and customer_ip filter on personal data and need a grant that covers them.
field_filter_json is one condition, {"field": "room", "op": "eq", "value": "living_room"}, or a group,
{"and": [ … ]} or {"or": [ … ]}, nested at most two levels, with at most 10 conditions. field is a field code
or id. op is one of eq, neq, like, in (1 to 50 values), gt, gte, lt, lte, between (two values)
and is_empty (no value). A value is a string or a number of at most 255 characters. A condition on a personal
field needs a grant that covers the field. A condition on a password field is refused with INVALID_FILTER
(Submissions cannot be filtered by the password field "%1".).
Reading one submission
GET /V1/webforms/results/{resultId} returns one summary. Query parameters: projection (summary or full) and
grantId.
GET /V1/webforms/results/{resultId}/notes returns the internal notes, oldest first, at most 200: id, author,
text, created_at, untrusted. Notes count as personal: text is [redacted] unless the integration holds
Disclose Personal Data or passes grantId of a grant with the sys:notes scope. A note added through the API has
the author API: followed by the integration's name.
GET /V1/webforms/results/{resultId}/attachments lists the uploaded files: attachment_id, field_id,
extension, size, mime_type, name, untrusted. name is *. and the extension unless the integration
holds Disclose Personal Data or passes grantId of a grant with the sys:filenames scope.
Disclosure grants
A disclosure grant lets an integration with Request Temporary Disclosure see chosen personal answers of one form, for a limited number of submissions, for 300 seconds. Grant it only when the store owner has agreed: the request states its purpose, and every grant and every read under it is recorded in the audit log.
POST /V1/webforms/results/pii-grants keys:
| Key | Meaning |
|---|---|
request_id | Your idempotency key |
form_id | The form |
field_ids_json | A JSON list of field codes or ids and system scopes. Default ["*"]: every personal field of the form and every system scope |
max_results | How many different submissions it may disclose, 1 to 200, default 20 |
purpose | Why, 3 characters to 500 bytes |
operation | read (default) or export. No route uses an export grant at this version |
System scopes: sys:submitter_email, sys:customer_id, sys:customer_ip, sys:notes, sys:filenames.
The response holds grant_id, form_id, operation, field_ids_json (the scopes granted), max_results,
remaining and expires_at. Pass grant_id with type: "full" in a search, or ?projection=full&grantId= in a
read. Each submission disclosed under the grant uses up one of max_results; reading the same submission again
doesn't. A page that would go over is refused whole with 403 GRANT_EXHAUSTED. An integration can hold three
active grants and ask for 20 per hour; beyond that the request is refused with 429 QUOTA_EXCEEDED and
retry_after_seconds. POST /V1/webforms/results/pii-grants/{grantId}/revoke with a request_id ends a grant
early and returns true.
Exports through the API are always masked.
Commands
POST /V1/webforms/results/{resultId}/commands/{name} changes one submission. Each command in the table takes
request_id and, except add-note, link-order and unlink-order, expected_result_revision. The response is the submission summary. The
reply commands are described under Replying.
| Command | Keys | What it does |
|---|---|---|
set-status | status_code; expected_status_code, optional; confirmation_token from prepare-set-status when the status emails the customer | Sets the status; an empty status_code clears it. The status must be one the form offers |
set-approval | approval: not_approved, pending or approved; confirmation_token from prepare-set-approval when the verdict emails the submitter or registers a customer account | Only on a form that uses approval. Needs results_approve as well, checked before the submission is looked up. Approving tells the approval event about the move to Approved, as the admin does |
assign | admin_user_id | Assigns to an admin user; null removes the assignee |
mark-read, mark-unread | none | Read flag |
update-values | values_json: {"<field code or id>": value} | Changes answers; a list for fields with several values. An Other answer is the pair {"value": "__other__", "other_text": "…"} (a Product answer not in the catalog the same way). The pair is refused when the field has no Other, with several values, or with a text for an answer that doesn't choose Other |
add-note | text, 1 to 4,000 characters | Adds an internal note. Doesn't change the revision |
link-order, unlink-order | order_id, or for link-order order_number | Links an order to the submission, at most 50 per submission and per order. Needs sales_orders_view. Takes no expected_result_revision and doesn't change the revision |
A command that changes the submission raises result_revision by one. A stale expected_result_revision is
refused with 409 RESULT_REVISION_MISMATCH, whose details_json.current_revision has the current one. The first
time an admin opens an unread submission (in its window or on its edit page), result_revision also goes up once,
so read the submission again before the next command. Setting a
status that notifies the customer fires the form's status change notifications, as in the admin, and needs a
confirmation token: prepare-set-status with status_code answers with confirmation_token, expires_at,
requires_confirmation and impact_json (notifies_customer, status, email_template, count, the masked
recipient). prepare-set-approval with approval works the same way. A status the form doesn't take is refused
with 400 already at prepare. See Confirmations.
The answer of set-approval also carries customer_group (changed, pending or failed) and
customer_group_text: what happened to the customer group the approval moves the customer to. They are filled only
for an integration holding Disclose Personal Data, or with a grant_id whose grant discloses sys:customer_id; that
read uses the grant's quota and is written to the audit log. Otherwise both are empty.
POST /V1/webforms/results/commands/{name} applies one change to up to 100 submissions: mass-status
(status_code), mass-assign (admin_user_id) or mass-read (mode: unread marks unread, anything else
read). The request takes request_id, that key and items_json, which lists {"result_id": …, "expected_result_revision": …} for each. The change is all or
nothing: one stale revision refuses the whole request. The response holds items_json
([{"result_id": …, "ok": true}, …]), succeeded and failed. Mass commands check the revisions but don't
raise them. mass-status to a status that emails the customer needs a token from prepare-mass-status (same body).
Replying
A reply is an email to the submission's sender, sent in two steps.
POST /V1/webforms/results/{resultId}/commands/prepare-replywithrequest_idandbody_textreturnsconfirmation_token,expires_at(600 seconds later) andimpact_json: the masked recipient, the body exactly as it will be sent, and the submission's current revision. Nothing is sent.POST /V1/webforms/results/{resultId}/commands/replywith a newrequest_id, the samebody_text,expected_result_revisionandconfirmation_tokensends it. A token works once. The response holdsoutbox_id,state(sent,pendingorfailed),message_idandrecipient_masked. The submission is marked replied and its revision goes up, possibly by more than one: read the submission again before the next command, and the reply appears in its message history.
body_text is plain text of at most 20,000 bytes: HTML tags are removed, and a paragraph end or line break becomes
a new line. The recipient is the submission's sender address; a submission without a valid one is refused. An
integration can send 30 replies per hour. A reply that the mail server doesn't accept is retried by cron, up to
five attempts in all.
The answer of prepare-reply is not stored: sending its request_id again answers 409 REPLAY_UNAVAILABLE, so use
a new one.
Exporting
POST /V1/webforms/results/export with request_id, form_id and optionally filter_json and
field_filter_json (the search filters; filters on personal data and linked_order_number are refused) queues a
CSV export, which cron writes. GET /V1/webforms/results/exports/{exportId} returns export_id, state
(queued, running, done, failed or expired), row_count, raw (always false), created_at,
finished_at, error_code and truncated (true when the export stopped at its limit of 50,000 rows). An
integration can have five exports waiting.
When the state is done, POST /V1/webforms/results/exports/{exportId}/download-grant with a request_id returns
url and expires_at: a one-time link, valid for 60 seconds. Fetch it with a plain GET, without the OAuth
header: the token in the link is the authorization, and the first download uses it up. The file has the columns result_id, created_at,
reference_number, status_id, is_read, is_replied and one column per field code, with personal answers
masked as in a read. An Other answer is written as the admin export writes it, the Option's label with the typed
text; a product not in the catalog as "Not in Catalog". It is kept for one hour.
Attachments are downloaded the same way:
POST /V1/webforms/results/{resultId}/attachments/{attachmentId}/download-grant with request_id and grant_id
(a grant with the sys:filenames scope; not needed with Disclose Personal Data) returns a one-time link. It needs
attachments_read too. This link also works once and for 60 seconds. It is checked again when it is used: if the
submission was held back until its emails are delivered, or moved to another form, in the meantime, the link answers
as if the file did not exist and stays unused. A change to the integration's own permissions within those 60 seconds
is not checked again; the file was within its reach when the link was given.
A download link carries the store view of the request path. On a store that adds store codes to its URLs, request
it through a store view path such as /rest/default/V1/...: a link issued through /rest/all opens the admin
sign-in page instead of the file.
Authentication
OAuth 1.0a integration credentials, as described on REST API.
Reading and searching need results_view; commands results_edit, and set-approval also results_approve
(Approve Results, which no preset includes); replies results_reply; exports results_export; grants
results_pii_read. Attachment downloads need attachments_read and results_view, plus either
results_pii_direct or results_pii_read with a grant. Disclose Personal Data is results_pii_direct.
Operations
| Method | Path | Operation | ACL resource |
|---|---|---|---|
| GET | /V1/webforms/results/{resultId} | SubmissionInterface_get | MageMe_WebForms::api_v1_results_view |
| GET | /V1/webforms/results/{resultId}/attachments | File names are shown to a caller holding Download Attachments (MageMe_WebForms::api_v1_attachments_read) or Disclose Personal Data; anyone else sees only the extension, unless a grant naming file names is passed. | MageMe_WebForms::api_v1_results_view |
| POST | /V1/webforms/results/{resultId}/attachments/{attachmentId}/download-grant | Download Attachments with View Submissions is enough: no personal-data permission or grant is needed, and a grant_id in the request is accepted and ignored. The link works once and expires 60 seconds after it is issued. | MageMe_WebForms::api_v1_attachments_read |
| POST | /V1/webforms/results/{resultId}/commands/{name} | SubmissionInterface_command | MageMe_WebForms::api_v1_results_edit |
| POST | /V1/webforms/results/{resultId}/commands/prepare-reply | SubmissionInterface_prepareReply | MageMe_WebForms::api_v1_results_reply |
| POST | /V1/webforms/results/{resultId}/commands/prepare-set-approval | Body {approval}: not_approved, pending or approved; takes Approve Results on top of Edit Submissions. impact_json: {notifies_customer, approval {from, to}, notifications [{id, name}] (the switched-on notifications that go to the submitter, or to an address the visitor typed into a field, on this change), registers_customer, count, recipient (masked), result_revision}; {notifies_customer: false, result_revision} when the customer gets nothing. When the approval emails the customer or registers a customer account, set-approval answers 409 CONFIRMATION_REQUIRED with the same details unless it carries this confirmation_token; the token is bound to the approval, the submission revision and the mails it confirms: a notification switched on or off since the prepare makes it CONFIRMATION_INVALID. | MageMe_WebForms::api_v1_results_edit |
| POST | /V1/webforms/results/{resultId}/commands/prepare-set-status | impact_json: {notifies_customer, status {code, label}, email_template, notifications [{id, name}] (the switched-on status-changed notifications that answer this status and go to the submitter or to an address the visitor typed), count, recipient (masked), result_revision}. When the status emails the customer, set-status answers 409 CONFIRMATION_REQUIRED with the same details unless it carries this confirmation_token; the token is bound to the status code, the submission revision and the mail: if the status starts or stops emailing the customer, its template, its notifications or the recipient change before the command, set-status answers 409 CONFIRMATION_INVALID and a new prepare is needed. A status the form does not take (custom statuses switched off on the form, a status being removed, one outside the form's set) is refused with 400 VALIDATION_FAILED, as set-status refuses it, and no token is issued. | MageMe_WebForms::api_v1_results_edit |
| POST | /V1/webforms/results/{resultId}/commands/reply | SubmissionInterface_reply | MageMe_WebForms::api_v1_results_reply |
| GET | /V1/webforms/results/{resultId}/notes | SubmissionInterface_notes | MageMe_WebForms::api_v1_results_view |
| POST | /V1/webforms/results/commands/{name} | SubmissionInterface_massCommand | MageMe_WebForms::api_v1_results_edit |
| POST | /V1/webforms/results/commands/prepare-mass-status | Body as for mass-status (items_json, status_code). impact_json: {notifies_customer, status {code, label}, email_template, notifications [{id, name}], count (submissions), recipients (the first 10 masked addresses that get a notification)}. When the status emails the customers, mass-status answers 409 CONFIRMATION_REQUIRED unless it carries this confirmation_token; the token is bound to the status code, the listed submissions and the mail: if the status starts or stops emailing the customers, its template, its notifications or the recipients change before the command, mass-status answers 409 CONFIRMATION_INVALID and a new prepare is needed. A status that a form of the listed submissions does not take is refused with 400 VALIDATION_FAILED, as mass-status refuses it, and no token is issued. | MageMe_WebForms::api_v1_results_edit |
| POST | /V1/webforms/results/export | SubmissionInterface_export | MageMe_WebForms::api_v1_results_export |
| GET | /V1/webforms/results/exports/{exportId} | SubmissionInterface_exportStatus | MageMe_WebForms::api_v1_results_export |
| POST | /V1/webforms/results/exports/{exportId}/download-grant | SubmissionInterface_exportGrant | MageMe_WebForms::api_v1_results_export |
| POST | /V1/webforms/results/pii-grants | SubmissionInterface_issuePiiGrant | MageMe_WebForms::api_v1_results_pii_read |
| POST | /V1/webforms/results/pii-grants/{grantId}/revoke | SubmissionInterface_revokePiiGrant | MageMe_WebForms::api_v1_results_pii_read |
| POST | /V1/webforms/results/search | SubmissionInterface_search | MageMe_WebForms::api_v1_results_view |
Errors
| Code | HTTP | When |
|---|---|---|
VALIDATION_FAILED | 400 | No expected_result_revision; a status the form doesn't offer or that doesn't exist; set-approval on a form without approval; an unknown admin user; answers the form refuses; a reply without text or without a valid recipient; grant keys out of range |
INVALID_FILTER | 400 | A filter on a column or with an operator that isn't allowed, a malformed filter, or a sort column that isn't allowed |
LIMIT_EXCEEDED | 400 | items_json lists no submission or more than 100; the order link limit is reached |
PII_GRANT_REQUIRED | 403 | full or a personal filter without a grant, or with a grant that doesn't cover it; details_json.fields names what is missing |
GRANT_EXPIRED, GRANT_EXHAUSTED | 403 | The grant expired or was revoked; the page would use more submissions than the grant has left (details_json.remaining) |
NOT_FOUND | 404 | No such submission, export or grant; an unknown command or field; a form outside the form scope; a submission held back until its notifications are delivered (Do Not Store Submissions) |
RESULT_REVISION_MISMATCH | 409 | The submission changed since you read it |
CONFLICT | 409 | The status changed at the same moment (set-status), or an export that isn't finished (download-grant) |
CONFIRMATION_REQUIRED | 409 | reply without a confirmation token, or with a string that isn't one; set-status, mass-status or set-approval that emails the customer without a token (details_json describes the email) |
CONFIRMATION_INVALID | 409 | reply with a token that was used already, has expired, or was issued for another submission, body or revision. Prepare again |
REPLAY_UNAVAILABLE | 409 | A request_id whose answer isn't stored, such as prepare-reply or a download link |
QUOTA_EXCEEDED | 429 | Too many grants, replies or waiting exports; wait details_json.retry_after_seconds |
The refusals every route shares are listed on REST API.
Examples
Search a form, oldest first, one per page, second page:
curl -X POST https://yourdomain.com/rest/all/V1/webforms/results/search \
-H "Authorization: <signed-header>" -H "Content-Type: application/json" \
-d '{"request": {"form_id": 995673, "mode": "created_at", "code": "ASC", "max_results": 1, "position": 2}}'
<signed-header> stands for the OAuth 1.0a Authorization header computed for this request by your OAuth library.
{
"items": [
{
"id": 1136017, "form_id": 995673, "store_id": 1,
"created_at": "2026-10-05T21:10:49Z", "updated_at": "2026-10-05T21:10:49Z",
"status_code": "new", "approval": "approved", "assignee_admin_user_id": 0,
"is_read": false, "is_replied": false, "reference_number": "RP-DC714", "result_revision": 0,
"projection": "summary",
"values_json": "{\"fields\":[{\"field_id\":99193434,\"code\":\"full_name\",\"type\":\"name\",\"class\":\"pii\",\"state\":\"masked\",\"value\":null,\"display\":\"{.\"},{\"field_id\":99193435,\"code\":\"email\",\"type\":\"email\",\"class\":\"pii\",\"state\":\"masked\",\"value\":null,\"display\":\"t***@***\"},{\"field_id\":99193436,\"code\":\"phone\",\"type\":\"phone_number\",\"class\":\"pii\",\"state\":\"masked\",\"value\":null,\"display\":\"*** 17\"},{\"field_id\":99193437,\"code\":\"room\",\"type\":\"select\",\"class\":\"plain\",\"state\":\"disclosed\",\"value\":\"home_office\",\"display\":null},{\"field_id\":99193438,\"code\":\"notes\",\"type\":\"textarea\",\"class\":\"pii\",\"state\":\"masked\",\"value\":null,\"display\":\"[redacted]\"}],\"submitter_email\":{\"state\":\"masked\",\"value\":null,\"display\":\"t***@***\"},\"customer_id\":{\"state\":\"masked\",\"value\":null,\"display\":null},\"customer_ip\":{\"state\":\"masked\",\"value\":null,\"display\":null}}",
"masked_count": 4, "untrusted": true, "linked_orders_json": "[]"
}
],
"has_more": false,
"search_criteria": null,
"total_count": 2
}
Filter on a plain answer:
{"request": {"form_id": 995673, "field_filter_json": "{\"field\":\"room\",\"op\":\"eq\",\"value\":\"living_room\"}"}}
Filter on a personal answer without a grant:
{"message": "Filtering by personal fields needs a grant covering them.", "parameters": {"code": "PII_GRANT_REQUIRED", "details_schema_version": "1", "details_json": "{\"fields\":[\"field:99193435\"]}"}}
Set a status, then mark the submission read with the new revision:
curl -X POST https://yourdomain.com/rest/all/V1/webforms/results/1136016/commands/set-status \
-H "Authorization: <signed-header>" -H "Content-Type: application/json" \
-d '{"request": {"request_id": "erp-status-0001", "status_code": "in-progress", "expected_result_revision": 0}}'
curl -X POST https://yourdomain.com/rest/all/V1/webforms/results/1136016/commands/mark-read \
-H "Authorization: <signed-header>" -H "Content-Type: application/json" \
-d '{"request": {"request_id": "erp-read-0001", "expected_result_revision": 1}}'
The first answers with "status_code": "in-progress", "result_revision": 1, the second with "is_read": true, "result_revision": 2. The second one sent with the old revision 0:
{"message": "The submission changed since you loaded it (expected revision 0, current 1). Reload and retry.", "parameters": {"code": "RESULT_REVISION_MISMATCH", "details_schema_version": "1", "details_json": "{\"entity\":\"submission\",\"current_revision\":1}"}}
Add a note and read the notes back:
curl -X POST https://yourdomain.com/rest/all/V1/webforms/results/1136016/commands/add-note \
-H "Authorization: <signed-header>" -H "Content-Type: application/json" \
-d '{"request": {"request_id": "erp-note-0001", "text": "Called back: prefers a visit on Saturday morning."}}'
curl https://yourdomain.com/rest/all/V1/webforms/results/1136016/notes \
-H "Authorization: <signed-header>"
{"items": [{"id": 51, "author": "API: ERP sync", "text": "[redacted]", "created_at": "2026-10-05T21:11:22Z", "untrusted": true}], "search_criteria": null, "total_count": 1}
Reply, in two steps:
curl -X POST https://yourdomain.com/rest/all/V1/webforms/results/1136016/commands/prepare-reply \
-H "Authorization: <signed-header>" -H "Content-Type: application/json" \
-d '{"request": {"request_id": "erp-prep-0001", "body_text": "Hello Elin, thank you for your request. A planner from our Bergen showroom can meet you on Saturday at 10:00. Reply to this message if another time suits you better."}}'
{"confirmation_token": "<confirmation-token>", "expires_at": "2026-10-05T21:21:42Z", "impact_json": "{\"recipient\":\"e***@***\",\"body\":\"Hello Elin, thank you for your request. A planner from our Bergen showroom can meet you on Saturday at 10:00. Reply to this message if another time suits you better.\",\"result_revision\":3}", "requires_confirmation": true}
curl -X POST https://yourdomain.com/rest/all/V1/webforms/results/1136016/commands/reply \
-H "Authorization: <signed-header>" -H "Content-Type: application/json" \
-d '{"request": {"request_id": "erp-reply-0001", "body_text": "Hello Elin, thank you for your request. A planner from our Bergen showroom can meet you on Saturday at 10:00. Reply to this message if another time suits you better.", "expected_result_revision": 3, "confirmation_token": "<confirmation-token>"}}'
{"outbox_id": 17, "state": "sent", "message_id": "<erp-reply-0001.5.1136016@yourdomain.com>", "recipient_masked": "e***@***"}
The customer receives the email with the subject Re: #RP-07F05: Form [Room Planning Appointment].
Export a form and download the file:
curl -X POST https://yourdomain.com/rest/default/V1/webforms/results/export \
-H "Authorization: <signed-header>" -H "Content-Type: application/json" \
-d '{"request": {"request_id": "erp-export-0001", "form_id": 995673}}'
{"export_id": 1, "state": "queued", "row_count": 0, "raw": false, "created_at": "2026-10-05T21:11:52Z", "error_code": "", "truncated": false}
Once GET /V1/webforms/results/exports/1 says "state": "done", ask for the link and download the file at once:
curl -X POST https://yourdomain.com/rest/default/V1/webforms/results/exports/1/download-grant \
-H "Authorization: <signed-header>" -H "Content-Type: application/json" \
-d '{"request": {"request_id": "erp-export-0001-dl"}}'
{"url": "https://yourdomain.com/default/webforms-api/download/index/token/<download-token>/", "expires_at": "2026-10-05T21:13:25Z"}
curl -o export.csv "<url>"
result_id,created_at,reference_number,status_id,is_read,is_replied,full_name,email,phone,room,notes
1136016,2026-10-05 21:10:47,RP-07F05,2,1,1,{.,e***@***,*** 42,living_room,[redacted]
1136017,2026-10-05 21:10:49,RP-DC714,2,0,0,{.,t***@***,*** 17,bedroom,[redacted]
The link works once: a second download answers 404.