Save a draft document as a template
Copies the document's PDF and its fields into a new saved template, and carries over any saved mappings the document's form has. The document itself is not changed.
Copies the document's PDF and its fields into a new saved template, and carries over any saved mappings the document's form has. The document itself is not changed.
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.
application/json- body
document_id*stringA draft document with its fields detected or placed.
name?stringDefaults to the document's name.
length <= 120roles?array<>Recipient role labels in signing order, e.g. ["Client", "Agent"].
items <= 4The new saved template.
application/json- response
success*booleandata*curl -X POST 'https://appliflo.com/api/v1/saved-templates' \ -H 'Content-Type: application/json' \ -d '{ "document_id": "string"}'{ "success": true, "data": { "saved_template": { "template_id": "string", "kind": "saved", "name": "string", "status": "draft", "version": 0, "field_count": 0, "pages": 1, "roles": [ { "key": "string", "label": "string", "kind": "signer", "order": 1 } ], "sender_fields": [ { "index": 0, "label": "string", "type": "text", "semantic_type": "string", "group_key": "string", "option_value": "string", "bulk": true } ], "fixed_fields": [ { "index": 0, "label": "string", "type": "text", "locked": true, "bulk": true } ], "source": "document", "official_form_slug": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "mappings_copied": 0 }}Create a document from a saved template POST
Creates a fresh draft document with a copy of the template's file and fields (already placed: do not call detect). The template is never modified. Pass the result to POST /documents/{id}/send.
Fix a failed row and send it again PATCH
Change a failed row's people (by role key: name and/or email) or prefilled boxes (by index), then it is checked like the review step and sent as a new envelope. A change is required: a row the email provider refused or that bounced (needs_fix) would fail the same way again.