# send_template

> Send a Ready saved template to its recipients in one call: creates the document from the template's current version and emails the first recipients.

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 its recipients in one call: creates the document from the template's current version and emails the first recipients. Call list_templates FIRST: use a saved_templates[] entry with status `ready`, and its roles[].key values as the keys of `people` (one {name, email} per role; every role needs a person, two roles can't share an email). Prefill only sender_fields (by index, from get_template); the template's fixed_fields[] are filled by the template itself (override a Default one with fixed_overrides; a Locked one is refused). The template's own CCs, subject, message, reminders and expiry apply unless you override subject/message. A Draft template is refused (409 template_not_ready). Pass idempotency_key when retrying so nobody is emailed twice. Confirm the recipients with the user before sending: this sends real email. A person with delivery "embedded" is never emailed: your app signs them in its own page (POST /api/v1/embed/signing-sessions). 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. A person who already accepted that contract version needs no risk_accepted. 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 | no | Pin a version; defaults to the current one. At least 1 |
| `esign_risk_acknowledged` | boolean | no | The sender acknowledges the agency may reject an electronic signature on this form (warn-mode forms only) |
| `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 |
| `prefill` | map of string \| 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) |
| `cc` | object[] | no | Extra copies (added to the template's fixed CCs, which always apply). Up to 20 items |
| `cc[].email` | string | yes | Format: email. Up to 254 characters |
| `cc[].name` | string | no | Up to 120 characters |
| `subject` | string | no | Defaults to the template's subject. Up to 200 characters |
| `message` | string | no | Defaults to the template's message. Up to 4000 characters |
| `idempotency_key` | string | no | Same key = same send (a retry returns the first envelope). Up to 255 characters |
| `fixed_overrides` | map of string \| boolean \| string[] | no | The sender's values for the template's DEFAULT fixed boxes (get_template's fixed_fields[] with locked: false), keyed by fixed_fields[].index: text, true/false for a tick box, or option value(s) for a choice question. A LOCKED fixed box is set by the template and can't be overridden (refused with 422 locked_field). A Locked box whose workspace or My details value is empty refuses the send (422 missing_detail). A DEFAULT box the workspace answers once (an AppliFlo library form's "ask on copy" box) that nothing answered refuses the send (422 unanswered_ask): give it a value here |
| `remember_defaults` | integer[] | no | fixed_fields[].index of Default boxes whose fixed_overrides value becomes the template's default for everyone, once sent. A Locked box is refused (422 locked_field) |
| `local_day` | string | no | The sender's own calendar day (YYYY-MM-DD), the 'today' fixed date boxes count from. Defaults to the server's UTC day |
| `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 |
