The Documents API controls the raw document library — the central store of parsed files that sit beneath all workspace embeddings. You can upload files directly, scrape URLs, or push plain text through the API; browse the folder hierarchy; create and remove folders; and move files between them. Uploading a document does not automatically embed it into a workspace — use the workspaceDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Mintplex-Labs/anything-llm/llms.txt
Use this file to discover all available pages before exploring further.
update-embeddings endpoint for that step. All requests require a valid Bearer token.
The document collector service must be running for file and URL uploads to be processed. If the service is offline you will receive a
500 response with the message "Document processing API is not online".POST /v1/document/upload
Upload a file to the AnythingLLM document library. The file is parsed, chunked, and stored as a JSON document ready for embedding. Optionally specify workspaces to embed the document into immediately after upload.Body Parameters
The binary file to upload. Send as
multipart/form-data.Comma-separated list of workspace slugs to automatically embed the document into after upload. Example:
"workspace-a,workspace-b".Key-value pairs of metadata to attach to the document. Supported keys:
title, docAuthor, description, docSource.Response Fields
Whether the upload succeeded.
null on success or an error message.POST /v1/document/upload/{folderName}
Upload a file directly into a named sub-folder. If the target folder does not exist it will be created automatically.Path Parameters
Name of the destination folder (e.g.
my-folder). Defaults to custom-documents if the path parameter is omitted.Body Parameters
Same multipart fields asPOST /v1/document/upload: file (required), addToWorkspaces, and metadata.
Response Fields
Same response schema asPOST /v1/document/upload.
POST /v1/document/upload-link
Provide a URL for AnythingLLM to scrape, parse, and store as a document. Optionally embed the result into one or more workspaces.Body Parameters
The publicly accessible URL to scrape (e.g.
"https://docs.example.com/overview").Comma-separated workspace slugs to embed the scraped document into after processing.
Key-value pairs of HTTP headers to send with the scrape request. Useful when the target URL requires authentication or custom headers. Example:
{ "Authorization": "Bearer token123" }.Key-value metadata to attach to the scraped document. Supported keys:
title, docAuthor, description, docSource.Response Fields
Upload status.
Error or
null.POST /v1/document/raw-text
Upload a document by providing its text content directly as a string — no file required. The metadatatitle key is required.
Body Parameters
The full plain-text content to store as a document.
Metadata object. The
title key is required. Additional keys must match the schema returned by GET /v1/document/metadata-schema.Comma-separated workspace slugs to embed the document into after creation.
Response Fields
Same schema asPOST /v1/document/upload.
GET /v1/documents
List every document currently stored in the local document library, organized as a folder tree.Response Fields
GET /v1/documents/folder/{folderName}
Retrieve all documents stored inside a specific folder.Path Parameters
Name of the folder to inspect (e.g.
custom-documents or legal-contracts).Response Fields
Name of the queried folder.
Array of document metadata objects including
name, type, cached, pinnedWorkspaces, and watched.GET /v1/document/accepted-file-types
Return the file MIME types and corresponding extensions the document collector currently accepts for upload.Response Fields
Map of MIME type strings to arrays of file extensions. Example:
GET /v1/document/metadata-schema
Return the known metadata key schema and acceptable value types for use when callingPOST /v1/document/raw-text.
Response Fields
Map of metadata key names to their accepted value type descriptor (e.g.
"string | number | nullable" or "string"). The title key is always present and required.GET /v1/document/{docName}
Fetch the full metadata for a single stored document by its internal name (the UUID-suffixed JSON filename).Path Parameters
Internal document filename as returned in the
name field of list responses (e.g. my-file.txt-uuid1234.json).Response Fields
Same structure as
GET /v1/documents, scoped to the single matched document.POST /v1/document/create-folder
Create a new empty folder inside the documents storage directory.Body Parameters
Name for the new folder (e.g.
"legal-contracts").Response Fields
Whether the folder was created.
null on success or an error message.DELETE /v1/document/remove-folder
Remove a folder and all its contained documents from the storage directory. This is irreversible.Body Parameters
Name of the folder to remove.
Response Fields
Whether the folder was removed.
"Folder removed successfully" or an error description.POST /v1/document/move-files
Move one or more documents from a source path to a destination path within the document library. Bothfrom and to values are relative to the top-level documents/ directory.
Body Parameters
Array of move-operation objects.
Response Fields
Whether all moves completed successfully.
null on success or an error description.GET /v1/document/generated-files/{filename}
Download a file that was generated by an agent skill (e.g. a PDF, DOCX, XLSX, or PPTX). ThestorageFilename value appears in the outputs array of a chat response when an agent produces a file.
Path Parameters
The storage filename returned in the chat response
outputs array (e.g. pdf-e9e14f28-d6b6-4f49-91a0-dd331517f567.pdf).Response
Returns the binary file content with the appropriateContent-Type and Content-Disposition headers for download.