Skip to Content

send_template_bulk

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

destructivewaits for confirmSends, cancels or emails people. Clients ask you before running it.

What it does

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.

Two calls

Called without confirm: true, it does nothing and returns an error that says what would happen. Show that to the user, then call again with the same inputs and confirm: true.

Inputs

NameTypeDescription
template_idrequiredstringsaved_templates[].template_id from list_templates.
versionrequiredintegersaved_templates[].version from list_templates (required).At least 1
rowsrequiredobject[]One envelope per row.1 to 500 items
peoplerequiredmap of objectOne 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.
prefillmap of stringValues 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).
ccobject[]Extra copies for this row's envelope only.Up to 20 items
emailrequiredstringFormat: email · Up to 254 characters
namestringUp to 120 characters
subjectstringDefaults to the template's subject (placeholders resolve per row).Up to 200 characters
messagestringDefaults to the template's message.Up to 4000 characters
idempotency_keystringSame key = the same batch.Up to 100 characters
time_zonestringThe 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_acknowledgedbooleanThe sender acknowledges the agency may reject an electronic signature on this form (warn-mode forms only).
adopt_signaturebooleanThe 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_acceptedbooleanThe 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.
confirmbooleantrue to really do it. Without it nothing happens: you get an error describing what would happen, to show the user.

Call it

Your MCP client builds this request for you. This is what it sends to https://appliflo.com/api/mcp, with the required inputs filled with placeholders.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "send_template_bulk",
    "arguments": {
      "template_id": "<template_id>",
      "version": 1,
      "rows": []
    }
  }
}

Input schema

The JSON Schema the server lists for this tool in tools/list.

{
  "type": "object",
  "properties": {
    "template_id": {
      "type": "string",
      "description": "saved_templates[].template_id from list_templates."
    },
    "version": {
      "type": "integer",
      "minimum": 1,
      "description": "saved_templates[].version from list_templates (required)."
    },
    "rows": {
      "type": "array",
      "minItems": 1,
      "maxItems": 500,
      "description": "One envelope per row.",
      "items": {
        "type": "object",
        "properties": {
          "people": {
            "type": "object",
            "description": "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.",
            "minProperties": 1,
            "maxProperties": 10,
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "email": {
                  "type": "string",
                  "format": "email",
                  "maxLength": 254
                }
              },
              "required": [
                "name",
                "email"
              ],
              "additionalProperties": false
            }
          },
          "prefill": {
            "type": "object",
            "description": "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).",
            "additionalProperties": {
              "type": "string",
              "maxLength": 4000
            }
          },
          "cc": {
            "type": "array",
            "maxItems": 20,
            "description": "Extra copies for this row's envelope only.",
            "items": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "format": "email",
                  "maxLength": 254
                },
                "name": {
                  "type": "string",
                  "maxLength": 120
                }
              },
              "required": [
                "email"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "people"
        ],
        "additionalProperties": false
      }
    },
    "subject": {
      "type": "string",
      "maxLength": 200,
      "description": "Defaults to the template's subject (placeholders resolve per row)."
    },
    "message": {
      "type": "string",
      "maxLength": 4000,
      "description": "Defaults to the template's message."
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Same key = the same batch."
    },
    "time_zone": {
      "type": "string",
      "maxLength": 64,
      "description": "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."
    },
    "esign_risk_acknowledged": {
      "type": "boolean",
      "description": "The sender acknowledges the agency may reject an electronic signature on this form (warn-mode forms only)."
    },
    "adopt_signature": {
      "type": "boolean",
      "description": "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": {
      "type": "boolean",
      "description": "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": {
      "type": "boolean",
      "description": "true to really do it. Without it nothing happens: you get an error describing what would happen, to show the user."
    }
  },
  "required": [
    "template_id",
    "version",
    "rows"
  ],
  "additionalProperties": false
}

On this page