Paperless-ngx

v0.1.1
io.github.tobee89/mcp-paperless-ngx Checked 2 days ago Published 3 months ago

MCP server for Paperless-ngx 3.x — full REST API coverage, schema-aware, token-frugal.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_documents Search documents

Find documents by full-text search, metadata filters, or both. This is the main entry point for every 'which documents ...' question. Returns a compact summary per document (id, title, IDs of correspondent/type/tags, dates) — NOT the OCR text, which would flood the context. Use get_document_content for the text of a specific document.

ParameterTypeDescription
added__date__gtestringAdded to Paperless on or after this date (YYYY-MM-DD).
added__date__ltestringAdded to Paperless on or before this date (YYYY-MM-DD).
archive_serial_numberintegerExact archive serial number.
content_previewintegerInclude this many characters of OCR text per document. 0 disables it. Keep small.
correspondent__idintegerExact correspondent ID.
created__date__gtestringCreated on or after this date (YYYY-MM-DD).
created__date__ltestringCreated on or before this date (YYYY-MM-DD).
custom_field_querystringJSON-encoded custom field filter, e.g. '["due","range",["2024-08-01","2024-09-01"]]' or '["customer","icontains","acme"]'. See the Paperless API docs for the operator list.
document_type__idintegerExact document type ID.
extra_filtersobjectAny additional Django-style filter the documents endpoint accepts, e.g. {'content__icontains': 'kündigung', 'created__year': 2024, 'mime_type': 'application/pdf'}. Use this for filters not listed abo…
is_in_inboxbooleantrue returns documents still carrying an inbox tag. The usual starting point for triage.
is_taggedbooleanfalse returns documents with no tags at all — the untriaged pile.
more_like_idintegerReturn documents similar to this document ID. Ignores the other filters.
orderingstringSort field, '-' prefixed for descending. Common: -created, -added, title, archive_serial_number.
owner__idintegerOnly documents owned by this user ID.
pageinteger
page_sizeintegerDefault 25.
querystringFull-text search across document content and metadata. Supports the Paperless query syntax, e.g. 'invoice AND 2024', 'correspondent:telekom', 'created:[2024-01-01 TO 2024-12-31]'. Prefer this for 'fin…
storage_path__idintegerExact storage path ID.
tags__id__allarrayOnly documents carrying ALL of these tag IDs.
tags__id__inarrayOnly documents carrying AT LEAST ONE of these tag IDs.
tags__id__nonearrayExclude documents carrying any of these tag IDs.
title__icontainsstringCase-insensitive substring match on the title only. Cheaper and stricter than query.

get_document Get document

Fetch one document's metadata by ID: title, correspondent, type, tags, dates, custom fields, notes and available versions. Does not include the OCR text unless include_content is set.

ParameterTypeDescription
id *integer
include_contentbooleanInclude the full OCR text. Can be very large — prefer get_document_content.

get_document_content Get document text

Return the OCR/extracted text of one document. Deliberately a separate tool: this is the most expensive thing you can pull from Paperless, so fetch it only for documents you have already narrowed down. Supports offset/limit for long documents.

ParameterTypeDescription
id *integer
limitintegerMaximum characters to return.
offsetintegerCharacter offset to start from.

update_document Update document

Change metadata on a single document. Only the fields you pass are modified. Pass numeric IDs for correspondent, document_type and storage_path — resolve names via get_metadata_overview first. Setting `tags` replaces the whole tag list; to add or remove individual tags across documents use bulk_edit_documents.

ParameterTypeDescription
id *integer
archive_serial_number
correspondentCorrespondent ID, or null to clear.
created_datestringDocument date as YYYY-MM-DD.
custom_fieldsarrayComplete replacement list of custom field values.
document_typeDocument type ID, or null to clear.
owner
storage_pathStorage path ID, or null to clear.
tagsarrayComplete replacement list of tag IDs.
titlestringGive documents a descriptive title, never a scanner filename.

delete_document Delete document

Move a document to the trash. It stays recoverable until the trash is emptied or the retention period expires. Always confirm with the user before deleting anything.

ParameterTypeDescription
id *integer

