documents
List, get, search, upload, create link/notion, and delete documents.
Aliases: papermark doc. Examples below use the long form for clarity.
list
papermark documents list [--limit <n>] [--cursor <id>]Lists documents in your team, paginated.
| Flag | Default | Effect |
|---|---|---|
-l, --limit <n> | 25 | Page size, 1–100 |
-c, --cursor <id> | none | Continuation cursor from a previous response's meta.next_cursor |
--json | auto when piped | Machine-readable output |
$ papermark documents list --limit 5
ID NAME UPDATED
doc_aBc123 Pitch Deck Q4.pdf 2 hours ago
doc_xYz789 Series A Memo.pdf yesterday
…To page through everything:
papermark documents list --json | jq '.data[].id'
papermark documents list --json --cursor "$(… | jq -r '.meta.next_cursor')"get
papermark documents get <id>Fetches one document by ID. Returns not_found (exit 1) if the ID
doesn't belong to your team.
For link and notion documents the response includes a url field with the
external target the document points at; for file-based documents url is null.
search
papermark documents search <query> [--limit <n>]Substring match on document name. Returns up to --limit results
(default 25, max 100).
$ papermark documents search "pitch"
ID NAME UPDATED
doc_aBc123 Pitch Deck Q4.pdf 2 hours agoupload
papermark documents upload <file> [--name <name>] [--folder <path>] [--link]Uploads a local file. The CLI does the three-step S3 dance for you (presigned URL, PUT, register).
| Flag | Default | Effect |
|---|---|---|
-n, --name <name> | filename | Display name in the dashboard |
--folder <path> | root | Place in a dataroom folder, e.g. Q4/Investors |
--link | off | Also create a default share link, return both IDs |
$ papermark documents upload ./pitch.pdf --link
Uploaded: doc_KlmN456 (pitch.pdf)
Link: https://papermark.com/view/abcd1234efgh--link creates the simplest possible link (no password, no expiry,
unrestricted download). For anything more specific, do the upload
and the link create in two steps.
create-link
papermark documents create-link <url> --name <name> [--folder-id <id>] [--link]Creates a document that points at an external URL — no file is uploaded or downloaded; Papermark stores and serves the link. The URL must be HTTPS.
| Flag | Default | Effect |
|---|---|---|
-n, --name <name> | required | Display name in the dashboard |
--folder-id <id> | root | Place in a team-library folder by id |
--link | off | Also create a default share link |
$ papermark documents create-link https://example.com/pricing --name "Pricing page"
Document created: doc_KlmN456create-notion
papermark documents create-notion <url> --name <name> [--folder-id <id>] [--link]Same as create-link, but for a publicly-accessible Notion page. Papermark
verifies the page is public when the document is created; a private page is
rejected.
$ papermark documents create-notion https://www.notion.so/acme/Handbook-abc123 --name "Handbook"
Document created: doc_PqrS789versions add-link / add-notion
papermark documents versions add-link <id> <url>
papermark documents versions add-notion <id> <url>Repoint an existing link/notion document at a new URL. This records a new
primary version (the document's type is preserved), so existing share links
immediately serve the new target and you can roll back with
documents versions promote.
The new URL must be HTTPS. For add-notion it must point to a
publicly-accessible Notion page — verified when the version is created,
exactly like create-notion.
$ papermark documents versions add-link doc_KlmN456 https://example.com/pricing-2025
Version 2 added: ver_Tuv012delete
papermark documents delete <id>Deletes the document and revokes any links pointing at it. Not
recoverable. The command does not prompt for confirmation.
Wrap it in your own read -p if a script needs the safety net.
papermark documents delete doc_aBc123Required scopes
| Command | Scope |
|---|---|
list, get, search | documents.read |
upload, create-link, create-notion, versions add-link, versions add-notion, delete | documents.write |