---
title: "Start proposing the field sheet from a data product"
method: POST
path: "/v1/doc-gen/templates/{id}/propose"
tags: ["Document Generation"]
---

# Start proposing the field sheet from a data product

`POST /v1/doc-gen/templates/{id}/propose`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/doc-gen/templates/{id}/propose`
- Auth: HTTP bearer

Starts a model run that proposes a source and a reason for every unconfirmed field, from the template text and the columns of the data product (and of the reference table its Spec binds). The run continues after the response; poll `GET /v1/doc-gen/templates/{id}/proposal`. A request for a run already in progress for the same product and mode returns that run. A field a person confirmed is not changed. Requires a person at or above member behind the key.

## Path parameters

- `id` string, uuid, required

## Request body

- DocGenProposeRequest
  - `data_product_id` string, uuid, required
  - `force` boolean: Start a fresh proposal even if the sheet was already proposed for the product.

## Response `201`

The running proposal and the template.

- DocGenProposalResponse
  - `proposal` DocGenProposalState, nullable
    - `status` 'running' | 'done' | 'failed'
    - `runId` string: Identifies one run; absent on proposals stored before runs had an identity.
    - `productId` string, uuid
    - `force` boolean
    - `only` string[]: The field keys this run proposes when it only asks again for fields an earlier run left without an answer.
    - `startedAt` string, date-time
    - `finishedAt` string, date-time, nullable
    - `error` string, nullable
    - `summary` DocGenProposalSummary, nullable
      - `fields` integer
      - `proposed` integer
      - `kept` integer
      - `fromData` integer
      - `derived` integer
      - `entered` integer
      - `profile` integer
      - `model` string
      - `parts` object[]: One entry per model call.
        - `fields` integer
        - `answered` boolean
        - `note` string
      - `pending` string[]: Keys of the fields no answer came back for; the next proposal for the same product asks for them again.
  - `template` DocGenTemplate
    - `id` string, uuid
    - `index` integer: Position in creation order, starting at 1.
    - `name` string
    - `file` string: The uploaded file name.
    - `group` string: Empty when the template has no group.
    - `kind` 'letter' | 'agreement'
    - `pairId` string, uuid, nullable: The companion template generated with this one.
    - `version` string: Empty when the template has no version.
    - `fields` DocGenTemplateField[]
      - `key` string
      - `label` string
      - `kind` 'text' | 'choice' | 'date'
      - `options` string[]: The choices a dropdown control offers; empty for free text and dates.
      - `dateFormat` string, nullable: The Word date format of a date control, such as `dd.MM.yyyy`.
      - `where` string[]: Document parts the field sits in (body, header or footer).
      - `zone` 'header' | 'address' | 'reference' | 'body' | 'signature' | 'footer'
      - `group` string, nullable: The block of the text the field belongs to, such as an address.
      - `controls` string[]: The Word content controls (by id) this field fills.
      - `source` DocGenFieldSource: Where a field's value comes from. `type` selects the shape: `product` (`field`), `reference` (`column`), `extract` (`from`, `pattern`, optional `group` 0-9, optional `mode` `capture` or `remove`), `first` (`sources`, a list of product, reference, extract or party sources), `case` (`caseKey`, optional `when` condition), `user` (`profile`), `rule` (`rule`), `today`, `party` (`role`, `attribute`), `variant` (`by`, `map`, `fallback`), `condition` (`when`, optional `text`), `fixed` (`text`), and `lookup` (`from`, `cases`, `fallback`). A source is validated when stored; one of no known shape is refused.
        - `type` 'product' | 'reference' | 'extract' | 'first' | 'case' | 'user' | 'rule' | 'today' | 'party' | 'variant' | 'condition' | 'fixed' | 'lookup', required
      - `confirmed` boolean: True once a person confirmed the source; until then it is the platform's suggestion.
      - `reason` string, nullable: Why the platform suggested this source.
      - `spot` object, nullable: For a red passage of the template, the words as the template prints them.
        - `original` string
    - `dataProductId` string, uuid, nullable: The data product the field sheet was last proposed for; null until a proposal ran.
    - `updatedAt` string, date-time
    - `uploadedBy` string
    - `generated` integer: How many batches used the template.
    - `lastUsedAt` string, date-time, nullable

## Other responses

- `400`: The request is invalid.
- `403`: The API key does not have the required scope.
- `404`: The requested resource was not found.
- `409`: Another proposal started for this template at the same moment; retryable.

## Changes

- **2026-10-28** `0a485a46163e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/doc-gen/templates/:id/propose/post.md)

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) - [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/9f6d53e2ab5e?raw)