get_document_metadata Get document file metadata

Technical file metadata for a document: checksums, byte sizes, MIME type, stored filename, whether an archived PDF/A version exists, and embedded PDF metadata. Not the Paperless tags/correspondent — use get_document for those.

ParameterTypeDescription
id *integer

get_document_history Get document history

Audit trail of changes to a document — who changed which field, and when. Requires audit logging to be enabled on the instance. Returns the most recent entries first; raise `limit` to see further back.

ParameterTypeDescription
id *integer
limitintegerMaximum number of history entries to return, newest first.

get_document_suggestions Get filing suggestions

Paperless' own suggestions for a document — correspondents, tags, document types and dates its classifier considers likely. Useful as a starting point when triaging, but the suggestions are only as good as the trained model; verify before applying.

ParameterTypeDescription
id *integer

get_document_ai_suggestions Get AI filing suggestions

Suggestions from the instance's configured LLM backend (Paperless-ngx 3.x, only if AI features are enabled server-side). Returns 404 or an error when AI is disabled — that is expected, not a bug.

ParameterTypeDescription
id *integer

get_next_asn Get next archive serial number

The next free archive serial number, for filing a physical document alongside its scan.

get_selection_data Summarise a document selection

For a set of document IDs, return how many of them carry each tag, correspondent, document type and storage path. Answers 'what is in this pile?' in one call instead of fetching every document.

ParameterTypeDescription
documents *array

bulk_edit_documents Bulk edit documents

Apply one operation to many documents at once. Far cheaper than looping update_document, and the only way to add or remove individual tags without replacing the whole tag list. Methods: set_correspondent, set_document_type, set_storage_path, add_tag, remove_tag, modify_tags, modify_custom_fields, set_permissions, reprocess, delete, rotate, merge, split, delete_pages, edit_pdf, remove_password. The destructive methods (delete, delete_pages, split/merge with delete_originals) need explicit user confirmation first.

ParameterTypeDescription
documents *arrayIDs of the documents to act on. Always an explicit list — never an unbounded selection.
method *string
add_custom_fieldsobjectFor modify_custom_fields: {custom_field_id: value}.
add_tagsarrayFor modify_tags.
correspondentFor set_correspondent.
degreesnumberFor rotate: clockwise rotation in degrees.
delete_originalsbooleanFor merge/split: delete the source documents afterwards. Irreversible.
document_typeFor set_document_type.
mergebooleanFor set_permissions: merge with existing permissions instead of replacing.
metadata_document_idintegerFor merge: which source document's metadata the result inherits.
ownerFor set_permissions.
pagesstringFor split: page groups such as '[1-2,3-4,5]'. For delete_pages: page numbers such as '[2,3,4]'.
passwordstringFor remove_password: the PDF's current password.
remove_custom_fieldsarrayFor modify_custom_fields.
remove_tagsarrayFor modify_tags.
set_permissionsobjectFor set_permissions.
storage_pathFor set_storage_path.
tagintegerFor add_tag / remove_tag.

merge_documents Merge documents

Merge several documents into one new PDF, in the order given. The originals stay unless delete_originals is set. Runs asynchronously — poll the returned task with get_task.

ParameterTypeDescription
documents *arrayDocument IDs in the order the pages should appear.
archive_fallbackbooleanFall back to the archived PDF/A version when an original cannot be merged.
delete_originalsbooleanDelete the source documents after a successful merge. Irreversible — confirm first.
metadata_document_idintegerCopy tags, correspondent and type from this document onto the merged result.

rotate_documents Rotate documents

Rotate every page of the given documents clockwise by 90, 180 or 270 degrees.

ParameterTypeDescription
degrees *number
documents *arrayIDs of the documents to act on. Always an explicit list — never an unbounded selection.

edit_pdf Edit a PDF

Reorder, rotate, remove or split out pages of a single document, producing a new document. `operations` is a list of page instructions; each entry names a source page and what to do with it. Consult the Paperless API docs for the exact operation shape before using this.

