canonical: https://jentic.com/apis/formapi.io/docspring

# Formapi DocSpring API

DocSpring is a PDF generation and electronic signature service that lets developers fill out, sign, and merge PDF templates programmatically. The API exposes 40 endpoints covering template management, submissions, combined submissions for batch PDF generation, data requests for collecting signatures, and folder organisation. It supports HTML-to-PDF rendering, cached uploads, and versioned templates so teams can publish changes without breaking existing integrations.

## For AI agents

Generate filled PDFs from templates, collect e-signatures via data requests, and merge multiple submissions into combined documents. Authentication is HTTP Basic with an API token ID and secret.

## Scope

Does not handle PDF OCR, scanned-document extraction, or invoice parsing - use for template-based PDF generation and e-signature collection only.

## Capabilities

- Generate filled PDFs by submitting JSON data against a versioned template
- Combine multiple submissions into a single merged PDF via combined_submissions
- Collect signatures and structured input from end users through data_requests with tokenised links
- Add, move, and rename PDF templates organised in folders
- Publish or restore template versions to control which fields end users see
- Generate preview PDFs before committing a full submission

## Use cases

### Automated Contract Generation

Fill PDF contract templates with customer data from a CRM and return a signed, finalised document. DocSpring handles field mapping, conditional logic, and version control so the same template can be reused across hundreds of contracts. Submissions complete in seconds and the API returns a permanent download URL for the generated PDF.

Example prompt: POST /submissions with template_id and a data payload of customer name, address, and contract value, then poll the returned submission for state=processed and download the file_url

### E-Signature Collection

Send a data request link to a client, collect their input and signature, then receive the completed PDF back. DocSpring generates a tokenised URL per recipient, tracks events like opened and signed, and finalises the submission once all required fields are completed. Useful for onboarding flows that need legally formatted PDFs.

Example prompt: Create a data_request for template_id tpl_123 with the recipient email, fetch the resulting tokens, and email the signing URL to the client

### Batch PDF Reporting

Generate hundreds of personalised PDFs in one API call by submitting a batch. DocSpring processes submissions in parallel and exposes a single batch ID that resolves to the merged combined_submission. Common for monthly statements, invoices, and certificate runs where each output is structurally identical but data-specific.

Example prompt: POST `/submissions/batches` with an array of 200 submissions, each carrying a customer_id and statement payload, then download the batch zip when state=processed

### AI Agent Document Workflow

An AI agent fills a tax form template by reading values from a user's uploaded receipts, submits it through DocSpring via Jentic, and returns the finalised PDF link in chat. The agent never handles the API token directly, calls a single mcp tool, and gets a typed response that includes the download URL.

Example prompt: Search Jentic for 'generate a filled PDF', load the DocSpring create-submission schema, execute with template_id and the parsed receipt fields, and return the download URL

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/submissions` | Generate a filled PDF from a template |
| POST | `/submissions/batches` | Create a batch of submissions in one call |
| POST | `/combined_submissions` | Merge multiple submissions into one PDF |
| GET | `/templates/{template_id}/schema` | Retrieve the field schema for a template |
| POST | `/data_requests/{data_request_id}/tokens` | Generate a tokenised signing URL for a recipient |
| POST | `/templates/{template_id}/publish_version` | Publish a new version of a template |

## Key resources

- **Templates** — Create, copy, version, and inspect PDF templates and their field schemas
- **Submissions** — Generate filled PDFs from a template plus a data payload
- **Combined Submissions** — Merge multiple submissions into a single PDF
- **Data Requests** — Collect signatures and structured input via tokenised recipient links
- **Folders** — Organise templates into nested folders with rename and move operations

## Why Jentic

- **Setup:** Wiring the DocSpring API by hand means encoding your API Token ID and Secret into HTTP Basic auth and building your own retry and error handling around its submission and template endpoints. Through Jentic you install once, import DocSpring from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** DocSpring puts the template id in the URL path (`/templates/{template_id}/...`), so a rule can pin your agent to one template: it can read that template's schema and create submissions from it. You choose the operations it may call, so publishing a new template version is not included unless you add it.
- **Credential handling:** Your DocSpring API Token ID and Secret are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a filled PDF' or 'collect a signature', and Jentic returns the matching DocSpring operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **PDFMonkey** — PDFMonkey generates PDFs from Liquid HTML templates rather than fillable PDF forms
- **PDF.co** — PDF.co provides PDF generation, OCR, parsing, and conversion in a single API
- **Typeform** — Typeform collects structured form responses that can be piped into a DocSpring template

## FAQ

### What authentication does the DocSpring API use?

DocSpring uses HTTP Basic authentication with the API Token ID as the username and the API Token Secret as the password. Through Jentic, these credentials are stored encrypted in the vault and never enter the agent's context - the agent receives a scoped execution token instead.

### Can I generate filled PDFs from a template with the DocSpring API?

Yes. POST to /submissions with a template_id and a data object whose keys match the template's field schema. The endpoint returns a submission resource that resolves to a downloadable PDF once state=processed.

### What are the rate limits for the DocSpring API?

DocSpring does not publish hard rate limits in its OpenAPI spec; the documented production limit is around 50 requests per second per account, with higher quotas available on request. Batch submissions count as a single request regardless of the number of PDFs generated.

### How do I collect a signature with the DocSpring API through Jentic?

Use Jentic search query 'collect a signature on a PDF', load the DocSpring data_requests schema, and execute POST `/data_requests/{data_request_id}/tokens` to mint a tokenised URL for each signer. Email the URL to the recipient and poll the data_request for the signed event.

### Is the DocSpring API free?

DocSpring offers a free tier with a small monthly submission allowance and paid plans that scale by submissions per month. Pricing details and current limits are published at docspring.com/pricing.

### How do I generate multiple PDFs at once with the DocSpring API?

POST to `/submissions/batches` with an array of submissions. Each item includes its own template_id and data payload, and the batch resolves to a combined PDF or per-submission downloads. This is the recommended path for monthly statement and invoice runs.

### Can I limit what my agent is allowed to do with the DocSpring API?

Yes. Because you run Jentic One yourself, your own rules decide which DocSpring operations and credentials the agent may use. Since the template id sits in the URL path, such as `/templates/{template_id}/schema` and /submissions, you can pin the agent to a single template so it only reads that template's schema and creates submissions from it. Operations you leave out stay off limits, so publishing a new template version via `/templates/{template_id}/publish_version` is not available unless you explicitly allow it.
