# List the template library available to this workspace

> GET /api/v1/templates: List the template library available to this workspace.

`GET https://appliflo.com/api/v1/templates`

`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.

Send your API key in the `Authorization: Bearer` header. Every response is JSON: `{ success, data, error }`.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `category` | query | no | Filter to one category |
| `kind` | query | no | items[] of this kind only. One of: saved, contract, library, official |
| `q` | query | no | Words in the name, or an official form's code ("956", "W-9") |
| `country` | query | no | items[] for this country only (official forms and saved copies of them). One of: US, AU |
| `limit` | query | no |  |
| `offset` | query | no |  |

## Responses

| Status | Description |
| --- | --- |
| 200 | The one list (`items`, `total`, `limit`, `offset`); the workspace's own contract templates plus the curated system ones (`templates`, deprecated); and its saved templates with recipient roles (`saved_templates`: status, current version, roles, sender boxes; empty when a category is given). |
| 401 | Missing or invalid API key, or `api_key_expired` for a key past its expiry. |
| 403 | The API key's workspace does not have access to this resource, or `insufficient_scope` (with `required_scope`) for a key without the scope this route needs. |
| 404 | Resource not found in this workspace. |
| 422 | Request failed validation. |
| 500 | Internal error. |

## 200 response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | true | yes |  |
| `data` | object | yes |  |
| `data.templates` | object[] | yes |  |
| `data.templates[].template_id` | string | yes |  |
| `data.templates[].name` | string | yes |  |
| `data.templates[].category` | string | yes |  |
| `data.templates[].version` | integer | yes |  |
| `data.templates[].status` | string | yes | One of: draft, published, archived |
| `data.templates[].lawyer_reviewed` | boolean | yes | false means the base text has not been reviewed by counsel. Surface this to the user before they send — every draft also carries a review notice |
| `data.templates[].scope` | string | yes | One of: system, workspace |
| `data.templates[].recipients_required` | integer | yes | How many recipients the template's party roles need, in order |
| `data.templates[].required_values` | object[] | yes | One entry per {{placeholder}} in the prose. Every key must be supplied to create-document |
| `data.templates[].required_values[].key` | string | yes |  |
| `data.templates[].required_values[].label` | string | yes |  |
| `data.templates[].required_values[].semantic_type` | string | yes |  |
| `data.templates[].party_fields` | object[] | yes | Signature/name/date fields bound to a party role, pre-assigned to recipients positionally |
| `data.templates[].party_fields[].slot_id` | string | yes |  |
| `data.templates[].party_fields[].label` | string | yes |  |
| `data.templates[].party_fields[].semantic_type` | string | yes |  |
| `data.templates[].party_fields[].party` | string | yes |  |
| `data.saved_templates` | object[] | yes |  |
| `data.saved_templates[].template_id` | string | yes |  |
| `data.saved_templates[].kind` | "saved" | yes |  |
| `data.saved_templates[].name` | string | yes |  |
| `data.saved_templates[].status` | string | yes | Only a ready template can be sent; a draft is refused with 409 template_not_ready. One of: draft, ready |
| `data.saved_templates[].version` | integer \| null | yes | The current version (null while draft). POST /templates/{id}/bulk requires it |
| `data.saved_templates[].field_count` | integer | yes | At least 0 |
| `data.saved_templates[].pages` | integer | yes | At least 1 |
| `data.saved_templates[].roles` | object[] | yes | Recipient roles, in signing order (the current version's; a draft's planned ones) |
| `data.saved_templates[].roles[].key` | string | yes | The key send and bulk take in `people` / `recipients[].role`, e.g. "r1" |
| `data.saved_templates[].roles[].label` | string | yes | The role's name, e.g. "Client" |
| `data.saved_templates[].roles[].kind` | string | yes | signer: fills and signs; filler: fills only. One of: signer, filler |
| `data.saved_templates[].roles[].order` | integer | yes | Signing order. At least 1 |
| `data.saved_templates[].sender_fields` | object[] | yes | The boxes the sender fills (empty while draft) |
| `data.saved_templates[].sender_fields[].index` | integer | yes | The prefill key. At least 0 |
| `data.saved_templates[].sender_fields[].label` | string \| null | yes |  |
| `data.saved_templates[].sender_fields[].type` | string | yes | One of: text, checkbox, signature |
| `data.saved_templates[].sender_fields[].semantic_type` | string | yes |  |
| `data.saved_templates[].sender_fields[].group_key` | string \| null | yes | The choice question this box is an option of (answer with an option value) |
| `data.saved_templates[].sender_fields[].option_value` | string \| null | yes |  |
| `data.saved_templates[].sender_fields[].bulk` | boolean | yes | A plain text box a bulk row's prefill may set |
| `data.saved_templates[].fixed_fields` | object[] | yes | The boxes the template fills itself (empty while draft) |
| `data.saved_templates[].fixed_fields[].index` | integer | yes | The fixed_overrides key. At least 0 |
| `data.saved_templates[].fixed_fields[].label` | string \| null | yes |  |
| `data.saved_templates[].fixed_fields[].type` | string | yes | One of: text, checkbox, signature |
| `data.saved_templates[].fixed_fields[].locked` | boolean | yes | True: set by the template, an override is 422 locked_field |
| `data.saved_templates[].fixed_fields[].bulk` | boolean | yes | A Default text box a bulk row's prefill may set (its value becomes that row's override) |
| `data.saved_templates[].source` | string | yes | doc: saved from a Docs doc (no PDF; send it to many, or use it from Docs). One of: document, official, upload, doc |
| `data.saved_templates[].official_form_slug` | string \| null | yes |  |
| `data.saved_templates[].created_at` | string | yes | Format: date-time |
| `data.saved_templates[].updated_at` | string | yes | Format: date-time |
| `data.items` | object[] | yes |  |
| `data.items[].template_id` | string | yes |  |
| `data.items[].kind` | string | yes | One of: saved, contract, library, official |
| `data.items[].name` | string | yes |  |
| `data.items[].status` | string | yes | ready: set up with roles (send it, or create a document with each role's person). draft: a saved template an owner or admin hasn't finalised, or an official form AppliFlo hasn't set up (POST /templates/{id}/create-document imports it as a document with its fields read; it can't be sent from a template). One of: draft, ready |
| `data.items[].version` | integer \| null | yes | The current version (null while draft). POST /templates/{id}/bulk requires it |
| `data.items[].field_count` | integer | yes | At least 0 |
| `data.items[].pages` | integer \| null | yes | At least 1 |
| `data.items[].roles` | object[] | yes | Recipient roles, in signing order (the current version's; a draft's planned ones) |
| `data.items[].roles[].key` | string | yes | The key send and bulk take in `people` / `recipients[].role`, e.g. "r1" |
| `data.items[].roles[].label` | string | yes | The role's name, e.g. "Client" |
| `data.items[].roles[].kind` | string | yes | signer: fills and signs; filler: fills only. One of: signer, filler |
| `data.items[].roles[].order` | integer | yes | Signing order. At least 1 |
| `data.items[].sender_fields` | object[] | yes | The boxes the sender fills (empty while draft) |
| `data.items[].sender_fields[].index` | integer | yes | The prefill key. At least 0 |
| `data.items[].sender_fields[].label` | string \| null | yes |  |
| `data.items[].sender_fields[].type` | string | yes | One of: text, checkbox, signature |
| `data.items[].sender_fields[].semantic_type` | string | yes |  |
| `data.items[].sender_fields[].group_key` | string \| null | yes | The choice question this box is an option of (answer with an option value) |
| `data.items[].sender_fields[].option_value` | string \| null | yes |  |
| `data.items[].sender_fields[].bulk` | boolean | yes | A plain text box a bulk row's prefill may set |
| `data.items[].fixed_fields` | object[] | yes | The boxes the template fills itself (empty while draft) |
| `data.items[].fixed_fields[].index` | integer | yes | The fixed_overrides key. At least 0 |
| `data.items[].fixed_fields[].label` | string \| null | yes |  |
| `data.items[].fixed_fields[].type` | string | yes | One of: text, checkbox, signature |
| `data.items[].fixed_fields[].locked` | boolean | yes | True: set by the template, an override is 422 locked_field |
| `data.items[].fixed_fields[].bulk` | boolean | yes | A Default text box a bulk row's prefill may set (its value becomes that row's override) |
| `data.items[].source` | string | no | doc: saved from a Docs doc (no PDF; send it to many, or use it from Docs). One of: document, official, upload, doc |
| `data.items[].official_form_slug` | string \| null | yes |  |
| `data.items[].created_at` | string | no | Format: date-time |
| `data.items[].updated_at` | string | no | Format: date-time |
| `data.items[].summary` | string \| null | yes |  |
| `data.items[].category` | string \| null | yes |  |
| `data.items[].country` | string \| null | yes | An official form's country (or a saved copy of one). One of: US, AU, null |
| `data.items[].official_form` | object \| null | yes |  |
| `data.items[].official_form.slug` | string | yes |  |
| `data.items[].official_form.code` | string | yes | As printed: "956", "W-9" |
| `data.items[].official_form.label` | string | yes | "Form 956" for Home Affairs, else the code |
| `data.items[].official_form.title` | string | yes |  |
| `data.items[].official_form.agency` | string | yes |  |
| `data.items[].official_form.agency_name` | string | yes |  |
| `data.items[].esign` | object \| null | yes | The agency's e-sign rule. block: fill and print only (every send is refused with 422 esign_not_allowed). warn: send with esign_risk_acknowledged: true |
| `data.items[].esign.mode` | string | yes | One of: block, warn |
| `data.items[].esign.notice` | string | yes |  |
| `data.items[].recipients_required` | integer | no | kind contract: how many parties (recipients, in order) a draft needs. At least 0 |
| `data.items[].required_values` | object[] | no | kind contract: one value per key, required by create-document |
| `data.items[].party_fields` | object[] | no | kind contract: the signature/name/date blocks bound to each party |
| `data.items[].lawyer_reviewed` | boolean | no | kind contract: whether the base text has been through legal review |
| `data.items[].own_risk` | boolean | yes | An AppliFlo contract no lawyer has reviewed: sent or drafted only with risk_accepted: true (Terms 8A) unless the person already accepted that version |
| `data.items[].setup_required` | boolean | yes | The app asks this workspace's one-time set-up of the form (business details, who sends it) before the first use. Without it, a box the set-up answers is refused with 422 unanswered_ask or missing_detail: give it in fixed_overrides, or have an owner or admin set the form up in the app |
| `data.total` | integer | yes | At least 0 |
| `data.limit` | integer | yes | At least 1 |
| `data.offset` | integer | yes | At least 0 |

See also: [Errors](https://dev.appliflo.com/guides/errors), [Rate limits](https://dev.appliflo.com/guides/rate-limits), [Idempotency](https://dev.appliflo.com/guides/idempotency).