ParameterTypeDescription
documents *arrayExactly one document ID.
operations *array
delete_originalbooleanIrreversible — confirm first.
include_metadatabooleanCarry metadata over to the result.
update_documentbooleanReplace the existing document instead of creating a new one.

remove_pdf_password Remove a PDF password

Decrypt password-protected PDFs so Paperless can OCR them. The password is sent to your Paperless instance over its API; only use it against an instance you control.

ParameterTypeDescription
documents *arrayIDs of the documents to act on. Always an explicit list — never an unbounded selection.
password *string
delete_originalboolean
include_metadataboolean
update_documentboolean

reprocess_documents Reprocess documents

Re-run OCR and the archive generation for the given documents, e.g. after changing OCR settings. Queued asynchronously; the documents keep their metadata.

ParameterTypeDescription
documents *arrayIDs of the documents to act on. Always an explicit list — never an unbounded selection.

delete_documents Delete documents

Move several documents to the trash at once. Recoverable until the trash is emptied. Requires explicit user confirmation — list what will be deleted before calling this.

ParameterTypeDescription
documents *arrayIDs of the documents to act on. Always an explicit list — never an unbounded selection.

download_document Download document

Save a document's file to disk on the machine running this MCP server and return the path. Files are written to PAPERLESS_DOWNLOAD_DIR (defaults to the system temp directory). The bytes are deliberately not returned inline — a PDF as base64 would consume the entire context.

ParameterTypeDescription
id *integer
filenamestringOverride the filename. Relative names are resolved inside the download directory.
versionstring'archive' is the OCR'd PDF/A Paperless generated; 'original' is the file as it was consumed.

get_document_thumbnail Get document thumbnail

Return the document's thumbnail image inline so it can actually be looked at. Useful for confirming what a document is without reading its whole OCR text.

ParameterTypeDescription
id *integer

bulk_download_documents Bulk download documents

Download several documents as one zip archive, written to the download directory. Returns the archive path, not its contents.

ParameterTypeDescription
documents *array
compressionstring
contentstringWhich file version(s) to include.
filenamestringArchive filename. Defaults to a timestamped name.
follow_formattingbooleanLay the archive out according to the documents' storage path templates.

upload_document Upload a document

Hand a file to Paperless for consumption. Provide either `path` (a file on the machine running this server — the cheap option) or `content_base64` (works for remote deployments but costs context proportional to the file size; avoid for anything over a few hundred kilobytes). Consumption is asynchronous: the returned task ID can be polled with get_task.

ParameterTypeDescription
archive_serial_numberinteger
content_base64stringBase64-encoded file contents.
correspondentinteger
createdstringDocument date, e.g. '2024-04-19'.
document_typeinteger
filenamestringFilename to present to Paperless. Required with content_base64.
pathstringAbsolute path to the file on the server's filesystem.
storage_pathinteger
tagsarray
titlestring

email_documents Email documents

Send one or more documents by email from the Paperless instance. This sends real mail to real people — only call it after the user has confirmed the recipients, subject and body.

ParameterTypeDescription
addresses *stringComma-separated recipient addresses.
documents *array
message *string
subject *string
use_archive_versionbooleanAttach the archived PDF/A rather than the original.

list_document_notes List document notes

Notes attached to a document, with authors and timestamps. Notes hold context the OCR text does not contain — worth reading before drawing conclusions about a document.

ParameterTypeDescription
id *integer

create_document_note Add a note to a document

Attach a free-text note to a document. Use this to record context that belongs with the document rather than in the conversation — why it was kept, what was agreed, what to do next.

ParameterTypeDescription
id *integer
note *string

delete_document_note Delete a document note

Remove a note from a document. Not recoverable.

ParameterTypeDescription
id *integer
note_id *integer

list_tags List tags

List tags. Tags are the primary way documents are categorised, and can be nested via `parent`. Returns id, name and document_count for each. Call this before creating anything — reusing an existing tag is almost always correct.

ParameterTypeDescription
fullbooleanReturn every field instead of the id/name/document_count summary.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.

get_tag Get tag

Fetch a single tag by ID, with all fields.

ParameterTypeDescription
id *integer

create_tag Create tag

Create a new tag. Check list_tags first: near-duplicate entries are hard to merge later.

