# set_template_roles

> Replace a saved template's roles (the people who fill and sign it), in signing order, as the builder's Recipients step: 1 to 10.

Tool of the AppliFlo MCP server at `https://appliflo.com/api/mcp`. Kind: destructive: it emails people or cancels a send, so clients ask you first.

Replace a saved template's roles (the people who fill and sign it), in signing order, as the builder's Recipients step: 1 to 10. A role passed with its existing key is kept (its boxes stay its own); one without a key is new and gets a fresh key; a role left out is removed and its boxes lose their owner (assign them in the app's builder before finalising). Read the current roles with get_template first. It changes the template's DRAFT of its next version (what the app's builder shows): sends keep using the current version until the draft is finalised (finalise_template, with expected_base_version = current_version from this result; `issues` with severity blocking must be fixed first). Owners and admins only (403 otherwise). Returns the draft's roles, settings and remaining issues.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `template_id` | string | yes | A saved template's template_id from list_templates (kind saved). Up to 64 characters |
| `roles` | object[] | yes | Every role, in signing order. 1 to 10 items |
| `roles[].key` | string | no | An existing role's key to keep it (its boxes stay its own). Leave out for a new role |
| `roles[].label` | string | yes | The role's name, e.g. Client. Each must differ. Up to 60 characters |
| `roles[].kind` | string | yes | signer = fills and signs; filler = fills only. One of: signer, filler |
| `roles[].colour` | string | no | Defaults to the role's own colour, or the first colour no other role uses. One of: blue, green, violet, teal, rose |
| `roles[].party_type` | string | no | What the party is (a tag beside the name). Defaults to the role's own, or one its name suggests. One of: applicant, applicant_secondary, director, sponsor, employer, employee, agent, witness, guarantor, guardian, interpreter, other |
| `roles[].crm_source` | string \| null | no | The CRM this role's contact is picked from at send; null = typed at send; leave out to keep it |
