---
title: "Document Automation API & SDK: 6 SDKs"
description: "REST API for document generation and e-signatures. 6 SDKs (JS, Python, Go, PHP, Java, Ruby), sub-100ms response, 99.9% uptime. Free tier included."
url: "https://www.turbodocx.com/products/api-and-sdk"
---

# Document Automation API & SDK

> TurboDocx's document automation API generates a filled DOCX or PDF from a template in 1 call, using 6 published SDKs (JavaScript/TypeScript, Python, Go, PHP, Java, Ruby) that all wrap the same REST API. The same API key also sends the generated document for e-signature, so a platform can create and sign a contract without a second integration.

Platform stats: 3,000+ documents generated, 6 published SDKs.

## Key Takeaways

- **1 call** generates a document: `Deliverable.generateDeliverable()` takes a templateId and variables, and returns a filled DOCX.
- **6 published** SDKs (JavaScript/TypeScript, Python, Go, PHP, Java, Ruby) are built on the same REST API.
- **$0** Free plan includes 5 documents and 5 signatures a month; paid plans start at $10/mo.
- **180,000+** downloads a month for the related open-source @turbodocx/html-to-docx package, free and independent of the paid API.

## Features

- **REST API**: Generate documents, send signatures, and manage templates over simple HTTP endpoints.
- **Webhooks**: Real-time notifications for signature events: sent, viewed, signed, completed, voided.
- **Enterprise Security**: API keys, role-based access control, and audit logs for compliance.
- **Structured Variables**: Fill templates with plain text or, for advanced templates, structured JSON for loops and conditionals.
- **6 Published SDKs**: JavaScript/TypeScript, Python, Go, PHP, Java, and Ruby, all versioned together at 0.7.0.
- **One Key, Two Modules**: Deliverable generates documents; TurboSign sends them for signature. Same API key, same SDK install.

## Install in one prompt (AI Agent install)

Skip the boilerplate. Drop the TurboDocx SDK and `@turbodocx/html-to-docx` into any project with the open-source Agent Skill. It detects your language and framework, installs the package, configures env vars, and writes working integration code that matches your existing patterns. Works with Claude Code, GitHub Copilot, Cursor, OpenCode, Codex CLI, and Gemini CLI.

```bash
# both skills
npx skills add TurboDocx/quickstart
# in your editor
/turbodocx-sdk
```

