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 support@docsautomator.co.
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'
}
Google's refresh token is valid for 60 days and might expire. Please re-authenticate in this case under settings in your DocsAutomator account.
{
"message": "No refresh token found, please re-authenticate Google"
}
Please makes you're passing a valid automation id ("docId").
{
"message": "Please add a valid automation id with key 'docId' to the request."
}
Please makes you're passing a valid automation id ("docId") which is part of the authenticated user.
{
"message": "Automation / template id does not exist or is not part of the account with the given API key. Please check in your DocsAutomator account."
}
Please make sure to set a Google Doc template in your automation.
{
"message": "No Google Docs template set for the given document id. Please set a template in your DocsAutomator account."
}
If you've reached your documents limit, you will receive the following:
{
"message": "You have reached your documents limit. Please upgrade your plan: https://app.docsautomator.co/subscribe"
}
Please make sure the automation is active when sending requests:
{
"message": "Automation is not active. Please activate automation in your DocsAutomator account."
}
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
200
Successful response
Get user automations
get
Authorizations
Responses
200
Successful response
application/json
401
Unauthorized
404
User not found
500
Internal server error
get
Delete an automation
delete
Authorizations
Query parameters
docIdstringRequired
The ID of the automation document
Responses
200
Automation deleted successfully
application/json
401
Unauthorized
404
Document or user not found
500
Internal server error
delete
Duplicate an automation
post
Authorizations
Query parameters
automationIdstringRequired
The ID of the automation to duplicate
Responses
200
Automation duplicated successfully
application/json
401
Unauthorized
404
Automation or user not found
500
Internal server error
post
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
400
Bad request
401
Unauthorized
404
Automation or user not found
500
Internal server error
post
GET /createDocument HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer JWT
Accept: */*
text
GET /automations HTTP/1.1
Host: api.docsautomator.co
Authorization: Bearer JWT
Accept: */*
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)