ParameterTypeDescription
name *stringDisplay name. Must be unique.
colorstringHex colour such as '#a6cee3'.
is_inbox_tagbooleanInbox tags are applied to newly consumed documents and mark them as untriaged.
is_insensitivebooleanCase-insensitive matching. Defaults to true.
matchstringText this object matches against, interpreted per matching_algorithm.
matching_algorithmnumberMatching algorithm: 0=none, 1=any word, 2=all words, 3=exact, 4=regex, 5=fuzzy, 6=auto. Use 6 (auto) unless the user asked for a specific rule.
ownerOwning user ID, or null for unowned.
parentParent tag ID for nested tags (Paperless-ngx 3.x). Null for a top-level tag.
set_permissionsobjectObject-level permissions. Overwrites existing permissions entirely unless the endpoint supports merging.

update_tag Update tag

Partially update a tag. Only the fields you pass are changed; omitted fields keep their current value.

ParameterTypeDescription
id *integer
colorstringHex colour such as '#a6cee3'.
is_inbox_tagbooleanInbox tags are applied to newly consumed documents and mark them as untriaged.
is_insensitivebooleanCase-insensitive matching. Defaults to true.
matchstringText this object matches against, interpreted per matching_algorithm.
matching_algorithmnumberMatching algorithm: 0=none, 1=any word, 2=all words, 3=exact, 4=regex, 5=fuzzy, 6=auto. Use 6 (auto) unless the user asked for a specific rule.
namestring
ownerOwning user ID, or null for unowned.
parentParent tag ID for nested tags (Paperless-ngx 3.x). Null for a top-level tag.
set_permissionsobjectObject-level permissions. Overwrites existing permissions entirely unless the endpoint supports merging.

delete_tag Delete tag

Permanently delete a tag. Documents are not deleted, but they lose this assignment and it cannot be restored. Confirm with the user first.

ParameterTypeDescription
id *integer

list_correspondents List correspondents

List correspondents. A correspondent is the sender or counterparty a document came from. Returns id, name and document_count for each. Call this before creating anything — reusing an existing correspondent is almost always correct.

ParameterTypeDescription
fullbooleanReturn every field instead of the id/name/document_count summary.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.

get_correspondent Get correspondent

Fetch a single correspondent by ID, with all fields.

ParameterTypeDescription
id *integer

create_correspondent Create correspondent

Create a new correspondent. Check list_correspondents first: near-duplicate entries are hard to merge later.

ParameterTypeDescription
name *stringDisplay name. Must be unique.
is_insensitivebooleanCase-insensitive matching. Defaults to true.
matchstringText this object matches against, interpreted per matching_algorithm.
matching_algorithmnumberMatching algorithm: 0=none, 1=any word, 2=all words, 3=exact, 4=regex, 5=fuzzy, 6=auto. Use 6 (auto) unless the user asked for a specific rule.
ownerOwning user ID, or null for unowned.
set_permissionsobjectObject-level permissions. Overwrites existing permissions entirely unless the endpoint supports merging.

update_correspondent Update correspondent

Partially update a correspondent. Only the fields you pass are changed; omitted fields keep their current value.

ParameterTypeDescription
id *integer
is_insensitivebooleanCase-insensitive matching. Defaults to true.
matchstringText this object matches against, interpreted per matching_algorithm.
matching_algorithmnumberMatching algorithm: 0=none, 1=any word, 2=all words, 3=exact, 4=regex, 5=fuzzy, 6=auto. Use 6 (auto) unless the user asked for a specific rule.
namestring
ownerOwning user ID, or null for unowned.
set_permissionsobjectObject-level permissions. Overwrites existing permissions entirely unless the endpoint supports merging.

delete_correspondent Delete correspondent

Permanently delete a correspondent. Documents are not deleted, but they lose this assignment and it cannot be restored. Confirm with the user first.

ParameterTypeDescription
id *integer

list_document_types List document types

List document types. A document type says what kind of document it is (invoice, contract, payslip). Returns id, name and document_count for each. Call this before creating anything — reusing an existing document type is almost always correct.

