api set fields
Queue many multipart text fields from a JSON object
Queue many multipart form text fields from a JSON object. Merge into the session form queue (same keys overwrite). Send with a bare api post / put / patch.
Syntax
When I api set fields to '<json-object>'Prefer single quotes around the JSON object so inner " do not need escaping.
Qualifiers
| Qualifier | Role | Example |
|---|---|---|
to | JSON object of field → value | api set fields to '{"folder":"docs","type":"invoice"}' |
Requirements
| Item | Contract |
|---|---|
| Element / control shape | None — HTTP session (Platform: api) |
| How the label binds | Path / body / headers are payloads ($ENV, slots expand) |
| Qualifiers that change resolve | See this command’s Qualifiers table |
| Platform | Platform: api only — requires $API_BASE_URL (and auth env as needed) |
| Wrong shape → use instead | UI XHR wait → wait for response. Browser UI → web commands |
See also UI contracts and Platform: api.
Examples
When I api set fields to '{"folder":"@folder-id","type":"invoice"}'
When I api set field "name" to "Invoice"
When I api set file "main" to "invoice.pdf"
When I api post "/upload"Notes
- The payload must be a JSON object (not an array or bare string). Non-string values are stringified for multipart text parts.
- Values inside the object expand via shared resolve (
$ENV, slots,{{faker}}) after the whole quoted string is resolved. - Use api set field for one key at a time; you can mix both.
- Pending form +
with body/with body fileon the same send step fails.