---
title: "Documenso"
description: "Use Documenso for MainSDK document signing - open-source e-signatures, self-hosted or cloud, main.yaml, testing and swapping."
section: "integrations"
canonical: "https://mainsdk.dev/docs/integrations/documenso"
updated: "2026-10-28"
---

# Documenso

> Use Documenso for MainSDK document signing - open-source e-signatures, self-hosted or cloud, main.yaml, testing and swapping.

Canonical: https://mainsdk.dev/docs/integrations/documenso · Updated: 2026-10-28

Documenso is an open-source document signing platform you can host yourself or use as a hosted service. The `documenso` driver behind [`pdf`](https://mainsdk.dev/docs/interfaces/pdf) is planned to handle signing, so contracts and consent forms your app renders can be signed. Pick it when you need e-signatures and want the option to self-host.

> **Note:** Signing is planned for phase 3 (spec `documents`) and has no code. The `documenso` driver and the options on this page are provisional and may change when it is built.

## Interfaces it serves

### PDF documents (`pdf`)

- Status: Preview · ships as a beta API
- Driver: `documenso` (Documenso, planned driver). signing only; phase 3
- Docs: https://mainsdk.dev/docs/interfaces/pdf.md

```yaml
pdf:
  driver: documenso
```

Swap to another provider: `builtin`, `docraptor`, `gotenberg`.

## Before you start

1. Run Documenso yourself or create a hosted account.
2. Create an API token for your app and store it in your secrets manager.

## Configure

```yaml title="main.yaml"
pdf:
  driver: documenso
```

How the driver takes its token and instance address, and whether `pdf.render` still uses the built-in renderer with this driver, are not defined yet [TBD].

## Use it

Rendering a contract works today with the built-in renderer:

```ts title="app/contracts/actions.ts"
"use server";
import { auth, pdf } from "mainsdk";

export async function renderContract(req: Request, contractId: string) {
  const session = await auth.require(req);
  return pdf.render("contract", { contractId, locale: session.user.locale });
}
```

The signing call, what it takes and what it returns, is not defined yet [TBD].

## Local development and testing

`createTestApp()` from `@mainsdk/testing` runs `pdf` on its in-memory fake. A self-hosted Documenso on your machine lets you try real signing. `chaos.on("pdf", { outage: true })` simulates the service being down.

## What MainSDK adds on top

- Documents localised through [`i18n`](https://mainsdk.dev/docs/interfaces/i18n) before they are signed.
- The same render and signing calls on every driver, once signing is built.

See [PDF documents](https://mainsdk.dev/docs/interfaces/pdf).

## Limits and notes

- `pdf` is owned by spec `documents`; the Documenso driver is listed in the catalog and requirements.
- Signed documents and signer details live in Documenso. Self-host in your MainSDK data region (US, EU or India) if residency matters.
- Share signed copies through getqr.id with [`share()`](https://mainsdk.dev/docs/interfaces/share), not through your own links.

## Swap to or from it

```yaml title="main.yaml"
pdf:
  driver: documenso   # was builtin
```

> **Warning:** Signing is stateful: envelopes in progress and signed documents live in Documenso. Finish or export them before you switch drivers.

## FAQ

**Can I self-host Documenso?** Yes, it is open source. Point the driver at your instance once its keys are defined.

## Next

- [PDF documents](https://mainsdk.dev/docs/interfaces/pdf)
- [DocRaptor](https://mainsdk.dev/docs/integrations/docraptor) and [getqr.id](https://mainsdk.dev/docs/integrations/getqr-id)