ParameterTypeDescription
fullbooleanReturn every field instead of the id/name/document_count summary.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.

get_document_type Get document type

Fetch a single document type by ID, with all fields.

ParameterTypeDescription
id *integer

create_document_type Create document type

Create a new document type. Check list_document_types first: near-duplicate entries are hard to merge later.

ParameterTypeDescription
name *stringDisplay name. Must be unique.
is_insensitivebooleanCase-insensitive matching. Defaults to true.
matchstringText this object matches against, interpreted per matching_algorithm.
matching_algorithmnumberMatching algorithm: 0=none, 1=any word, 2=all words, 3=exact, 4=regex, 5=fuzzy, 6=auto. Use 6 (auto) unless the user asked for a specific rule.
ownerOwning user ID, or null for unowned.
set_permissionsobjectObject-level permissions. Overwrites existing permissions entirely unless the endpoint supports merging.

update_document_type Update document type

Partially update a document type. Only the fields you pass are changed; omitted fields keep their current value.

ParameterTypeDescription
id *integer
is_insensitivebooleanCase-insensitive matching. Defaults to true.
matchstringText this object matches against, interpreted per matching_algorithm.
matching_algorithmnumberMatching algorithm: 0=none, 1=any word, 2=all words, 3=exact, 4=regex, 5=fuzzy, 6=auto. Use 6 (auto) unless the user asked for a specific rule.
namestring
ownerOwning user ID, or null for unowned.
set_permissionsobjectObject-level permissions. Overwrites existing permissions entirely unless the endpoint supports merging.

delete_document_type Delete document type

Permanently delete a document type. Documents are not deleted, but they lose this assignment and it cannot be restored. Confirm with the user first.

ParameterTypeDescription
id *integer

list_storage_paths List storage paths

List storage paths. A storage path is a filename template controlling where Paperless stores the file on disk. Returns id, name and document_count for each. Call this before creating anything — reusing an existing storage path is almost always correct.

ParameterTypeDescription
fullbooleanReturn every field instead of the id/name/document_count summary.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.

get_storage_path Get storage path

Fetch a single storage path by ID, with all fields.

ParameterTypeDescription
id *integer

create_storage_path Create storage path

Create a new storage path. Check list_storage_paths first: near-duplicate entries are hard to merge later.

ParameterTypeDescription
name *stringDisplay name. Must be unique.
path *stringFilename template, e.g. '{created_year}/{correspondent}/{title}'. Required when creating.
is_insensitivebooleanCase-insensitive matching. Defaults to true.
matchstringText this object matches against, interpreted per matching_algorithm.
matching_algorithmnumberMatching algorithm: 0=none, 1=any word, 2=all words, 3=exact, 4=regex, 5=fuzzy, 6=auto. Use 6 (auto) unless the user asked for a specific rule.
ownerOwning user ID, or null for unowned.
set_permissionsobjectObject-level permissions. Overwrites existing permissions entirely unless the endpoint supports merging.

update_storage_path Update storage path

Partially update a storage path. Only the fields you pass are changed; omitted fields keep their current value.

ParameterTypeDescription
id *integer
is_insensitivebooleanCase-insensitive matching. Defaults to true.
matchstringText this object matches against, interpreted per matching_algorithm.
matching_algorithmnumberMatching algorithm: 0=none, 1=any word, 2=all words, 3=exact, 4=regex, 5=fuzzy, 6=auto. Use 6 (auto) unless the user asked for a specific rule.
namestring
ownerOwning user ID, or null for unowned.
pathstringFilename template, e.g. '{created_year}/{correspondent}/{title}'. Required when creating.
set_permissionsobjectObject-level permissions. Overwrites existing permissions entirely unless the endpoint supports merging.

delete_storage_path Delete storage path

Permanently delete a storage path. Documents are not deleted, but they lose this assignment and it cannot be restored. Confirm with the user first.

ParameterTypeDescription
id *integer

test_storage_path Test a storage path template

Render a storage path template against an existing document to see the resulting file path. Use this to validate a template before saving it.

ParameterTypeDescription
document *integerID of the document to render the template against.
path *stringThe storage path template to render.

