MainSDK
Search⌘K
Integrations

Documenso

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

1 interface1 driverWritten guide
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 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.

Interfaces it serves

Pick Documenso in main.yaml for any of these. Your calls stay the same, and you can swap later.

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

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.

Use it

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

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.

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 before they are signed.
  • The same render and signing calls on every driver, once signing is built.

See PDF documents.

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(), not through your own links.

Swap to or from it

main.yaml
pdf:
  driver: documenso   # was builtin

FAQ

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

Next

Open questions

Was this page helpful?

↑↓ moveEnter openEsc close

Not decided yet