PapermarkDocs

Getting started

Log in and run your first CLI commands.

Five minutes from npm install to your first share link.

1. Log in

$ papermark login
Open https://app.papermark.com/oauth/device in your browser.
Enter code: WDJB-MJHT

Approve in the browser. The CLI polls for the token and stores it on disk at 0600.

If you already have a pm_live_… token from Settings → API Tokens:

papermark login --token pm_live_…

The CLI validates the token with one API call before storing it, so you'll get an error here (not later) if it's wrong.

Either way, confirm:

$ papermark whoami
Token:    pm_live_AbCdEfG…wXyZ
API URL:  https://api.papermark.com
Source:   config file
Path:     /Users/you/.config/papermark/config.json

2. List your documents

$ papermark documents list
ID                  NAME                       UPDATED
doc_aBc123          Pitch Deck Q4.pdf          2 hours ago
doc_xYz789          Series A Memo.pdf          yesterday

Add --json for machine-readable output:

$ papermark documents list --json | jq '.data[].name'
"Pitch Deck Q4.pdf"
"Series A Memo.pdf"

(--json auto-enables when piped, so the explicit flag is optional in this example.)

$ papermark documents upload ./investor-update.pdf --link
Uploaded:  doc_KlmN456 (investor-update.pdf)
Link:      https://papermark.com/view/abcd1234efgh

--link creates a default share link in the same call. For more control, do them in two steps:

papermark documents upload ./investor-update.pdf
papermark links create \
  --document doc_KlmN456 \
  --password "open-sesame" \
  --expires 2026-12-31T00:00:00Z

4. See who looked at it

papermark views list --link link_abcd1234

Returns view events: who, when, how long, which page.

Sharing a dataroom (multiple documents at once)

If you want to share a set of documents under one access boundary — a fundraising dataroom, an M&A diligence room, a customer onboarding packet — work at the dataroom level:

# Create the dataroom
DR_ID=$(papermark datarooms create \
  --name "Acme — Series B" \
  --description "Q2 2026 raise" \
  --json | jq -r '.data.id')

# Upload documents and attach each one
for f in ~/acme/*.pdf; do
  DOC_ID=$(papermark documents upload "$f" --json | jq -r '.data.id')
  curl -sX POST "https://api.papermark.com/v1/datarooms/$DR_ID/documents" \
    -H "Authorization: Bearer $PAPERMARK_TOKEN" \
    -H "Content-Type: application/json" \
    -d "{\"documentId\":\"$DOC_ID\"}"
done

# Mint one link covering everything
papermark links create --dataroom "$DR_ID" \
  --password "S3ries-B" --email-protected

Each recipient gets one URL with one password and sees every document. Per-recipient links pointing at the same dataroom let you track who viewed what:

papermark links create --dataroom "$DR_ID" --name "Acme Lead"
papermark links create --dataroom "$DR_ID" --name "Acme Partner"

# See aggregate stats for the room
papermark datarooms stats "$DR_ID"

# Or zoom into one viewer's footprint
papermark datarooms viewers "$DR_ID" --email lead@acme.com

See Datarooms for the full surface and Create a dataroom with documents for the worked recipe.

Where to go next

On this page