PapermarkDocs

Create a dataroom with documents

Spin up a dataroom for a customer and populate it with files.

A dataroom groups documents under one access boundary — useful for fundraising, M&A, or any "share these N files together" workflow.

The script: create the dataroom, upload N documents into it, mint a single dataroom-level link with the right access controls.

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

# 2. Upload each document and attach it. There's no
#    `papermark datarooms add-document` yet — use the API for the
#    attach step.
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

# 3. Create a dataroom-level link
papermark links create \
  --dataroom "$DR_ID" \
  --name "Acme partners" \
  --password "S3ries-B-Acme" \
  --email-protected \
  --expires 2026-07-31T23:59:59Z

# 4. Optionally turn on bulk download or AI agents on the dataroom
papermark datarooms update "$DR_ID" \
  --bulk-download on \
  --conversations on

The dataroom URL gives the recipient access to every document inside it. Adding more documents later (steps 2 again) makes them visible through the existing link — no need to re-share.

Audit and analytics:

papermark datarooms documents "$DR_ID"     # what's in it
papermark datarooms links "$DR_ID"         # all share links
papermark datarooms viewers "$DR_ID"       # everyone who's been
papermark datarooms stats "$DR_ID"         # aggregate engagement
TOKEN=pm_live_…

# 1. Create the dataroom
DR_ID=$(curl -sX POST https://api.papermark.com/v1/datarooms \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme — Series B","description":"Q2 2026 raise"}' \
  | jq -r '.data.id')

# 2. Upload each document, then attach to the dataroom
for f in ~/acme/*.pdf; do
  # Upload (3-step S3 dance, see the password-link guide for detail)
  DOC_ID=$(./upload-helper.sh "$f")

  # Attach
  curl -sX POST "https://api.papermark.com/v1/datarooms/$DR_ID/documents" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d "{\"documentId\":\"$DOC_ID\"}"
done

# 3. Create the dataroom link
curl -X POST https://api.papermark.com/v1/links \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{
    \"dataroomId\": \"$DR_ID\",
    \"name\": \"Acme partners\",
    \"password\": \"S3ries-B-Acme\",
    \"emailProtected\": true,
    \"expiresAt\": \"2026-07-31T23:59:59Z\"
  }"

Required scopes: datarooms.write, documents.write, links.write.

Create a Papermark dataroom called "Acme — Series B" with the description "Q2 2026 raise". Then upload every PDF in ~/acme/ into it, and give me one password-protected, email-gated share link that expires July 31 2026.

The agent chains create_dataroomupload_document (per file, stdio only) → create_link. From a browser-hosted client, attach the files in the chat first and ask the agent to add them.

What the recipient sees

The dataroom URL takes them to an index of every document. Each document opens inline. Downloads, watermarks, and per-page permissions follow whatever you set on the link.

Adding members later

For per-recipient access (different password / expiry per partner), mint a link per recipient pointing at the same dataroom:

papermark links create --dataroom "$DR_ID" \
  --name "Acme — Lead" \
  --password "lead-only-pw" \
  --email-protected

Each link is tracked independently in analytics — you can see which partner viewed which document via papermark views list --link <id>.

Revoking the whole dataroom

curl -X DELETE "https://api.papermark.com/v1/datarooms/$DR_ID" \
  -H "Authorization: Bearer $PAPERMARK_TOKEN"

Cascades — all links pointing at the dataroom go cold immediately. The underlying documents stay (they live above the dataroom).

On this page