# signing.templates.create

Create a custom agreement template from Markdown (body with {{field.key}} merge fields and an optional {{signatures}} block), fields, signerRoles, and letterhead. Set duplicateOf to copy an existing or starter template. It is published and ready to send unless publish is false, which keeps it a draft until signing.templates.publish. Requires an idempotency key.

`POST /api/v1/accounting/signing.templates.create`

Permissions: `accounting:read`, `accounting:write` · Roles: admin, finance · Idempotency key required

MCP tool: `accounting_signing_templates_create`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `title` | string | Yes | A short title. 1–200 characters. |
| `description` | string |  | A short description. at most 1000 characters. Default `""`. |
| `kind` | enum |  | Which kind of record or job this is. One of: `nda`, `contractor_agreement`, `signature_request`, `letterhead`, `custom`. Default `"custom"`. |
| `body` | string |  | 1–200000 characters. |
| `editorJson` | map or null |  |  |
| `fields` | array of objects |  | at most 100 items. |
| `fields[].key` | string | Yes | Matches ^[a-zA-Z][a-zA-Z0-9_.]{0,80}$. |
| `fields[].label` | string | Yes | 1–120 characters. |
| `fields[].required` | boolean |  | Default `false`. |
| `fields[].defaultValue` | string |  | at most 5000 characters. |
| `fields[].multiline` | boolean |  |  |
| `fields[].markdown` | boolean |  |  |
| `fields[].help` | string |  | at most 300 characters. |
| `fields[].source` | enum |  | Where the record came from. One of: `company`, `counterparty`, `contractor`, `agreement`. |
| `fields[].type` | enum |  | One of: `date`, `choice`, `email`, `phone`, `address`, `job`. |
| `fields[].options` | array of strings |  | 1–40 items; each 1–120 characters. |
| `fields[].allowOther` | boolean |  |  |
| `signerRoles` | array of objects |  | at most 10 items. |
| `signerRoles[].role` | string | Yes | A person's access level in the company. Matches ^[a-z][a-z0-9_]{0,40}$. |
| `signerRoles[].label` | string | Yes | 1–80 characters. |
| `signerRoles[].partyLabelField` | string | Yes | Matches ^[a-zA-Z][a-zA-Z0-9_.]{0,80}$. |
| `signerRoles[].order` | integer | Yes | 1 to 20. |
| `signerRoles[].defaultInternal` | boolean |  | Default `false`. |
| `letterhead` | boolean |  |  |
| `footer` | string or null |  |  |
| `logoAssetId` | string (ID) or null |  |  |
| `duplicateOf` | string (ID) |  |  |
| `publish` | boolean |  |  |
| `idempotencyKey` | string | Yes | Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match. 8–200 characters. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/signing.templates.create \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "title": "Synthetic services agreement",
  "body": "Synthetic example from the docs"
}'
```

Reference page: https://app.getoatmilk.com/docs/api/signing.templates.create
