canonical: https://jentic.com/apis/docupilot.app/docupilot

# Docupilot App Docupilot API

The Docupilot API automates document generation from reusable templates. Authenticated with a Bearer token, it exposes operations to fetch the current user, list available templates, and generate a populated document from a template by ID. Agents pass merge data in the generate request and receive a download URL or rendered document in response. Typical use cases include contract generation, invoice creation, certificate issuance, and any workflow that turns structured data into formatted PDFs or DOCX files without managing a templating engine internally.

## For AI agents

Authenticate with a Bearer token, list Docupilot templates, and generate a populated document from a template ID using merge data supplied by the agent.

## Scope

Does not handle electronic signatures, document storage outside generation output, or content extraction - use for template-based document generation only.

## Capabilities

- Identify the authenticated user via GET /accounts/v2/users/me
- List available document templates with GET /api/v1/templates
- Generate a populated document from a template via POST /api/v1/templates/{template_id}/generate
- Pass arbitrary merge data into the generate request body
- Authenticate every call with a Bearer token in the Authorization header

## Use cases

### Contract and Offer Letter Generation

Generate signed-ready contracts and offer letters by posting merge data to /api/v1/templates/{template_id}/generate. The template stores the layout while the API call supplies dynamic fields like names, dates, and amounts. The flow takes minutes to integrate once a template is published in Docupilot.

Example prompt: POST /api/v1/templates/{template_id}/generate with merge fields for candidate_name, role, and start_date, then return the generated document URL to the user.

### Invoice and Receipt Automation

Render itemised invoices or receipts from structured order data by selecting an invoice template via GET /api/v1/templates and calling the generate endpoint with line items and totals. This removes the need for a custom PDF engine in application code and keeps document layout in the hands of non-developers.

Example prompt: GET /api/v1/templates to find the 'Invoice' template, then POST /api/v1/templates/{template_id}/generate with the order's line items and totals.

### Template Discovery and Audit

Use GET /api/v1/templates to enumerate every template the authenticated user can access, and GET /accounts/v2/users/me to confirm scope. This supports audit jobs and admin tools that need to keep a registry of which templates exist and who can generate from them.

Example prompt: GET /accounts/v2/users/me to identify the actor, then GET /api/v1/templates and write each template id and name to an internal registry.

### AI Agent Document Workflows via Jentic

An AI agent uses Jentic to search for document-generation intents, load the Docupilot generate operation, and produce documents on behalf of users. The Bearer token stays in your Jentic One instance, so the agent never holds the credential while populating templates from CRM or ticket data.

Example prompt: Search Jentic for 'generate a document from a template', resolve the template id by listing templates, and execute the generate operation with merge data from a CRM record.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /accounts/v2/users/me | Get the current authenticated user |
| GET | /api/v1/templates | List available templates |
| POST | /api/v1/templates/{template_id}/generate | Generate a document from a template |

## Key resources

- **Templates** — List available templates and generate populated documents
- **Users** — Retrieve the authenticated user's account details

## Why Jentic

- **Setup:** Wiring the Docupilot API by hand means carrying its bearer token on the Authorization header and matching the right template_id before a document renders. Through Jentic you install once, import the Docupilot API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Docupilot puts the template id in the URL path (/api/v1/templates/{template_id}/generate), so a rule can pin your agent to one template for generation. You choose the operations it may call, so it can list templates and generate from the templates you allow and nothing more.
- **Credential handling:** Your Docupilot bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time on the Authorization header. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a document from a template', and Jentic returns the Docupilot generate operation with its input schema, including the template_id path parameter and merge-data body, so the agent calls the right endpoint without reading the docs.

## Related APIs

- **PandaDoc** — Document automation with templates, e-signature, and analytics
- **Adobe Experience Manager** — Adobe content and asset management services
- **Stripe** — Payment processing for invoices and quotes

## FAQ

### What authentication does the Docupilot API use?

Bearer token authentication. Pass your Docupilot API token in the Authorization header. Through Jentic, the token is stored encrypted in the vault and the Authorization header is constructed at execution time so the agent never sees the raw token.

### Can I generate a document from a template with the Docupilot API?

Yes. POST /api/v1/templates/{template_id}/generate accepts a JSON body of merge fields and returns a generated document. List templates first via GET /api/v1/templates to find the ID you want.

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

The spec does not declare explicit rate limits. Practical throughput depends on your Docupilot plan; apply retries with exponential backoff on 429 responses and batch generation jobs across multiple workers if needed.

### How do I generate a contract through the Docupilot API via Jentic?

Run pip install jentic and search for 'generate a document from a template'. Jentic returns POST /api/v1/templates/{template_id}/generate. Execute it with the contract template id and merge fields; Jentic injects the Bearer token from the vault automatically.

### Can I list available templates?

Yes. GET /api/v1/templates returns the templates accessible to the authenticated user, including their template IDs you pass to the generate endpoint.

### Does the Docupilot API expose the current user?

Yes. GET /accounts/v2/users/me returns the authenticated user's profile, useful for verifying which account a token is bound to before generating documents.

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

Yes. Because you run Jentic One yourself, your own rules decide which Docupilot operations and credentials the agent may use. You can allow it to list templates with GET /api/v1/templates and generate documents with POST /api/v1/templates/{template_id}/generate while blocking everything else, and since the template id sits in the URL path you can pin the agent to a single template so it only generates from the documents you approve. Your Docupilot bearer token stays in your self-hosted instance and is added at request time, so the agent never holds it.
