Everything you need to start using the DocsAutomator API
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 headerX-API-Key: YOUR_API_KEY
Create an API key in Settings > API keys, or click Create a key for this in the automation’s setup guide. The full key is shown once, so copy it when you create it. API keys belong to a workspace. See API keys.
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.
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
Scope
Limit
Global
2000 requests per 15 minutes per API key
Test email
25 per hour per automation
Queue concurrency
Max 5 active jobs per workspace
Document creation
Never limited under 20 open requests, see below
When you exceed a rate limit, the API returns 429 Too Many Requests.
Document creation requests
Most workspaces never meet this limit. It only protects the API when one workspace sends a very large number of requests at once. It applies to every request to /createDocument, including requests from the API, Zapier, Make, n8n, MCP and the in-app assistant. These requests do not count toward the global limit.An open request is one that we have received and not yet answered.
Fewer than 20 open requests: your request is always accepted, even when the API is busy.
20 or more open requests: your workspace has an allowance of 120 requests, which refills by 5 a second. When the allowance is used up, the next request gets a 429.
The API is busy: when the API holds 100 open document requests in total, only the workspace with the most open requests gets a 429.
How to retry
A 429 from the document creation limit means that no document was created, so it is safe to send the same request again. A 429 from a connected service (see Common 429 Causes) can come after part of the work is done, for example after the PDF was attached to a SmartSuite record.
Read the Retry-After header of the response. It gives the wait in seconds.
Wait that long, then send the same request again.
If you send many documents, wait for some answers before you send more, or send "async": true so that each answer comes back at once.
Error Codes
Code
Description
400
Bad request. A parameter is missing or invalid, a connected account must be reconnected (code SOURCE_ACCOUNT_DISCONNECTED, see below), or the e-invoice or QR-bill data is invalid (code E_INVOICE_INVALID or QR_BILL_INVALID).
401
Unauthorized. The API key is missing or incorrect.
402
Payment required. The workspace reached its document limit, or its subscription is paused.
403
Forbidden. The connected Google or Airtable account may not open or edit the template, folder, base or field; the Google Drive is full; or the request uses something the workspace may not use, such as signing without an active subscription or approvers below the Business plan.
404
Not found. The automation, template, or record does not exist.
429
Too many requests. Wait the number of seconds in the Retry-After header, then send the request again (see below).
5xx
Server error, or a connected service failed or did not answer. Try again later, or contact support if it keeps happening.
Errors from /createDocument are JSON with a message. Some also have a code. A 4xx answer has the same status and code whether the request runs right away or waits in our queue.
Common 400 Causes
A required parameter is missing or invalid.
SOURCE_ACCOUNT_DISCONNECTED: the Google, Notion or Airtable account connected to your workspace no longer works. The message says which account. Reconnect it in the DocsAutomator app under Settings, Integrations, then send the request again. Your API key is fine. It happens when:
Airtable or Notion refuses the stored refresh token, because the access expired, was revoked, or was granted again elsewhere. This is the most common case.
DocsAutomator has no Google access token it can use or renew, or Google refuses the connected account (“Invalid Credentials”).
Airtable or Notion refuses the connection itself.
{ "message": "Error refreshing Airtable access token. Please visit https://app.docsautomator.co/settings/workspace/integrations and reconnect your Airtable integration. This will not remove any of your data mappings.", "code": "SOURCE_ACCOUNT_DISCONNECTED"}
Common 401 Causes
Missing Authorization or X-API-Key header
Incorrect API key
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)
Common 429 Causes
Your workspace sent too many document requests at once (see Rate Limits). No document was created. Retry-After is 10 seconds.
More than 2000 requests per 15 minutes with one API key. Retry-After is the time until the window resets.
Google, Notion or SmartSuite limited the requests of your connected account, after their own retries. Retry-After is 60 seconds.
/sendTestEmail: the test email limit is reached (25 per hour per automation, 100 per hour per workspace, or 10 different recipients per hour per workspace). Retry-After is the time until the hourly window resets. A workspace without an active subscription can also send at most 25 emails to at most 5 different recipients in 24 hours; when that limit is reached, Retry-After is the time until the oldest counted email leaves the 24-hour window. This answer has the text in error, not message.
Every 429 has a Retry-After header with the wait in seconds.
Webhooks
Configure a webhook URL on your automation to receive notifications after document generation. The webhook receives a POST request with:
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 eSign API reference 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.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"DocsAutomator","colors":{"primary":"#4f46e5","light":"#818cf8","dark":"#3730a3"},"logo":{"light":"https://mintcdn.com/docsautomator/aWJzng63hl4bgVX9/logo/light.svg?fit=max\u0026auto=format\u0026n=aWJzng63hl4bgVX9\u0026q=85\u0026s=a89d4e949fd24be7b244a51939eccb26","dark":"https://mintcdn.com/docsautomator/aWJzng63hl4bgVX9/logo/dark.svg?fit=max\u0026auto=format\u0026n=aWJzng63hl4bgVX9\u0026q=85\u0026s=155c195e2edcade52d5cbcbe58d64b76"},"favicon":"https://mintcdn.com/docsautomator/aWJzng63hl4bgVX9/favicon.svg?fit=max\u0026auto=format\u0026n=aWJzng63hl4bgVX9\u0026q=85\u0026s=9656fbf52a0ead3b218121003b721847","api":{"playground":{"display":"interactive","proxy":true}},"appearance":{},"background":{"decoration":"gradient"},"navbar":{"primary":{"type":"button","label":"Get Started Free","href":"https://app.docsautomator.co"}},"footer":{"socials":{"x":"https://x.com/docsautomator","youtube":"https://youtube.com/@docsautomator"},"links":[{"header":"Product","items":[{"label":"Pricing","href":"https://docsautomator.co/pricing"},{"label":"Template Gallery","href":"https://docsautomator.co/templates"},{"label":"Changelog","href":"/docs/changelog"}]},{"header":"Resources","items":[{"label":"Documentation","href":"/docs"},{"label":"API Reference","href":"/docs/api-reference/introduction"},{"label":"Video Tutorials","href":"https://youtube.com/@docsautomator"}]},{"header":"Company","items":[{"label":"Website","href":"https://docsautomator.co"},{"label":"Book a Call","href":"https://cal.com/docsautomator/20min"},{"label":"Contact","href":"mailto:support@docsautomator.co"}]}]},"search":{"prompt":"Search DocsAutomator docs..."},"seo":{"metatags":{"og:image":"https://docsautomator.co/docs/images/og/docs-default.jpg","og:image:alt":"DocsAutomator documentation","twitter:image":"https://docsautomator.co/docs/images/og/docs-default.jpg","og:site_name":"DocsAutomator Documentation","twitter:card":"summary_large_image","twitter:site":"@docsautomator"},"indexing":"all"},"integrations":{"posthog":{"apiKey":"phc_yPsDdVmPczJK4ypcWm1RiPWfri6c2eSTgCiaQP95X3X"}},"banner":{"content":"New: DocsAutomator now works inside HubSpot. [See the setup guide →](https://docsautomator.co/docs/integrations-api/hubspot)","dismissible":true},"contextual":{"options":["copy","chatgpt","claude","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"docsautomator","hasAudioNarration":false,"actualSubdomain":"docsautomator","customDomains":["docsautomator.co"],"gitSource":{"type":"github","owner":"docsautomator","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10ce9e9ffae5051c40a4a4"},"entitlements":{},"buildId":"6b127cfe897fe74a4e1fd71e","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"Documentation","count":99},{"language":"default","tag":"Features","count":48},{"language":"default","tag":"API Reference","count":24},{"language":"default","tag":"Integrations","count":18},{"language":"default","tag":"Resources","count":14},{"language":"default","tag":"Getting Started","count":11},{"language":"default","tag":"Actions After Document Generation","count":10},{"language":"default","tag":"Signing \u0026 Acceptance","count":9},{"language":"default","tag":"Troubleshooting","count":9},{"language":"default","tag":"Documents","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/introduction","slug":"/api-reference/introduction","pageMetadata":{"title":"Introduction","description":"Everything you need to start using the DocsAutomator API","keywords":["API reference","authentication","rate limits","error codes","async mode"],"href":"/api-reference/introduction"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Everything you need to start using the DocsAutomator API\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Frame,Heading,Info,OptimizedImage,Step,Steps,Table}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The DocsAutomator API lets you generate documents programmatically, manage automations, and control e-signature workflows. Use it to integrate document generation into any application.`}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`The API works with both `,_jsx(_components.strong,{children:`Google Doc`}),` and `,_jsx(_components.strong,{children:`PDF template`}),` automations. The same `,_jsx(_components.code,{children:`POST /createDocument`}),` endpoint generates documents from either template type — the automation’s configuration determines the output.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`base-url`,children:`Base URL`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`https://api.docsautomator.co`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(_components.p,{children:`All API requests require authentication. Pass your API key using either method:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Bearer token (recommended)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_API_KEY`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Alternative header`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`X-API-Key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_API_KEY`})]}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Create an API key in `,_jsx(_components.a,{href:`https://app.docsautomator.co/settings/workspace/api`,children:`Settings > API keys`}),`, or click `,_jsx(_components.strong,{children:`Create a key for this`}),` in the automation’s setup guide. The full key is shown once, so copy it when you create it. API keys belong to a workspace. See `,_jsx(_components.a,{href:`/more/finding-your-api-key`,children:`API keys`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`quick-start`,children:`Quick Start`}),`\n`,_jsx(_components.p,{children:`Create your first document in three steps:`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Create an API key`,children:[_jsxs(_components.p,{children:[`Go to `,_jsx(_components.a,{href:`https://app.docsautomator.co/settings/workspace/api`,children:`Settings > API keys`}),` in the DocsAutomator app, click `,_jsx(_components.strong,{children:`Create key`}),` and copy the key. See `,_jsx(_components.a,{href:`/more/finding-your-api-key`,children:`API keys`}),`.`]}),_jsx(Frame,{caption:`Click Create key and name the key after the app that will use it.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/docsautomator/Aq2hrnXrAZ39cS85/images/api-keys/create-key-dialog.png?fit=max\u0026auto=format\u0026n=Aq2hrnXrAZ39cS85\u0026q=85\u0026s=f4492038f4564e72e57a172b13b1d056`,alt:`The Create API key dialog with the name Make in the Name field and the Cancel and Create key buttons`,\"data-og-width\":`3200`,width:`3200`,\"data-og-height\":`1800`,height:`1800`,\"data-path\":`images/api-keys/create-key-dialog.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/docsautomator/Aq2hrnXrAZ39cS85/images/api-keys/create-key-dialog.png?w=280\u0026fit=max\u0026auto=format\u0026n=Aq2hrnXrAZ39cS85\u0026q=85\u0026s=298e6f121ba9323e7d291a6d7ca99829 280w, https://mintcdn.com/docsautomator/Aq2hrnXrAZ39cS85/images/api-keys/create-key-dialog.png?w=560\u0026fit=max\u0026auto=format\u0026n=Aq2hrnXrAZ39cS85\u0026q=85\u0026s=15482fcf043d5c2f9f5901a1f1203e19 560w, https://mintcdn.com/docsautomator/Aq2hrnXrAZ39cS85/images/api-keys/create-key-dialog.png?w=840\u0026fit=max\u0026auto=format\u0026n=Aq2hrnXrAZ39cS85\u0026q=85\u0026s=cad592c2c434a587f75bdc20089bab6c 840w, https://mintcdn.com/docsautomator/Aq2hrnXrAZ39cS85/images/api-keys/create-key-dialog.png?w=1100\u0026fit=max\u0026auto=format\u0026n=Aq2hrnXrAZ39cS85\u0026q=85\u0026s=c52dbe0f35bad918f8a96980858ec9f7 1100w, https://mintcdn.com/docsautomator/Aq2hrnXrAZ39cS85/images/api-keys/create-key-dialog.png?w=1650\u0026fit=max\u0026auto=format\u0026n=Aq2hrnXrAZ39cS85\u0026q=85\u0026s=d629040ae0558713c8dc8a6ad0d15ddd 1650w, https://mintcdn.com/docsautomator/Aq2hrnXrAZ39cS85/images/api-keys/create-key-dialog.png?w=2500\u0026fit=max\u0026auto=format\u0026n=Aq2hrnXrAZ39cS85\u0026q=85\u0026s=2d641f43faa190552ae741271c12bfd0 2500w`})})]}),_jsx(Step,{title:`Get your automation ID`,children:_jsxs(_components.p,{children:[`Find the automation ID on the automation’s settings page, or call `,_jsx(_components.code,{children:`GET /automations`}),` to list all automations.`]})}),_jsx(Step,{title:`Create a document`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.docsautomator.co/createDocument`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"automationId\": \"YOUR_AUTOMATION_ID\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"data\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer_name\": \"Acme Corp\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_date\": \"2025-01-15\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"total\": \"$1,500.00\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`18`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.docsautomator.co/createDocument\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` automationId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_AUTOMATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customer_name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Acme Corp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` invoice_date:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"2025-01-15\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` total:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"$1,500.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pdfUrl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`20`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.docsautomator.co/createDocument\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"automationId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_AUTOMATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Acme Corp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"invoice_date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2025-01-15\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"total\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$1,500.00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pdfUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})})]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`sync-vs-async-mode`,children:`Sync vs Async Mode`}),`\n`,_jsxs(_components.p,{children:[`By default, `,_jsx(_components.code,{children:`POST /createDocument`}),` runs synchronously and waits for the document to be generated (up to 5 minutes). For high-volume or latency-sensitive workflows, use `,_jsx(_components.strong,{children:`async mode`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`sync-mode-default`,children:`Sync mode (default)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"automationId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Acme Corp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`200`}),` with the PDF URL when complete.`]}),`\n`,_jsx(Heading,{level:`3`,id:`async-mode`,children:`Async mode`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"automationId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"async\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Acme Corp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`202`}),` with a `,_jsx(_components.code,{children:`jobId`}),` immediately. Poll `,_jsx(_components.code,{children:`GET /job/{jobId}`}),` for the result:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.docsautomator.co/job/YOUR_JOB_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Polling pattern:`}),` Use exponential backoff starting at 2 seconds. Jobs typically complete in 5-30 seconds.`]}),`\n`,_jsx(Heading,{level:`2`,id:`data-source-guides`,children:`Data Source Guides`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`POST /createDocument`}),` endpoint works differently depending on your automation’s data source. See the guide for your data source:`]}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`API`,href:`/api-reference/documents/create-from-api`,children:_jsx(_components.p,{children:`Pass data directly — most flexible option`})}),_jsx(Card,{title:`Airtable`,href:`/api-reference/documents/create-from-airtable`,children:_jsx(_components.p,{children:`Pass a record ID`})}),_jsx(Card,{title:`Google Sheets`,href:`/api-reference/documents/create-from-google-sheets`,children:_jsx(_components.p,{children:`Pass a row number`})}),_jsx(Card,{title:`SmartSuite`,href:`/api-reference/documents/create-from-smartsuite`,children:_jsx(_components.p,{children:`Pass a record ID`})}),_jsx(Card,{title:`ClickUp`,href:`/api-reference/documents/create-from-clickup`,children:_jsx(_components.p,{children:`Pass a task ID`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`rate-limits`,children:`Rate Limits`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Scope`}),_jsx(_components.th,{children:`Limit`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Global`}),_jsx(_components.td,{children:`2000 requests per 15 minutes per API key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Test email`}),_jsx(_components.td,{children:`25 per hour per automation`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Queue concurrency`}),_jsx(_components.td,{children:`Max 5 active jobs per workspace`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Document creation`}),_jsx(_components.td,{children:`Never limited under 20 open requests, see below`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`When you exceed a rate limit, the API returns `,_jsx(_components.code,{children:`429 Too Many Requests`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`document-creation-requests`,children:`Document creation requests`}),`\n`,_jsxs(_components.p,{children:[`Most workspaces never meet this limit. It only protects the API when one workspace sends a very large number of requests at once. It applies to every request to `,_jsx(_components.code,{children:`/createDocument`}),`, including requests from the API, Zapier, Make, n8n, MCP and the in-app assistant. These requests do not count toward the global limit.`]}),`\n`,_jsx(_components.p,{children:`An open request is one that we have received and not yet answered.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Fewer than 20 open requests:`}),` your request is always accepted, even when the API is busy.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`20 or more open requests:`}),` your workspace has an allowance of 120 requests, which refills by 5 a second. When the allowance is used up, the next request gets a `,_jsx(_components.code,{children:`429`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The API is busy:`}),` when the API holds 100 open document requests in total, only the workspace with the most open requests gets a `,_jsx(_components.code,{children:`429`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`how-to-retry`,children:`How to retry`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`429`}),` from the document creation limit means that no document was created, so it is safe to send the same request again. A `,_jsx(_components.code,{children:`429`}),` from a connected service (see `,_jsx(_components.a,{href:`#common-429-causes`,children:`Common 429 Causes`}),`) can come after part of the work is done, for example after the PDF was attached to a SmartSuite record.`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Read the `,_jsx(_components.code,{children:`Retry-After`}),` header of the response. It gives the wait in seconds.`]}),`\n`,_jsx(_components.li,{children:`Wait that long, then send the same request again.`}),`\n`,_jsxs(_components.li,{children:[`If you send many documents, wait for some answers before you send more, or send `,_jsx(_components.code,{children:`\"async\": true`}),` so that each answer comes back at once.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`error-codes`,children:`Error Codes`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[`Bad request. A parameter is missing or invalid, a connected account must be reconnected (code `,_jsx(_components.code,{children:`SOURCE_ACCOUNT_DISCONNECTED`}),`, see below), or the e-invoice or QR-bill data is invalid (code `,_jsx(_components.code,{children:`E_INVOICE_INVALID`}),` or `,_jsx(_components.code,{children:`QR_BILL_INVALID`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:`Unauthorized. The API key is missing or incorrect.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`402`})}),_jsx(_components.td,{children:`Payment required. The workspace reached its document limit, or its subscription is paused.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`Forbidden. The connected Google or Airtable account may not open or edit the template, folder, base or field; the Google Drive is full; or the request uses something the workspace may not use, such as signing without an active subscription or approvers below the Business plan.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:`Not found. The automation, template, or record does not exist.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsxs(_components.td,{children:[`Too many requests. Wait the number of seconds in the `,_jsx(_components.code,{children:`Retry-After`}),` header, then send the request again (see below).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`5xx`})}),_jsx(_components.td,{children:`Server error, or a connected service failed or did not answer. Try again later, or contact support if it keeps happening.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Errors from `,_jsx(_components.code,{children:`/createDocument`}),` are JSON with a `,_jsx(_components.code,{children:`message`}),`. Some also have a `,_jsx(_components.code,{children:`code`}),`. A `,_jsx(_components.code,{children:`4xx`}),` answer has the same status and code whether the request runs right away or waits in our queue.`]}),`\n`,_jsx(Heading,{level:`3`,id:`common-400-causes`,children:`Common 400 Causes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A required parameter is missing or invalid.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`SOURCE_ACCOUNT_DISCONNECTED`}),`: the Google, Notion or Airtable account connected to your workspace no longer works. The message says which account. Reconnect it in the DocsAutomator app under `,_jsx(_components.a,{href:`https://app.docsautomator.co/settings/workspace/integrations`,children:`Settings, Integrations`}),`, then send the request again. Your API key is fine. It happens when:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Airtable or Notion refuses the stored refresh token, because the access expired, was revoked, or was granted again elsewhere. This is the most common case.`}),`\n`,_jsx(_components.li,{children:`DocsAutomator has no Google access token it can use or renew, or Google refuses the connected account (“Invalid Credentials”).`}),`\n`,_jsx(_components.li,{children:`Airtable or Notion refuses the connection itself.`}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Error refreshing Airtable access token. Please visit https://app.docsautomator.co/settings/workspace/integrations and reconnect your Airtable integration. This will not remove any of your data mappings.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SOURCE_ACCOUNT_DISCONNECTED\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`common-401-causes`,children:`Common 401 Causes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Missing `,_jsx(_components.code,{children:`Authorization`}),` or `,_jsx(_components.code,{children:`X-API-Key`}),` header`]}),`\n`,_jsx(_components.li,{children:`Incorrect API key`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`common-404-causes`,children:`Common 404 Causes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Automation ID doesn’t exist or belongs to another workspace`}),`\n`,_jsx(_components.li,{children:`No template configured on the automation`}),`\n`,_jsxs(_components.li,{children:[`Automation is inactive (set `,_jsx(_components.code,{children:`isActive: true`}),` via the API or app)`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`common-429-causes`,children:`Common 429 Causes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Your workspace sent too many document requests at once (see `,_jsx(_components.a,{href:`#rate-limits`,children:`Rate Limits`}),`). No document was created. `,_jsx(_components.code,{children:`Retry-After`}),` is 10 seconds.`]}),`\n`,_jsxs(_components.li,{children:[`More than 2000 requests per 15 minutes with one API key. `,_jsx(_components.code,{children:`Retry-After`}),` is the time until the window resets.`]}),`\n`,_jsxs(_components.li,{children:[`Google, Notion or SmartSuite limited the requests of your connected account, after their own retries. `,_jsx(_components.code,{children:`Retry-After`}),` is 60 seconds.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`/sendTestEmail`}),`: the test email limit is reached (25 per hour per automation, 100 per hour per workspace, or 10 different recipients per hour per workspace). `,_jsx(_components.code,{children:`Retry-After`}),` is the time until the hourly window resets. A workspace without an active subscription can also send at most 25 emails to at most 5 different recipients in 24 hours; when that limit is reached, `,_jsx(_components.code,{children:`Retry-After`}),` is the time until the oldest counted email leaves the 24-hour window. This answer has the text in `,_jsx(_components.code,{children:`error`}),`, not `,_jsx(_components.code,{children:`message`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Every `,_jsx(_components.code,{children:`429`}),` has a `,_jsx(_components.code,{children:`Retry-After`}),` header with the wait in seconds.`]}),`\n`,_jsx(Heading,{level:`2`,id:`webhooks`,children:`Webhooks`}),`\n`,_jsx(_components.p,{children:`Configure a webhook URL on your automation to receive notifications after document generation. The webhook receives a POST request with:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"pdfUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"googleDocUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"webhookParams\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"orderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"recId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"recAbC123XyZ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"additionalParams\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"orderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORD-123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"recId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"recAbC123XyZ\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Pass custom data through to webhooks using `,_jsx(_components.code,{children:`webhookParams`}),` in your `,_jsx(_components.code,{children:`createDocument`}),` request. It is returned under both `,_jsx(_components.code,{children:`webhookParams`}),` and `,_jsx(_components.code,{children:`additionalParams`}),` (identical content; the latter is kept for backward compatibility), together with the automatically included trigger record identifier — `,_jsx(_components.code,{children:`recId`}),` (Airtable, SmartSuite, Notion), `,_jsx(_components.code,{children:`taskId`}),` (ClickUp), or `,_jsx(_components.code,{children:`rowNumber`}),` (Google Sheets). Your own keys are never overwritten.`]}),`\n`,_jsx(Heading,{level:`2`,id:`e-signatures`,children:`E-Signatures`}),`\n`,_jsxs(_components.p,{children:[`When an automation has e-signatures enabled and the template contains e-sign placeholders (`,_jsx(_components.code,{children:`{{esign.signature_1}}`}),`, `,_jsx(_components.code,{children:`{{esign.date_1}}`}),`, etc.), creating a document automatically starts a signing workflow. The response includes the signing session ID and signing links.`]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/features/docsautomator-esign/docsautomator-esign-api-reference`,children:`eSign API reference`}),` for managing signing sessions programmatically, or the `,_jsx(_components.a,{href:`/features/docsautomator-esign`,children:`eSign guide`}),` for setup instructions.`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`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.`})}),`\n`,_jsx(Heading,{level:`2`,id:`need-help`,children:`Need Help?`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`In-App Chat`,icon:`comments`,children:_jsx(_components.p,{children:`Contact support via the in-app chat`})}),_jsx(Card,{title:`Email Support`,icon:`envelope`,href:`mailto:support@docsautomator.co`,children:_jsx(_components.p,{children:_jsx(_components.a,{href:`mailto:support@docsautomator.co`,children:`support@docsautomator.co`})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Introduction","description":"Everything you need to start using the DocsAutomator API","keywords":["API reference","authentication","rate limits","error codes","async mode"],"href":"/api-reference/introduction"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Base URL","slug":"base-url","depth":2,"children":[]},{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Quick Start","slug":"quick-start","depth":2,"children":[]},{"title":"Sync vs Async Mode","slug":"sync-vs-async-mode","depth":2,"children":[{"title":"Sync mode (default)","slug":"sync-mode-default","depth":3,"children":[]},{"title":"Async mode","slug":"async-mode","depth":3,"children":[]}]},{"title":"Data Source Guides","slug":"data-source-guides","depth":2,"children":[]},{"title":"Rate Limits","slug":"rate-limits","depth":2,"children":[{"title":"Document creation requests","slug":"document-creation-requests","depth":3,"children":[]},{"title":"How to retry","slug":"how-to-retry","depth":3,"children":[]}]},{"title":"Error Codes","slug":"error-codes","depth":2,"children":[{"title":"Common 400 Causes","slug":"common-400-causes","depth":3,"children":[]},{"title":"Common 401 Causes","slug":"common-401-causes","depth":3,"children":[]},{"title":"Common 404 Causes","slug":"common-404-causes","depth":3,"children":[]},{"title":"Common 429 Causes","slug":"common-429-causes","depth":3,"children":[]}]},{"title":"Webhooks","slug":"webhooks","depth":2,"children":[]},{"title":"E-Signatures","slug":"e-signatures","depth":2,"children":[]},{"title":"Need Help?","slug":"need-help","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"docsautomator","siteName":"DocsAutomator","title":"Introduction - DocsAutomator","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-23T15:36:04.929Z","gitLastModified":"2026-11-23T15:35:51.000Z","originalFileLocation":"api-reference/introduction.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Everything you need to start using the DocsAutomator API\">\u003cmeta data-mint-head name=\"application-name\" content=\"DocsAutomator\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/docsautomator/rNkJLQINO18QuKfc/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/docsautomator/rNkJLQINO18QuKfc/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/docsautomator/rNkJLQINO18QuKfc/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/docsautomator/rNkJLQINO18QuKfc/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/docsautomator/rNkJLQINO18QuKfc/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/docsautomator/rNkJLQINO18QuKfc/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/docsautomator/rNkJLQINO18QuKfc/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/docsautomator/rNkJLQINO18QuKfc/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/docsautomator/rNkJLQINO18QuKfc/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Introduction - DocsAutomator\">\u003cmeta data-mint-head property=\"og:description\" content=\"Everything you need to start using the DocsAutomator API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"DocsAutomator Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docsautomator.co/docs/api-reference/introduction\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docsautomator.co/docs/images/og/docs-default.jpg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Introduction - DocsAutomator\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Everything you need to start using the DocsAutomator API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docsautomator.co/docs/images/og/docs-default.jpg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/docsautomator/rNkJLQINO18QuKfc/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"DocsAutomator\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003cmeta data-mint-head name=\"og:image:alt\" content=\"DocsAutomator documentation\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docsautomator.co/docs/api-reference/introduction\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/introduction.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docsautomator.co/#organization\",\"name\":\"DocsAutomator\",\"url\":\"https://docsautomator.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/docsautomator/aWJzng63hl4bgVX9/logo/light.svg?fit=max\u0026auto=format\u0026n=aWJzng63hl4bgVX9\u0026q=85\u0026s=a89d4e949fd24be7b244a51939eccb26\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docsautomator.co/docs#website\",\"name\":\"DocsAutomator\",\"url\":\"https://docsautomator.co/docs\",\"publisher\":{\"@id\":\"https://docsautomator.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docsautomator.co/docs/api-reference/introduction#webpage\",\"url\":\"https://docsautomator.co/docs/api-reference/introduction\",\"name\":\"Introduction\",\"description\":\"Everything you need to start using the DocsAutomator API\",\"dateModified\":\"2026-11-23T15:35:51.000Z\",\"isPartOf\":{\"@id\":\"https://docsautomator.co/docs#website\"},\"breadcrumb\":{\"@id\":\"https://docsautomator.co/docs/api-reference/introduction#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docsautomator.co/docs/api-reference/introduction#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"DocsAutomator\",\"item\":\"https://docsautomator.co/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction\",\"item\":\"https://docsautomator.co/docs/api-reference/introduction\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docsautomator.co/docs/api-reference/introduction#article\",\"headline\":\"Introduction\",\"name\":\"Introduction\",\"description\":\"Everything you need to start using the DocsAutomator API\",\"url\":\"https://docsautomator.co/docs/api-reference/introduction\",\"mainEntityOfPage\":{\"@id\":\"https://docsautomator.co/docs/api-reference/introduction#webpage\"},\"image\":\"https://docsautomator.co/docs/images/og/docs-default.jpg\",\"dateModified\":\"2026-11-23T15:35:51.000Z\",\"keywords\":\"API reference, authentication, rate limits, error codes, async mode\",\"publisher\":{\"@id\":\"https://docsautomator.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docsautomator.co/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"DocsAutomator\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"DocsAutomator\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/introduction.md","siteName":"DocsAutomator","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/api-reference/introduction"}]},{"group":"Documents","pages":[{"title":"Create Document via API","api":"POST https://api.docsautomator.co/createDocument","description":"Pass data directly via the API to generate documents","href":"/api-reference/documents/create-from-api"},{"title":"Create Document from Airtable","api":"POST https://api.docsautomator.co/createDocument","href":"/api-reference/documents/create-from-airtable"},{"title":"Create Document from Notion","api":"POST https://api.docsautomator.co/createDocument","href":"/api-reference/documents/create-from-notion"},{"title":"Create Document from Google Sheets","api":"POST https://api.docsautomator.co/createDocument","href":"/api-reference/documents/create-from-google-sheets"},{"title":"Create Document from SmartSuite","api":"POST https://api.docsautomator.co/createDocument","href":"/api-reference/documents/create-from-smartsuite"},{"title":"Create Document from ClickUp","api":"POST https://api.docsautomator.co/createDocument","href":"/api-reference/documents/create-from-clickup"},{"title":"Get job status","deprecated":null,"version":null,"openapi":"/openapi.json get /job/{jobId}","href":"/api-reference/documents/get-job-status"},{"title":"Get queue statistics","deprecated":null,"version":null,"openapi":"/openapi.json get /queue/stats","href":"/api-reference/documents/get-queue-statistics"}]},{"group":"Automations","pages":[{"title":"List automations","deprecated":null,"version":null,"openapi":"/openapi.json get /automations","href":"/api-reference/automations/list-automations"},{"title":"Get automation","deprecated":null,"version":null,"openapi":"/openapi.json get /automation","href":"/api-reference/automations/get-automation"},{"title":"Create automation","deprecated":null,"version":null,"openapi":"/openapi.json post /createAutomation","href":"/api-reference/automations/create-automation"},{"title":"Update automation","deprecated":null,"version":null,"openapi":"/openapi.json put /updateAutomation","href":"/api-reference/automations/update-automation"},{"title":"Delete automation","deprecated":null,"version":null,"openapi":"/openapi.json delete /deleteAutomation","href":"/api-reference/automations/delete-automation"},{"title":"Duplicate automation","deprecated":null,"version":null,"openapi":"/openapi.json post /duplicateAutomation","href":"/api-reference/automations/duplicate-automation"}]},{"group":"Templates","pages":[{"title":"List template placeholders","deprecated":null,"version":null,"openapi":"/openapi.json get /listPlaceholdersV2","href":"/api-reference/templates/list-template-placeholders"},{"title":"Duplicate template","deprecated":null,"version":null,"openapi":"/openapi.json post /duplicateGoogleDocTemplate","href":"/api-reference/templates/duplicate-template"}]},{"group":"E-Signatures","pages":[{"title":"List signing sessions","deprecated":null,"version":null,"openapi":"/openapi.json get /esign/sessions","href":"/api-reference/e-signatures/list-signing-sessions"},{"title":"Get session details","deprecated":null,"version":null,"openapi":"/openapi.json get /esign/sessions/{sessionId}","href":"/api-reference/e-signatures/get-session-details"},{"title":"Get signing links","deprecated":null,"version":null,"openapi":"/openapi.json get /esign/sessions/{sessionId}/links","href":"/api-reference/e-signatures/get-signing-links"},{"title":"Get audit trail","deprecated":null,"version":null,"openapi":"/openapi.json get /esign/sessions/{sessionId}/audit","href":"/api-reference/e-signatures/get-audit-trail"},{"title":"Cancel signing session","deprecated":null,"version":null,"openapi":"/openapi.json post /esign/sessions/{sessionId}/cancel","href":"/api-reference/e-signatures/cancel-signing-session"},{"title":"Resend signing invitation","deprecated":null,"version":null,"openapi":"/openapi.json post /esign/sessions/{sessionId}/resend/{signerIndex}","href":"/api-reference/e-signatures/resend-signing-invitation"}]},{"group":"Email","pages":[{"title":"Send test email","deprecated":null,"version":null,"openapi":"/openapi.json post /sendTestEmail","href":"/api-reference/email/send-test-email"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Introduction - DocsAutomator","deploymentId":"dpl_BsHU5ynwUyfZMwoLvGC66duJuw65","buildId":"dpl_BsHU5ynwUyfZMwoLvGC66duJuw65","dynamics":["10e4515597","07c022d89b","a74be98ba7"],"chunks":["BannerMarkdown-CkHZoIpP.js","dist-B9NA4YFQ.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","Frame-D-NM76uf.js","DynamicMarkdown-BYqxB8Iw.js","zoom-image-lightbox-DncAUV1J.js","lightbox-handle-r17bVUz3.js"]}