Create Document
create_documentCreate a document and send it for electronic signature. Provide either templateId (from list_templates) or fileId (from upload_file) — not both. When using a template: call get_template to see signee slots and pre-configured signature settings, then get_template_fields for form fields. When using a file: call get_file_fields to discover form fields. Signature placement defaults to new_page unless explicitly configured via signatureBox. The document name is visible to signees and should be a clear, human-readable title, not the uploaded filename. If deriving it from a PDF filename, strip the file extension unless the user explicitly wants to keep it. BEFORE calling this tool, always ask the user: (1) invitation language, (2) optional personal message, (3) signature placement — only when using a file, not a template: new_page (default, recommended) or existing page with coordinates, (4) signature type — only if get_account_capabilities shows non-default types available and no template default applies, (5) AI assistant — only if get_account_capabilities confirms the aiAssistant capability. ALSO when using a file: ask the user whether they want a preview before sending. If yes, save the configuration as a draft via create_draft, share a one-time preview via get_draft_file_url, and send via send_draft after the user confirms — instead of calling create_document directly. Recommend a preview whenever signaturePlacement is 'existing' or when custom coordinates have been used.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable document title visible to signees. If deriving from an uploaded PDF filename, strip the file extension (e.g. 'contract.pdf' → 'contract') unless the user explicitly wants the extension. | |
| fields | No | Form fields to pre-fill at document creation time. This is the preferred way to fill fields — always use this when you have the values, rather than set_document_field_values after creation. | |
| fileId | No | File ID from upload_file. Required if templateId is not provided. | |
| userId | No | User ID to assign as document owner. Defaults to the authenticated user. | |
| language | No | Language for the signing invitation | |
| templateId | No | Template ID from list_templates. Required if fileId is not provided. | |
| aiAssistant | No | Optional AI assistant that helps signees while reviewing the document. Requires the aiAssistant capability. | |
| signeeDetails | Yes | List of signees. At least 1 is always required. The number of signees should match what the template expects — call get_template first to see how many signee slots it defines. The user decides the final count; some templates are pre-configured for a specific number. | |
| sharingSetting | No | Whether the document is private or shared with other users on the account | |
| personalMessage | No | Optional personal message included in the signing invitation. Maximum 500 characters. | |
| enableSigningOrder | No | Enable sequential signing order (default false) | |
| fieldsReadonlyMode | No | Always set to 'filled' when providing field values — this locks pre-filled fields so signers cannot change them. Options: keepOriginal (default — no locking), filled (pre-filled fields become read-only), all (all fields become read-only). |