> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Paperform plugin

> Read Paperform forms, fields and submissions, and manage a form's products, coupons and webhooks.

Use **Paperform** through Corsair: one client, typed API calls, local DB sync.

Create an access token under Account settings > Access tokens in Paperform; it is sent as a Bearer token. The API comes with Paperform's paid plans and its free trial. Two tiers matter: the Standard API covers reads, submissions, partial submissions, coupons and file links; `products.update`, `webhooks.create` and `webhooks.delete` need the Business API and answer 402 on other plans.
Forms are addressed by slug, custom slug or id (`form`). Submission answers (`data`) are keyed by field key; `fields.list` maps each key to its question title and type. `forms.list`, `spaces.list`, `translations.list`, `submissions.list`, `partialSubmissions.list` and `webhooks.list` return 20 rows by default; page them with `limit` (up to 100) and `skip`, or filter with `afterDate`, `beforeDate`, `afterId` and `beforeId`. `fields.list`, `products.list`, `coupons.list` and `spaces.forms` return everything in one response.
Only form, space, translation and submission metadata is stored locally. Submission answers, device details and IP addresses are returned to the caller but not stored, and are kept out of events.
Paperform sends space ids as numbers and product prices as strings; the plugin returns ids as strings and prices as sent.

**What you get:**

* 24 typed API operations
* 4 synced entities (`forms`, `spaces`, `submissions`, `translations`) for fast `.search()` / `.list()`

## Setup

**1. Install**

```bash npm theme={null}
npm install corsair @corsair-dev/paperform better-sqlite3
npm install --save-dev @types/better-sqlite3
```

```bash yarn theme={null}
yarn add corsair @corsair-dev/paperform better-sqlite3
yarn add --dev @types/better-sqlite3
```

```bash pnpm theme={null}
pnpm install corsair @corsair-dev/paperform better-sqlite3
pnpm install --save-dev @types/better-sqlite3
```

```bash bun theme={null}
bun add corsair @corsair-dev/paperform better-sqlite3
bun add --dev @types/better-sqlite3
```

**2. Add the plugin**

```ts corsair.ts theme={null}
import Database from 'better-sqlite3';
import { createCorsair } from 'corsair';
import { paperform } from '@corsair-dev/paperform';

export const corsair = createCorsair({
	plugins: [
		paperform(),
	],
	database: new Database('corsair.db'),
	kek: process.env.CORSAIR_KEK!,
	multiTenancy: true,
	hub: {
		projectApiKey: process.env.CORSAIR_API_KEY!,
		signingSecret: process.env.CORSAIR_SIGNING_SECRET!,
	},
});
```

With `multiTenancy: true`, scope calls with `corsair.withTenant(id)`. See [Quick start](https://docs.corsair.dev/quick-start.md) for KEK + Hub keys, and [Multi-tenancy](https://docs.corsair.dev/concepts/multi-tenancy.md) for account isolation.

**3. Choose authentication**

> [tab] API Key (Recommended)
>
> Store the Paperform API key before the first call: `pnpm corsair setup --plugin=paperform --tenant=acme api_key=<your-key>` (leave out `--tenant` without `multiTenancy`), or pass it as `key` in the plugin options. With Hub, each tenant enters their own key on the connect page. See [API key auth](https://docs.corsair.dev/concepts/api-key).
>
> ```ts theme={null}
> paperform()
> ```
>
> More: [API Key](https://docs.corsair.dev/concepts/api-key)

**4. Connect a tenant**

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see [Connect / OAuth](https://docs.corsair.dev/management/connect).

```ts theme={null}
const { connectUrl } = await corsair.manage.connect.createLink({
	plugin: 'paperform',
	tenantId: 'acme',
});
// redirect the user's browser to connectUrl
```

## Example API calls

**List this week's submissions**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.paperform.api.submissions.list({ form: 'eqadkzns', afterDate: '2026-11-10', limit: 50 });
```

**Create a 10% coupon**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.paperform.api.coupons.create({
	form: 'eqadkzns',
	code: 'WELCOME10',
	enabled: true,
	discountPercentage: 10,
});
```

See the full list on the [API](https://docs.corsair.dev/plugins/paperform/api.md) page.

## Query synced data

Synced entities support `tenant.paperform.db.<entity>.search()` and `.list()`: `forms`, `spaces`, `submissions`, `translations`.

See [Database](https://docs.corsair.dev/plugins/paperform/database.md) for filters and operators.

## What's next

> [card] [API reference](https://docs.corsair.dev/plugins/paperform/api.md)
>
> Every `paperform.api.*` operation with input and output types.

> [card] [Database](https://docs.corsair.dev/plugins/paperform/database.md)
>
> Synced entities, search filters, and operators.

> [card] [Connect / OAuth](https://docs.corsair.dev/management/connect)
>
> createLink, Hub delivery, and tenant connect flows.

> [card] [Use with agents](https://docs.corsair.dev/mcp-adapters/mcp-adapters)
>
> Expose this plugin's operations as MCP tools.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.