Skip to main content
The DocsAutomator API lets you generate documents programmatically, manage automations, and control e-signature workflows. Use it to integrate document generation into any application.
The API works with both Google Doc and PDF template automations. The same POST /createDocument endpoint generates documents from either template type — the automation’s configuration determines the output.

Base URL

https://api.docsautomator.co

Authentication

All API requests require authentication. Pass your API key using either method:
# Bearer token (recommended)
Authorization: Bearer YOUR_API_KEY

# Alternative header
X-API-Key: YOUR_API_KEY
Find your API key at app.docsautomator.co/settings/workspace/api. API keys are scoped to a workspace.

Quick Start

Create your first document in three steps:
1

Get your API key

Go to Settings > Workspace > API in the DocsAutomator app.
2

Get your automation ID

Find the automation ID on the automation’s settings page, or call GET /automations to list all automations.
3

Create a document

curl -X POST https://api.docsautomator.co/createDocument \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "docId": "YOUR_AUTOMATION_ID",
    "data": {
      "customer_name": "Acme Corp",
      "invoice_date": "2025-01-15",
      "total": "$1,500.00"
    }
  }'

Sync vs Async Mode

By default, POST /createDocument runs synchronously and waits for the document to be generated (up to 5 minutes). For high-volume or latency-sensitive workflows, use async mode.

Sync mode (default)

{
  "docId": "abc123",
  "data": { "name": "Acme Corp" }
}
Returns 200 with the PDF URL when complete.

Async mode

{
  "docId": "abc123",
  "async": true,
  "data": { "name": "Acme Corp" }
}
Returns 202 with a jobId immediately. Poll GET /job/{jobId} for the result:
curl https://api.docsautomator.co/job/YOUR_JOB_ID \
  -H "Authorization: Bearer YOUR_API_KEY"
Polling pattern: Use exponential backoff starting at 2 seconds. Jobs typically complete in 5-30 seconds.

Data Source Guides

The POST /createDocument endpoint works differently depending on your automation’s data source. See the guide for your data source:

API

Pass data directly — most flexible option

Airtable

Pass a record ID

Google Sheets

Pass a row number

SmartSuite

Pass a record ID

ClickUp

Pass a task ID

Rate Limits

ScopeLimit
Global2000 requests per 15 minutes per API key
Test email25 per hour per automation
Queue concurrencyMax 5 active jobs per workspace
When you exceed a rate limit, the API returns 429 Too Many Requests.

Error Codes

CodeDescription
400Bad request — missing or invalid parameters
401Unauthorized — incorrect or missing API key
402Payment required — document limit exceeded
404Not found — automation, template, or resource doesn’t exist
429Rate limited — too many requests
500Server error — try again or contact support

Common 401 Causes

  • Missing Authorization or X-API-Key header
  • Incorrect API key
  • Expired Google refresh token (reconnect Google account in the app)

Common 404 Causes

  • Automation ID doesn’t exist or belongs to another workspace
  • No template configured on the automation
  • Automation is inactive (set isActive: true via the API or app)

Webhooks

Configure a webhook URL on your automation to receive notifications after document generation. The webhook receives a POST request with:
{
  "message": "success",
  "pdfUrl": "https://...",
  "googleDocUrl": "https://...",
  "webhookParams": { "orderId": "ORD-123", "recId": "recAbC123XyZ" },
  "additionalParams": { "orderId": "ORD-123", "recId": "recAbC123XyZ" }
}
Pass custom data through to webhooks using webhookParams in your createDocument request. It is returned under both webhookParams and additionalParams (identical content; the latter is kept for backward compatibility), together with the automatically included trigger record identifier — recId (Airtable, SmartSuite, Notion), taskId (ClickUp), or rowNumber (Google Sheets). Your own keys are never overwritten.

E-Signatures

When an automation has e-signatures enabled and the template contains e-sign placeholders ({{esign.signature_1}}, {{esign.date_1}}, etc.), creating a document automatically starts a signing workflow. The response includes the signing session ID and signing links. See the E-Signatures endpoints for managing signing sessions programmatically, or the eSign guide for setup instructions.
Each endpoint in the API Reference section includes an interactive API playground where you can test requests directly from the docs. Navigate to any endpoint page and look for the “Try it” panel on the right side.

Need Help?

In-App Chat

Contact support via the in-app chat
Last modified on June 12, 2026