# send_template_bulk

> Send a Ready saved template to many people: one envelope per row (up to 500 rows).

Tool of the AppliFlo MCP server at `https://appliflo.com/api/mcp`. Kind: destructive: it emails people or cancels a send, so clients ask you first.

Send a Ready saved template to many people: one envelope per row (up to 500 rows). Call list_templates FIRST and pass the template's current `version` and its roles[].key values as the keys of each row's `people`. Each row is checked like the app's review step: a blank row, a missing or invalid email, the same person twice for a role, or two roles sharing an email leaves that row out (reported in rows[] with its issues); the rest are queued and sent in the background. Prefill only sender_fields with `bulk: true` (by index). Returns batch_id: poll get_bulk_batch for progress. Refused with 409 template_not_ready (Draft) or version_mismatch (the template was finalised again: call list_templates again). Pass idempotency_key when retrying so the batch isn't started twice. Confirm the list with the user first: this sends real email. An AppliFlo library contract no lawyer has reviewed is refused (409 contract_risk_required) until the person accepts the own-risk terms: ask them, then call again with risk_accepted: true. Sending to many needs risk_accepted: true on every start. Two steps: called WITHOUT confirm: true it does nothing and returns an error saying what it would do (the details are in structuredContent); show that to the user and, once they agree, call again with the same arguments and confirm: true. Some hosted government forms (e.g. USCIS I-130, SSA SS-5, IRS 8879) are fill-and-print only: any send of them is refused (422 esign_not_allowed); download the filled PDF instead. A form whose agency may reject an e-signature needs esign_risk_acknowledged: true (422 esign_ack_required without it). Masked values (•••123) can't be sent back: ask the person for the full number.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `template_id` | string | yes | saved_templates[].template_id from list_templates |
| `version` | integer | yes | saved_templates[].version from list_templates (required). At least 1 |
| `rows` | object[] | yes | One envelope per row. 1 to 500 items |
| `rows[].people` | map of object | yes | One person per template role, keyed by the role's `key` from list_templates' saved_templates[].roles (e.g. {"r1": {"name": "Nguyen Thi Lan", "email": "lan@example.com"}}). Every role needs a person; two roles can't share an email |
| `rows[].prefill` | map of string | no | Values for the boxes the template gives the SENDER only, keyed by get_template's sender_fields[].index. A box a recipient fills can't be prefilled (refused with role_owned_field) |
| `rows[].cc` | object[] | no | Extra copies for this row's envelope only. Up to 20 items |
| `rows[].cc[].email` | string | yes | Format: email. Up to 254 characters |
| `rows[].cc[].name` | string | no | Up to 120 characters |
| `subject` | string | no | Defaults to the template's subject (placeholders resolve per row). Up to 200 characters |
| `message` | string | no | Defaults to the template's message. Up to 4000 characters |
| `idempotency_key` | string | no | Same key = the same batch. Up to 100 characters |
| `time_zone` | string | no | The sender's IANA time zone (e.g. "Australia/Sydney"): fixed date boxes such as "Date it's sent" count from the sender's own day. Defaults to UTC. Up to 64 characters |
| `esign_risk_acknowledged` | boolean | no | The sender acknowledges the agency may reject an electronic signature on this form (warn-mode forms only) |
| `adopt_signature` | boolean | no | The starter adopts their saved signature for every envelope (a template with a Sender-signs box). Only a signed-in sender can: with an API key such a template is refused (signature_not_adopted) |
| `risk_accepted` | boolean | no | The person accepts AppliFlo's own-risk terms (Terms section 8A) for a library contract no lawyer has reviewed. Set it only after asking the person |
| `confirm` | boolean | no | true to really do it. Without it nothing happens: you get an error describing what would happen, to show the user |