bulk_edit_metadata_objects Bulk edit metadata objects

Delete or set permissions on many tags, correspondents, document types or storage paths at once. Deletion here is permanent — confirm with the user before calling it.

ParameterTypeDescription
object_type *string
objects *arrayIDs of the objects to act on.
operation *string
mergebooleanMerge with existing permissions instead of replacing them.
owner
permissionsobjectObject-level permissions. Overwrites existing permissions entirely unless the endpoint supports merging.

get_metadata_overview Metadata overview

One compact snapshot of all tags, correspondents, document types and storage paths with their IDs and document counts. Cheaper than four separate list calls and the right first step before filing or triaging documents.

list_custom_fields List custom fields

Custom fields defined on this instance, with their IDs, data types and how many documents use them. You need the IDs before you can read or write custom field values on a document.

ParameterTypeDescription
fullbooleanReturn every field instead of the identifying summary.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.

get_custom_field Get custom field

One custom field definition including its select options, if any.

ParameterTypeDescription
id *integer

create_custom_field Create custom field

Define a new custom field. The data type cannot be changed afterwards, so pick it deliberately.

ParameterTypeDescription
data_type *stringField type. 'select' requires extra_data.select_options; 'monetary' stores a currency-prefixed amount; 'documentlink' stores references to other document IDs.
name *string
extra_dataobjectType-specific configuration. For 'select': {"select_options": [{"label": "Open"}, {"label": "Paid"}]}. For 'monetary': {"default_currency": "EUR"}.

update_custom_field Update custom field

Rename a custom field or adjust its extra_data (e.g. add select options). Changing data_type is not supported by Paperless.

ParameterTypeDescription
id *integer
extra_dataobject
namestring

delete_custom_field Delete custom field

Delete a custom field definition and every value stored in it, across all documents. This cannot be undone — confirm with the user, and check document_count first.

ParameterTypeDescription
id *integer

list_saved_views List saved views

Saved views are the filter presets the user built in the Paperless web UI. Reading them is the fastest way to learn how this person actually organises their archive — check here before inventing your own filters.

ParameterTypeDescription
fullbooleanReturn every field instead of the identifying summary.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.

get_saved_view Get saved view

One saved view including its filter rules, so you can reproduce it as a search.

ParameterTypeDescription
id *integer

create_saved_view Create saved view

Save a filter preset that shows up in the user's Paperless sidebar. filter_rules use the web UI's numeric rule types — copy the shape from an existing view via get_saved_view rather than guessing.

ParameterTypeDescription
name *string
filter_rulesarray
page_size
show_in_sidebarboolean
show_on_dashboardboolean
sort_fieldstring | nulle.g. 'created', 'title'.
sort_reverseboolean

update_saved_view Update saved view

Change a saved view's name, sorting, visibility or filter rules.

ParameterTypeDescription
id *integer
filter_rulesarray
namestring
page_size
show_in_sidebarboolean
show_on_dashboardboolean
sort_fieldstring | null
sort_reverseboolean

delete_saved_view Delete saved view

Remove a saved view. Documents are unaffected.

ParameterTypeDescription
id *integer

list_workflows List workflows

Automation rules on this instance, each with its triggers and actions inlined. Read these before changing filing behaviour — a workflow may already be doing what the user is asking you to do by hand.

ParameterTypeDescription
fullbooleanReturn the complete definitions. Triggers carry 27 fields and actions 34, so keep this off until you need the details of a specific rule — get_workflow is usually the better way.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.

get_workflow Get workflow

One workflow with its full trigger and action definitions.

ParameterTypeDescription
id *integer

create_workflow Create workflow

Create an automation rule. Workflows run automatically against future documents, so a mistake here silently mis-files everything that arrives afterwards. Read an existing workflow with get_workflow to copy the exact shape, and confirm the rule with the user before creating it. Trigger object. type: 1=consumption started, 2=document added, 3=document updated, 4=scheduled. Common fields: sources (1=consume folder, 2=API upload, 3=mail fetch), filter_filename, filter_path, filter_mailrule, match + matching_algorithm, filter_has_tags / filter_has_all_tags / filter_has_not_tags, filter_has_any_corr…

