Help CenterHow to use the Papermark REST API?

How to use the Papermark REST API?

The Papermark REST API gives you programmatic access to every Papermark resource: data rooms, documents, folders, links, visitors, and analytics. The whole surface is HTTPS plus JSON plus a bearer token, with 43 operations across six resources and an OpenAPI spec that drives the docs.

The Papermark REST API is available on the Business plan and above. Self-hosted Papermark instances can use the API on any plan.

What you can do with the API

ResourceOperations include
Data roomsCreate, list, update, delete, manage folders
DocumentsUpload, list, search, fetch, attach to data rooms
FoldersCreate, rename, move, delete
LinksMint password-gated or expiring links for documents and data rooms
VisitorsList, fetch view history per visitor
AnalyticsPage-by-page durations, completion, downloads, top pages

Across the six resources you have 43 operations total. The full OpenAPI spec lives at /docs/openapi.json and powers the docs site.

Step 1: Generate an API token

  1. Log into Papermark.
  2. Go to Settings, then API Tokens.
  3. Click Create token.
  4. Pick scopes (read-only or read/write per resource).
  5. Copy the token. It starts with pm_live_ and acts as a long-lived bearer credential.

Treat the token like a password. Store it in your secrets manager or environment variable (PAPERMARK_TOKEN).

Scoped tokens

Tokens are scoped, so an LLM agent can have read-only access to documents while your CI job has full write access. Pick the minimum scopes your integration needs.

Step 2: Make your first call

export PAPERMARK_TOKEN=pm_live_AbCdEfGhIjKlMnOpQrStUvWxYz

curl https://api.papermark.com/v1/documents \
-H "Authorization: Bearer $PAPERMARK_TOKEN"

You'll get a JSON response with your documents:

{
"data": [
{ "id": "doc_pitch_v4", "name": "Pitch Deck.pdf" }
],
"next_cursor": null
}

Common workflows

curl -X POST https://api.papermark.com/v1/links \
-H "Authorization: Bearer $PAPERMARK_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dataroom_id": "dr_8K2m",
"password": "series-b-2026",
"expires_at": "2026-06-10T00:00:00Z",
"email_gate": true,
"allow_download": false
}'

The response includes the unique link URL ready to share.

Pull page-by-page analytics for one view

curl https://api.papermark.com/v1/view-analytics/vw_3m9k \
-H "Authorization: Bearer $PAPERMARK_TOKEN"

Returns a payload with pages_viewed, completed, duration_ms, top_page, and an array of page_durations_ms.

Upload a document (large files)

For files over 10 MB, use the S3 presigned upload flow:

  1. Request an upload URL: POST /v1/documents/upload-url
  2. Upload the file directly to S3 with the returned presigned URL
  3. Confirm the upload: POST /v1/documents/confirm

No streaming gymnastics required in your code.

Authentication and rate limits

  • Bearer token authentication: Authorization: Bearer pm_live_... header on every request
  • HTTPS only: requests over HTTP are rejected
  • Idempotency keys: pass Idempotency-Key: <uuid> for safe retries on POST requests
  • Pagination: list endpoints use cursor pagination with next_cursor for paging through results
  • Rate limits: standard limits apply per plan; contact support if your integration needs higher limits

OpenAPI spec and SDKs

The full spec is available at /docs/openapi.json. You can generate clients in any language with tools like openapi-typescript, openapi-python-client, or openapi-generator.

openapi-typescript https://api.papermark.com/docs/openapi.json -o papermark.d.ts

For Node.js, an SDK is published on npm:

npm install papermark
import { Papermark } from "papermark";

const pm = new Papermark({ apiKey: process.env.PAPERMARK_TOKEN });
const { data } = await pm.documents.list();

Webhooks for real-time events

The API gives you pull access. To get push events (link viewed, document uploaded, link created), use webhooks. They pair well with the API for event-driven integrations.

Use cases

  • CRM sync: when a new viewer opens a link, push a record into HubSpot or Salesforce.
  • Investor outreach: programmatically mint personalized links per investor and email them.
  • Reporting dashboards: pull visitor and analytics data into your data warehouse or BI tool.
  • Automated data room provisioning: spin up a data room with a folder structure from a CI job.
  • AI agents: combine the API with the MCP server so agents like Claude can act on Papermark resources.

Frequently asked questions

Need help? Contact support@papermark.com or use the in-app chat.

More helpful articles