# send_doc

> Send a draft or ready Doc for signing, as the app's Send does: AppliFlo renders it to a PDF (checking every box lands where it should), makes the envelope and emails the first people.

Tool of the AppliFlo MCP server at `https://appliflo.com/api/mcp`. Kind: destructive: it emails people or cancels a send, so clients ask you first.

Send a draft or ready Doc for signing, as the app's Send does: AppliFlo renders it to a PDF (checking every box lands where it should), makes the envelope and emails the first people. `people` gives one {name, email} per role key from get_doc's roles (every role needs a person; two who sign can't share an email); `revision` is get_doc's. Variables ({{client.full_name}}) are filled from the workspace and the sender; give any that are missing in `typed` (by key; 422 missing_values lists them). Boxes the sender fills (role sender) take `sender_fills` by box id; a Doc with a sender signature needs adopt_signature: true (the caller's saved signature; ask them). A refusal the sender can fix is 422 with a code (missing_person, missing_values, role_without_signature, placement, …). Two steps: called WITHOUT confirm: true it sends nothing: it renders and checks the send, and returns an error naming who would be emailed, with a confirm_token in structuredContent. Show that to the user; once they agree, call again with the same arguments plus that confirm_token and confirm: true. If anything changed since (the people, copies or email words, the doc, a value, the date) nothing is sent (422 changed_since_review, or 409 for a new revision): preview again. An AppliFlo library contract no lawyer has reviewed is refused (409 contract_risk_required) until the person accepts the own-risk terms: ask them, then call again with risk_accepted: true. (Here: a Doc from a contract template or drafted with AI.) Returns envelope_id and pdf_document_id (track it with the envelope and document tools).

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `doc_id` | string | yes | A Doc's doc_id (from list_docs, or list_documents' kind 'doc' rows). Up to 80 characters |
| `revision` | integer | yes | get_doc's revision: what you checked is what is sent (409 otherwise). At least 0 |
| `people` | map of object | yes | One person per role key (get_doc roles[].key, e.g. r1) |
| `cc` | object[] | no | Extra people who get a copy. Up to 10 items |
| `cc[].email` | string | yes |  |
| `cc[].name` | string | no |  |
| `subject` | string | no | The email subject. Defaults to the doc's title. Up to 200 characters |
| `message` | string | no | Up to 2000 characters |
| `reminder` | string | no | Reminder emails: off, daily, 3d or 7d. One of: off, daily, 3d, 7d |
| `expiry_days` | integer \| null | no | Days until the links stop working; null: never. 1 to 365 |
| `typed` | map of string | no | Values for variables, by key (e.g. {"matter.fee_total": "4950"}) |
| `sender_fills` | map of string | no | The sender's text for boxes they fill, by box id (from get_doc format json) |
| `local_day` | string | no | The sender's own date today (YYYY-MM-DD) |
| `adopt_signature` | boolean | no | The sender adopts their saved signature for the Doc's sender signature. Ask them first |
| `client_id` | string \| null | no | The client (list_clients) the Doc, its envelope and its PDF go on |
| `risk_accepted` | boolean | no | The person accepts AppliFlo's own-risk terms (Terms section 8A) for a library contract no lawyer has reviewed. Set it only after asking the person |
| `confirm_token` | string | no | From the unconfirmed call's structuredContent: what the user reviewed |
| `confirm` | boolean | no | true to really do it. Without it nothing happens: you get an error describing what would happen, to show the user |
