Add Document to Draft
add_document_to_draftAppend a document to an existing Draft. Provide exactly one of document_base64, document_url, or template_id. A multi-document template inserts ALL of its documents (each counts toward the limit of 10) and name is then not allowed. role_mapping (template only) maps the template's roles onto this envelope's roles, e.g. {"customer": "client"}; unmapped roles are inserted as-is, never guessed. Fields already placed keep their pages; inserted pages come after them. Returns the draft with its documents[] (page ranges) so you can place fields with document_id + document-relative page. Requires Authorization: Bearer zs_....
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": {
"document_id": "<document_id>"
},
"name": "add_document_to_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| filename | No | document.pdf | |
| document_id | Yes | ||
| template_id | No | ||
| document_url | No | ||
| role_mapping | No | ||
| document_base64 | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |