Page cover image

DocsAutomator API

DocsAutomator offers a powerful REST API to create documents from anywhere and list, create, update and delete your DocsAutomator automations.

Intro

DocsAutomator's API allows you to generate documents programmatically from code. In addition, it offers endpoints to perform all CRUD actions on automations (create, read, update, delete) as well as listing placeholders of documents, copying a Google Doc tempate with code and more.

The API can be utilised to add a performant document creation solution into any software. If you have any questions, please reach out via chat or to [email protected].

If you haven't created a template yet, please start with the guide here: Google Doc Template Guide

Integration developers: If you're interested in building an integration for DocsAutomator, please reach out to support.

Authorization

DocsAutomator uses API keys for authentication. The API key is passed like so:

Authorization: Bearer API_KEY

Error Responses

The API will send descriptive error responses for a variety of errors that can occur during document creation requests. Please find the most common errors listed below:

Please make sure you're passing the correct API key. Otherwise, you'll receive the following error:

{
  "message": 'Incorrect / missing API key'
}

Endpoints

Create a document (Airtable and ClickUp only)

get

This endpoint triggers document creation as a GET request. Successful requests don't receive a JSON response, just a status 200 (if you need the PDF or Google Doc URL as a response, please use the POST request below). This works for Airtable and ClickUp only and you will have to pass the Airtable Record ID or ClickUp Task ID when making a request. Error messages are returned as JSON.

Authorizations
Query parameters
apiKeystringRequired

API key for authentication

docIdstringRequired

The ID of the document

recIdstringRequired

Record ID for Airtable

taskIdstringRequired

Task ID for ClickUp

Responses
200
Successful response
text/html
Responsestring
get
GET /createDocument HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer JWT
Accept: */*
200

Successful response

text

Create a new document

post

This endpoint triggers document creation as a POST request. For successes, you will receive a JSON response with the URL of the created PDF and optionally the url of the Google Doc (if enabled in your automation). Error messages are returned as JSON as explained above under 'Error Messages'.

Authorizations
Header parameters
Content-TypestringRequired

Content type header

Example: application/json
AuthorizationstringRequired

Authorization header with Bearer token

Example: Bearer {apiKey}
Body
docIdstringRequired

The ID of the document

documentNamestringOptional

The name of the generated document (data source API only)

recIdstringOptional

Record ID for Airtable (Airtable only — data not required)

taskIdstringOptional

Task ID for ClickUp (ClickUp only — data not required)

Responses
200
Document created successfully
application/json
post
POST /createDocument HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer {apiKey}
Content-Type: application/json
Accept: */*
Content-Length: 212

{
  "docId": "text",
  "documentName": "text",
  "recId": "text",
  "taskId": "text",
  "data": {
    "placeholderOne": "text",
    "placeholderTwo": "text",
    "line_items_$num": [
      {
        "lineItemPlaceholderOne": "text",
        "lineItemPlaceholderTwo": "text"
      }
    ]
  }
}
200

Document created successfully

{
  "pdfUrl": "https://firebasestorage.googleapis.com/v0/b/docsautomator.appspot.com/o/1krzffnfKYAEO6gbOmvIHfnOqw6-OjaDSzemLkQb1yjM.pdf?alt=media&token=194fd896-e303-4e7c-8abd-d5718b91723c",
  "googleDocUrl": "https://docs.google.com/document/d/1RQqb0JqkCHSp0WaJGuRAVt85C4yxxizV48kyhBPXoug/edit",
  "savePdfGoogleDriveFolderId": "1RQqb0JqkCHSp0WaJGuRAVt85C4yxxizV48kyhBPXoug"
}

Get user automations

