documents
List, get, search, upload, 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> | — | 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.
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.
delete
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, delete | documents.write |