Update many fields
update_fieldsBatch-update multiple existing fields in the active workspace in a single call.
Each item in `updates` is `{"field_id": ..., x?, y?, w?, h?, name?,
field_type?, align?, vertical_align?}`. Only keys provided with non-`None`
values overwrite the target field's attributes; omitted keys keep their
existing values, and edited ML fields (`source="ml"`) are promoted to
`source="agent"` (`confidence=1.0`).
Partial-failure & persistence semantics: unknown `field_id`s are skipped and
reported in `unknown_field_ids` while all valid updates in the batch are
applied and listed in `updated`. However, an invalid `field_type`, `align`,
or `vertical_align` raises an error and aborts the entire batch without
saving partial edits. Changes persist immediately in `workspace_id` without
affecting saved templates unless `save_template` is called.
When to use:
- Prefer `update_fields` over repeated `update_field` calls whenever renaming,
repositioning, or resizing 2 or more fields at once.
- Use `update_field` for a single field, or `add_field` to create new fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| updates | Yes | List of partial-update dicts, each with `'field_id'` (str) plus any attributes to modify: `'x'`, `'y'`, `'w'`, `'h'` (float, `0.0`–`100.0` % of page), `'name'` (str), `'field_type'` (`'text'|'number'|'date'|'checkbox'|'radio'|'signature'|'dropdown'|'field'|'cell'`), `'align'` (`'left'|'center'|'right'`), or `'vertical_align'` (`'top'|'middle'|'bottom'`). Omitted keys keep their existing values. | |
| workspace_id | Yes | Active workspace ID returned by `open_pdf` (`summary.workspace_id`). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||