ParameterTypeDescription
actions *arrayAction object. type: 1=assignment, 2=removal, 3=email, 4=webhook, 5=..., 6=... Assignment actions use assign_title, assign_tags, assign_correspondent, assign_document_type, assign_storage_path, assign…
name *string
triggers *arrayTrigger object. type: 1=consumption started, 2=document added, 3=document updated, 4=scheduled. Common fields: sources (1=consume folder, 2=API upload, 3=mail fetch), filter_filename, filter_path, fil…
enabledboolean
orderintegerLower numbers run first.

update_workflow Update workflow

Update a workflow. Passing `triggers` or `actions` replaces the existing list wholesale — fetch the current definition with get_workflow, modify it, and send the complete list back. To simply switch a rule off, pass enabled:false and nothing else.

ParameterTypeDescription
id *integer
actionsarray
enabledboolean
namestring
orderinteger
triggersarray

delete_workflow Delete workflow

Delete an automation rule permanently. Consider update_workflow with enabled:false instead.

ParameterTypeDescription
id *integer

list_workflow_triggers List workflow triggers

Trigger definitions across all workflows. Useful for auditing what fires when.

ParameterTypeDescription
fullbooleanReturn the complete definitions. Triggers carry 27 fields and actions 34, so keep this off until you need the details of a specific rule — get_workflow is usually the better way.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.

list_workflow_actions List workflow actions

Action definitions across all workflows. Useful for auditing what gets assigned automatically.

ParameterTypeDescription
fullbooleanReturn the complete definitions. Triggers carry 27 fields and actions 34, so keep this off until you need the details of a specific rule — get_workflow is usually the better way.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.

search_autocomplete Autocomplete a search term

Completions for a partial search term, ranked by importance in the full-text index. Helpful when the user's spelling of a name or term may not match what is in the archive.

ParameterTypeDescription
term *string
limitinteger

get_statistics Archive statistics

Totals for the archive: document count, inbox count, characters, file type breakdown. A cheap orientation call at the start of a session.

get_server_status Server status

Instance health: Paperless version, database and index status, whether Redis and the task workers are reachable, and whether the search index is up to date.

list_tasks List background tasks

Background tasks — consumption, merges, reprocessing — with their state and result. This is where an upload's outcome shows up, including the ID of the document it created.

ParameterTypeDescription
acknowledgedbooleanfalse shows only tasks the user has not dismissed.
fullbooleanReturn every field instead of the identifying summary.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.
statusstringPaperless reports these lower-case; 'success' and 'failure' are the interesting ones.
task_idstringFilter to one task UUID, e.g. the one upload_document returned.

get_task Get a background task

One background task by database ID, including its result. Use this to find out whether an upload or merge actually succeeded.

ParameterTypeDescription
id *integer

get_active_tasks Currently running tasks

Tasks executing right now. Tells you whether the instance is busy.

acknowledge_tasks Dismiss tasks

Mark finished or failed tasks as acknowledged so they stop showing in the UI.

ParameterTypeDescription
tasks *arrayTask database IDs, not UUIDs.

list_trash List trashed documents

Documents in the trash, with the date each was deleted and when it will be purged for good.

ParameterTypeDescription
fullbooleanReturn every field instead of the identifying summary.
name__icontainsstringCase-insensitive substring filter on the name.
orderingstringField to order by. Prefix with '-' to reverse, e.g. '-created'.
pageinteger1-based page number.
page_sizeintegerItems per page. Clamped by the server's configured ceiling.

restore_from_trash Restore documents from trash

Bring deleted documents back. The safe counterpart to delete_document.

ParameterTypeDescription
documents *array

empty_trash Empty the trash

Permanently destroy trashed documents. There is no recovery after this — the files are gone. Never call this without the user explicitly asking for it in the current conversation, and list what is in the trash first.

ParameterTypeDescription
documentsarraySpecific document IDs to purge. Omit to purge the entire trash.

get_remote_version Check for Paperless updates

The latest Paperless-ngx release, and whether an update is available.