get
Authorizations
Responses
200
Successful response
application/json
get
GET /automations HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer JWT
Accept: */*
{
  "automations": [
    {
      "dataSource": {
        "airtableLinkedFields": [
          "text"
        ],
        "name": "text",
        "airtableBaseId": "text",
        "airtableTableId": "text"
      },
      "imageOptions": {
        "quality": "text",
        "maxWidth": 1
      },
      "options": {
        "lineDeletions": [
          "text"
        ]
      },
      "title": "text",
      "dateCreated": "2025-06-27T04:45:15.609Z",
      "locale": "text",
      "isActive": true,
      "formatNumbersWithLocale": true,
      "pdfExpiration": "2025-06-27T04:45:15.609Z",
      "_id": "text",
      "docTemplateLink": "text",
      "newDocumentNameField": "text",
      "attachmentField": "text",
      "lastPreviewPdf": "text",
      "dataSourceName": "text"
    }
  ]
}

Update an automation

put
Authorizations
Query parameters
docIdstringRequired

The ID of the automation document

Body
objectOptional
Responses
200
Automation updated successfully
application/json
put
PUT /updateAutomation HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 2

{}
{
  "message": "text",
  "updatedAutomation": {
    "title": "text",
    "docTemplateLink": "text",
    "newDocumentNameField": "text",
    "attachmentField": "text",
    "locale": "text",
    "dataSource": {
      "name": "text",
      "airtableBaseId": "text",
      "airtableTableId": "text",
      "airtableLinkedFields": [
        "text"
      ]
    },
    "fields": {},
    "saveGoogleDoc": true,
    "overwriteAttachment": true,
    "isActive": true,
    "isPreview": true,
    "lastPreviewPdf": "text",
    "googleDocDestinationFolderUrl": "text",
    "googleDocUrlField": "text",
    "dateFormat": "text",
    "formatNumbersWithLocale": true,
    "pdfExpiration": "2025-06-27T04:45:15.609Z",
    "imageOptions": {
      "quality": "text",
      "maxWidth": 1
    },
    "options": {
      "lineDeletions": [
        "text"
      ]
    }
  }
}

Delete an automation

delete
Authorizations
Query parameters
docIdstringRequired

The ID of the automation document

Responses
200
Automation deleted successfully
application/json
delete
DELETE /deleteAutomation HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer JWT
Accept: */*
{
  "message": "text",
  "user": {}
}

Create a new automation

post
Authorizations
Body
titlestringRequired
dataSourceNamestringRequired
docTemplateLinkstring | nullableOptional
Responses
201
Automation created successfully
application/json
post
POST /createAutomation HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "title": "text",
  "dataSourceName": "text",
  "docTemplateLink": "text"
}
{
  "message": "text",
  "newAutomation": {
    "title": "text",
    "dateCreated": "2025-06-27T04:45:15.609Z",
    "docTemplateLink": "text",
    "dataSource": {
      "name": "text"
    },
    "_id": "text"
  }
}

List placeholders in automation

get

This endpoint lists placeholders in an automation. The response includes all placeholders for main document and line items.

Authorizations
Query parameters
automationIdstringRequired

The ID of the automation

Responses
200
Placeholders listed successfully
application/json
get
GET /listPlaceholdersV2 HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer JWT
Accept: */*
{
  "placeholders": {
    "main": [
      "text"
    ],
    "line_items_1": [],
    "line_items_2": []
  }
}

Duplicate an automation

post
Authorizations
Query parameters
automationIdstringRequired

The ID of the automation to duplicate

Responses
200
Automation duplicated successfully
application/json
post
POST /duplicateAutomation HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer JWT
Accept: */*
{
  "newAutomationId": "text"
}

Duplicate a Google Doc template

post
Authorizations
Query parameters
automationIdstringRequired

The ID of the automation containing the template to duplicate

newTemplateNamestringOptional

The name for the new template

Responses
200
Google Doc template duplicated successfully
application/json
post
POST /duplicateGoogleDocTemplate HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer JWT
Accept: */*
{
  "message": "text",
  "newTemplateId": "text",
  "url": "text"
}

Last updated