[Read the docs](https://docs.turbodocx.com/docs/SDKs/agent-skills) or [view on GitHub](https://github.com/TurboDocx/quickstart). See also the [Quickstart page](https://www.turbodocx.com/quickstart.md).

## Generate a Document From a Template

The Deliverable module, straight from the official SDK examples (production ready). Examples are shown for TypeScript and Python.

### TypeScript SDK

```typescript
// npm install @turbodocx/sdk
import { Deliverable } from '@turbodocx/sdk';

Deliverable.configure({
  apiKey: process.env.TURBODOCX_API_KEY,
  orgId: process.env.TURBODOCX_ORG_ID,
});

const created = await Deliverable.generateDeliverable({
  templateId: 'YOUR_TEMPLATE_ID',
  name: 'Employee Contract - John Smith',
  variables: [
    { placeholder: '{EmployeeName}', text: 'John Smith', mimeType: 'text' },
    { placeholder: '{JobTitle}', text: 'Senior Software Engineer', mimeType: 'text' },
  ],
});

const pdf = await Deliverable.downloadPDF(created.results.deliverable.id);
```

### Python SDK

```python
# pip install turbodocx-sdk
import asyncio, os
from turbodocx_sdk import Deliverable

async def generate():
    Deliverable.configure(
        api_key=os.getenv("TURBODOCX_API_KEY"),
        org_id=os.getenv("TURBODOCX_ORG_ID"),
    )

    created = await Deliverable.generate_deliverable(
        template_id="YOUR_TEMPLATE_ID",
        name="Employee Contract - John Smith",
        variables=[
            {"placeholder": "{EmployeeName}", "text": "John Smith", "mimeType": "text"},
        ],
    )

    pdf = await Deliverable.download_pdf(created["results"]["deliverable"]["id"])

asyncio.run(generate())
```

Need e-signatures on that document? Same API key, same SDK: send it with the TurboSign module. Full endpoints, pricing, and code samples are on the [E-Signature API](https://www.turbodocx.com/e-signature-api.md) page.

Need Go, PHP, or Java? [Browse all SDKs](https://docs.turbodocx.com/docs/SDKs). Full documentation: [docs.turbodocx.com](https://docs.turbodocx.com).

## Core Endpoints

6 REST endpoints cover document generation end to end, plus the hand-off to signing. Base URL: `https://api.turbodocx.com`

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/deliverable` | Generate a document from a template |
| GET | `/v1/deliverable` | List generated documents |
| GET | `/v1/deliverable/:id` | Get document details and variables |
| GET | `/v1/deliverable/file/pdf/:id` | Download the generated PDF |
| PATCH | `/v1/deliverable/:id` | Update document metadata or tags |
| POST | `/turbosign/single/prepare-for-signing` | Send the generated document for signature |

## 6 Published SDKs

Every SDK wraps the same REST API and ships at version 0.7.0, with a Deliverable module for documents and a TurboSign module for signatures.

| Language | Install |
| --- | --- |
| JavaScript / TypeScript | `npm install @turbodocx/sdk` |
| Python | `pip install turbodocx-sdk` |
| PHP | `composer require turbodocx/sdk` |
| Go | `go get github.com/TurboDocx/SDK/packages/go-sdk` |
| Java | `implementation 'com.turbodocx:turbodocx-sdk:0.7.0'` |
| Ruby | `gem install turbodocx-sdk` |

[Full SDK reference](https://docs.turbodocx.com/docs/SDKs)

## For Developers: Build Document Features Fast

Add document generation and e-signatures to your SaaS with 1 API key and 1 SDK install.

- Generate invoices, contracts, reports on-demand
- Send the generated document for signature
- Structured JSON variables for loops and conditionals
- Webhooks instead of polling for status

Chat with developers on [Discord](https://discord.gg/NYKwz4BcpX).

## For Enterprises: Need a Tailored Integration?

Most teams self-serve with the API above. If your Salesforce, SharePoint, or legacy ERP setup needs a custom document workflow built and maintained for you, our team delivers that as a tailored integration, at software pricing.

- High-availability infrastructure
- Priority support & custom SLA options
- Enterprise security & audit logs
- Custom API rate limits

[Book a demo](https://www.turbodocx.com/demo?product=turbosign)

## API Pricing

| Plan | Price | Detail |
| --- | --- | --- |
| Free | $0 | 5/mo documents, 1,000 AI credits |
| Team | $10/user/mo | 10/mo documents |
| Pro | $20/user/mo | Unlimited documents & signatures in-app |
| Enterprise | Contact us | Custom API rate limits |

Full details: [pricing](https://www.turbodocx.com/pricing.md).

## Workflow Automation: Automate with n8n

Connect TurboDocx to 400+ apps with the official n8n nodes. Automate document generation and signature workflows without writing code.

- Generate documents from templates automatically
- Send documents for signature and track status
- Trigger actions on signature completion
- Works with Salesforce, Slack, Google Drive & more
- Open source & community driven, available on the npm registry, works with self-hosted & cloud n8n

```bash
# Install in your n8n instance
npm install @turbodocx/n8n-nodes-turbodocx
```

[View on npm](https://www.npmjs.com/package/@turbodocx/n8n-nodes-turbodocx)

## Frequently Asked Questions

### Is there a free tier for the TurboDocx document automation API?

$0 to start: the Free plan includes 5 document generations and 5 e-signatures a month, plus 1,000 AI credits, no credit card required. The $10/user/month Team plan raises that to 10 documents and 15 signatures a month. The $20/user/month Pro plan gives named users unlimited document generation, signatures, and AI credits in the app.

### Which SDKs does the TurboDocx API support?

6 published SDKs cover JavaScript/TypeScript, Python, Go, PHP, and Java, all built on the same REST API and versioned together at 0.7.0. Each ships a Deliverable module for document generation and a TurboSign module for e-signatures, so one install covers both. Install with npm, pip, composer, Go modules, or Maven Central.

### Can the API generate DOCX and PDF documents from templates?

1 API call generates a document: Deliverable.generateDeliverable() takes a templateId and a list of variables, such as a placeholder like {EmployeeName}, and returns a filled DOCX. A second call, Deliverable.downloadPDF(), converts it to PDF. Variables accept plain text or, for advanced templates, structured JSON for loops, conditionals, and nested data.

### Does the document automation API include e-signatures, or is that separate?

1 platform, 2 capabilities: the same API key and SDK generate documents with the Deliverable module and send them for signature with the TurboSign module, so a contract can be created, sent, and signed without switching tools or credentials. For endpoints, pricing, and code samples focused only on signing, see /e-signature-api.

### Is TurboDocx open source?

180,000+ downloads a month on npm: @turbodocx/html-to-docx is a free, MIT-licensed package that converts HTML to Word documents in Node.js, independent of the paid API and usable without a TurboDocx account. It runs standalone in any Node.js project or alongside the TurboDocx SDK, and its source is public on GitHub.

## Related Resources

- [E-Signature API](https://www.turbodocx.com/e-signature-api.md): Endpoints, pricing, and quickstarts focused only on the signing API.
- [Developer Hub](https://www.turbodocx.com/developers.md): All TurboDocx SDKs, quickstarts, and the AI agent install skill in one place.
- [Full SDK Reference](https://docs.turbodocx.com/docs/SDKs): API reference and guides for all SDK languages on docs.turbodocx.com.

Get API access in minutes. Start with the free tier, scale as you grow. 5 min setup, no credit card required. Need a tailored integration into Salesforce, SharePoint, or a legacy system instead? [Book a demo](https://www.turbodocx.com/demo?product=turbosign).

[Get an API key](https://app.turbodocx.com/signup)
