update_user_template
Change your saved PDF template — any field, or none to recompile it as stored.
Complements `draft_user_template` (preview), `save_user_template` (create) and
`delete_user_template` (remove). Every argument is optional; a field you omit
keeps its stored value, and the result is compiled into a blueprint again:
- a VISUAL change: draft the new page with `draft_user_template`, show the
previews, then pass the chosen `draft_id` + `variant_id` here (both or
neither);
- a change without previews: pass `template`, `template_type` and/or
`anchor` directly (HTML only — markdown is rejected with a 422);
- NO arguments: recompiles the stored template with the current compiler —
how a saved design picks up an improved compile without resubmitting it.
Async: returns {"task_id", "status": "PENDING", "changed": [the fields that
were updated], "next_step"} — poll `get_task_status` for {"status": "SAVED",
"patterns", "tones", "warnings"}. A 404 means nothing is saved yet (use
`save_user_template` first); a 422 lists validation errors in `detail.errors`.
Requires auth (your MCP client attaches the OAuth bearer automatically).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| anchor | No | New add_on section, e.g. "technical". Omit to keep the stored one. | |
| draft_id | No | Visual change: the draft_id from draft_user_template's finished task. Pass with variant_id. | |
| template | No | New HTML template without previews (markdown is a 422). Omit to keep the stored one. | |
| variant_id | No | Visual change: the variant_id the user chose from the previews. Pass with draft_id. | |
| template_type | No | New type, "add_on" or "bespoke". Omit to keep the stored one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | Task state at dispatch, normally "PENDING". | |
| changed | No | update_user_template only: the fields that were updated. | |
| task_id | Yes | Celery task id; poll it with get_task_status for the result. | |
| next_step | No | What the finished task returns. |