# save_as_template

> Keep a DRAFT document (one not sent yet, with its fields detected or placed) as one of the workspace's saved templates, like the app's "Save as template": its PDF, fields, choice questions and form rules are copied; the document itself is untouched.

Tool of the AppliFlo MCP server at `https://appliflo.com/api/mcp`. Kind: asks first: it changes something in your workspace, so clients ask you first.

Keep a DRAFT document (one not sent yet, with its fields detected or placed) as one of the workspace's saved templates, like the app's "Save as template": its PDF, fields, choice questions and form rules are copied; the document itself is untouched. `roles` names the people who fill it ("Client", "Agent"; up to 4); without it, one role per recipient the fields are assigned to, else a default. The template starts as a Draft: an owner or admin sets it up (set_template_roles, update_template_settings; box owners in the app's builder) and finalises it (finalise_template) before send_template can use it (create_from_template works on a Draft). Returns saved_template in get_template's shape. To keep an AppliFlo library contract or official form instead, use save_library_as_template.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `document_id` | string | yes | The draft document's document_id. Up to 64 characters |
| `name` | string | no | Defaults to the document's name. Up to 120 characters |
| `roles` | string[] | no | Role names in signing order, e.g. ["Client", "Agent"]. Up to 4 items |
