build_reply_draft
Prepare a validated follow-up draft for an existing request. Generates reply text and form URL without sending, so you can review and send manually.
Instructions
Prepare a follow-up message to an authority. YELLOW: reads the API, sends nothing.
The counterpart of ``build_submit_url`` for a request that already exists. It looks
the request up, validates the text against the rules that apply to a follow-up, and
hands back the finished text plus the URL of the form. **Pressing send stays with
you**, and there is no tool argument that changes that: replying is not possible
through the API at all. Measured 2026-09-05 (tests/test_api_contract.py):
``POST /api/v1/message/`` refuses ``kind: "email"``, and the web view at
``/anfrage/<slug>/send/message/`` answers 302 to the login page whether or not a
bearer token is attached.
A follow-up is validated differently from a request. froide does **not** frame it:
the textarea arrives prefilled with a salutation, the placeholder U+2026 and a
closing formula, and exactly what stands in it is what the authority receives. So
R19 requires a salutation and a closing formula — the inverse of R10 — R04 rejects
the placeholder that is sitting in the form right now, R06 keeps e-mail addresses and
IBANs out of a public thread, and the subject is capped at 230 characters.
Args:
request_id: numeric id of your existing request.
text: the complete message, salutation and closing formula included.
subject: reply subject. Defaults to "AW: <title> [#<id>]".
path: optional path to a ``.yaml`` file to write the draft to. Needed only if you
intend to use ``send_reply_via_browser`` later; the file is written with
``status: draft`` and a placeholder confirmation token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| text | Yes | ||
| subject | No | ||
| request_id | Yes |