Documents
Create a document
Changed onTriggers document generation from an automation template (Google Doc or PDF). Supports sync mode (waits for result) and async mode (returns a job ID for polling). The response includes PDF and optional Google Doc URLs.
When the automation has e-signatures enabled and the template contains e-sign placeholders, a signing session is automatically created and included in the response.
post/createDocument
Request
- Base URLhttps://api.docsautomator.co
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"automationId": "abc123",
"data": {
"customer_name": "Acme Corp",
"invoice_number": "INV-2025-001",
"invoice_date": "2025-01-15",
"due_date": "2025-02-15",
"subtotal": "$5,500.00",
"tax": "$495.00",
"total": "$5,995.00"
},
"documentName": "Invoice INV-2025-001",
"webhookParams": {
"orderId": "ORD-123",
"source": "api"
},
"existingPdfs": [
"https://example.com/terms-and-conditions.pdf"
],
"docTemplateLink": "https://docs.google.com/document/d/your-template-id/edit",
"wordTemplateLink": "https://example.com/templates/proposal.docx",
"pdfTemplateLink": "https://example.com/checks/check-1043.pdf",
"recipients": [
{
"signer": 1,
"email": "anna@acme.com",
"name": "Anna Weber"
}
]
}Response
Document created successfully (sync mode)
Example response
{
"message": "success"
}Changes
- warning
added the new
awaiting_approvalenum value to theresponse property for the response status - info
added the optional property
to the response with the status
- warning
- info
added the new optional request property
- info
added the new optional request property
- info