Skip to Content
Saved templates

Send a Ready saved template to many

One envelope per row. Every 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[]); the rest are queued and sent in the background, paced under the email limit. Each sent envelope is metered once, like a single send (envelope.sent, source api). Poll GET /bulk-batches/{id}. An Idempotency-Key returns the batch the key already made. Limits: the batch must fit this month's envelopes (quota_exceeded), a workspace runs at most 2 batches at once (too_many_running), and a key starts at most 10 batches a minute (429). A batch pauses if the month's envelopes run out or the workspace is suspended, and resumes on its own.

POST
/api/v1/templates/{id}/bulk

One envelope per row. Every 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[]); the rest are queued and sent in the background, paced under the email limit. Each sent envelope is metered once, like a single send (envelope.sent, source api). Poll GET /bulk-batches/{id}. An Idempotency-Key returns the batch the key already made. Limits: the batch must fit this month's envelopes (quota_exceeded), a workspace runs at most 2 batches at once (too_many_running), and a key starts at most 10 batches a minute (429). A batch pauses if the month's envelopes run out or the workspace is suspended, and resumes on its own.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Workspace API key, e.g. "Authorization: Bearer aflo_live_<64 hex chars>". Keys are hashed at rest and shown only once at creation. A key has scopes: read (GET routes), draft (create or change documents, fields and templates) and send (send, void, remind and bulk send); a call outside them gets 403 insufficient_scope. A key may expire (401 api_key_expired). Keys made before scopes existed have full access.

Path Parameters

id*string

Saved template id (saved_templates[].template_id from GET /templates).

Header Parameters

Idempotency-Key?string

A client-generated key scoping this request as a retry of a prior identical request. A replay within 24h returns the first response instead of repeating the side effect (e.g. a second send). The key is bound to the request it was first used with: the same key with a different body or target is refused (422, code idempotency_key_reused).

Lengthlength <= 255

Request Body

application/json
  1. body
version*integer

The template's current version (from GET /templates). A stale one is refused with 409 version_mismatch.

Range1 <= value
rows*array<>

One envelope per row; at most 500 per request (more is 422 too_many_rows).

Items1 <= items <= 500
subject?string

Defaults to the template's subject; placeholders resolve per row.

Lengthlength <= 200
message?string
Lengthlength <= 4000
time_zone?string

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, per row at its send time. Defaults to UTC; an unknown zone is 422.

Lengthlength <= 64
esign_risk_acknowledged?boolean

Some hosted government forms (USCIS I-130 and others, SSA SS-5, IRS 8879 and 4506-C, the Commonwealth statutory declaration) are fill-and-print only: a send of one is refused (422 esign_not_allowed) whatever this says; download the filled PDF instead. A form whose agency may reject an e-signature needs true (422 esign_ack_required without it).

adopt_signature?boolean

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 (422 signature_not_adopted, "Sender signatures need a signed-in sender.").

risk_accepted?boolean

An AppliFlo library contract that AppliFlo's lawyer hasn't reviewed is sent at your own risk (Terms section 8A). Send true to confirm it, on every start. Without it, such a contract is refused with 409 contract_risk_required.

Response Body

The batch is queued; rows[] reports each row.

application/json
  1. response
success*boolean
data*
Example Request
curl -X POST 'https://appliflo.com/api/v1/templates/string/bulk' \  -H 'Content-Type: application/json' \  -d '{  "version": 1,  "rows": [    {      "people": {        "property1": {          "name": "string",          "email": "user@example.com"        },        "property2": {          "name": "string",          "email": "user@example.com"        }      }    }  ]}'
Example Response
{  "success": true,  "data": {    "batch_id": "string",    "status": "queued",    "template_version": 0,    "counts": {      "total": 0,      "queued": 0,      "sent": 0,      "failed": 0,      "excluded": 0,      "cancelled": 0    },    "rows": [      {        "row": 1,        "status": "queued",        "issues": [          {            "code": "blank",            "role": "string",            "message": "string"          }        ]      }    ]  }}