Prepare a document
prepare_documentManages who gets a draft and how it is sent: its name, who signs it and who gets a copy, by email (people new to Docflare are added to the recipients), and delivery, email, signing order, expiry, reminders and what recipients may download. Only what is sent changes; everything left out stays as it is, and settings never set take the workspace defaults. It covers any of these changes, such as "make it expire in 7 days". More signers or CCs than the plan allows are refused, naming the emails that do not fit, and nothing changes. It places no fields: a signer needs at least one, such as a signature, which edit_document places, and edit_document also sets whether signers share one copy or each get their own. On a document the user signs themselves (signed_by_sender), everyone listed gets the signed copy by email, and only the name, subject and message apply. flow switches a draft between the two, starting fresh with no recipients or fields: when the user wants to sign a signature request themselves, or have others sign a document meant for them. Nothing is sent. The answer is a preview of exactly what send_document would send, text_changes included, a preview_url that shows the pages as a signer will see them, and a review_token for send_document when nothing blocks the send.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "prepare_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The document id from the upload_document answer. | |
| flow | No | Switches the draft: sign-document when the user signs it themselves and sends the signed copy, get-signature when others sign it. Switching starts fresh: its recipients and fields are removed and its text stays, so send recipients with it. Leave out to keep it. | |
| name | No | A new name for the document, shown to recipients. Leave out to keep the current name. | |
| message | No | The invitation email message. It may use {sender.name}, {sender.email}, {document.name} and no other variable. The workspace default when left out. | |
| subject | No | The invitation email subject. It may use {sender.name}, {sender.email}, {document.name} and no other variable. The workspace default when left out. | |
| delivery | No | email sends each signer an invitation, link gives the user signing links to share. email when left out. | |
| reminders | No | Whether Docflare reminds signers who have not signed yet. | |
| recipients | No | Everyone who receives the document, replacing the current recipients. Leave out to keep them. | |
| reminder_max | No | How many reminders at most. | |
| signing_order | No | true when signers sign one after another, in the order of recipients. Everyone signs at once when left out. | |
| allow_download | No | Whether recipients may download the signed document. | |
| expires_after_days | No | Days until the signing links stop working. The workspace default when left out. | |
| warn_before_expiry | No | Whether signers are warned before the links expire. | |
| attach_pdf_to_emails | No | Whether the signed PDF is attached to the completion emails. Needs allow_download. | |
| reminder_every_hours | No | Hours between reminders. |