Draft a document from a template
An AppliFlo library item or official form (a lib_ id from items[]) is the app's Use: a ready item drafts with each role's person bound (an unreviewed contract needs risk_accepted: true unless the person already accepted that version); a form AppliFlo hasn't set up is imported as a new document and its fields are read, and recipients are added when you send. The e-sign rule applies at send (a fill-and-print-only form drafts, but every send refuses it). Any other id is the older contract-template model (values + recipients in party order). Saved templates: POST /saved-templates/{id}/create-document.
An AppliFlo library item or official form (a lib_ id from items[]) is the app's Use: a ready item drafts with each role's person bound (an unreviewed contract needs risk_accepted: true unless the person already accepted that version); a form AppliFlo hasn't set up is imported as a new document and its fields are read, and recipients are added when you send. The e-sign rule applies at send (a fill-and-print-only form drafts, but every send refuses it). Any other id is the older contract-template model (values + recipients in party order). Saved templates: POST /saved-templates/{id}/create-document.
bearerAuthAuthorizationBearer <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.
id*stringTemplate id from GET /templates (items[].template_id for a lib_ item).
Idempotency-Key?stringA 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).
length <= 255application/json- body
For an AppliFlo library item or official form (a lib_ id).
recipients?array<>One person per role of a ready item (ignored for a form AppliFlo hasn't set up: add recipients when you send). A draft is not sent, so delivery isn't taken here (it is ignored): choose it per recipient on POST /documents/{id}/send.
1 <= items <= 10document_name?stringDefaults to the template's name.
1 <= length <= 255fixed_overrides?The sender's values for the template's DEFAULT fixed boxes (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 box is set by the template: an override is refused with 422 locked_field. A Locked box whose workspace or My details value is empty is refused with 422 missing_detail. An AppliFlo library form's Ask on copy box that nothing answers is refused with 422 unanswered_ask: give it a value here.
local_day?stringThe sender's own day (YYYY-MM-DD) fixed dates count from.
^\d{4}-\d{2}-\d{2}$risk_accepted?booleanThe person accepts AppliFlo's own-risk terms (Terms section 8A) for a library contract no lawyer has reviewed. Recorded with the request's IP and browser once the draft is made.
Drafted document, with its fields already placed and bound to the recipients (an imported form: its fields as read).
application/json- response
success*booleandata*|curl -X POST 'https://appliflo.com/api/v1/templates/string/create-document' \ -H 'Content-Type: application/json' \ -d '{}'{ "success": true, "data": { "document_id": "string", "template_id": "string", "kind": "library", "status": "draft", "name": "string", "template_version": 1, "review_required": true, "values": {}, "recipients": [ { "index": 0, "role_key": "string", "name": "string", "email": "string", "role": "string" } ], "fields": [ {} ], "groups": [ {} ], "fields_read": true, "detection_skipped": "ai_off", "notice": "string", "ai_pages": {}, "flagged_count": 0 }}Void an envelope POST
Previous Page
List the template library available to this workspace GET
`items` is one list of everything the workspace can start a document from (as the app's Templates page and the MCP list_templates tool): its saved templates first, then AppliFlo's contract templates (kind library), then the official government forms (kind official), filtered by kind, q, country and category and paged with limit/offset (`total` counts every match). `templates` (the old contract-template model, superseded by the library's lib_ items) and `saved_templates` are unchanged for existing integrations.