Standard users can only access their own documents. Admin users can access all documents and filter by owner when passing
adminMode: true.List all documents
Retrieves all documents with pagination, filtering, and role-based access control. Returns documents along with their dependent agents.Must be
"documents"Must be
"all"Whether the request succeeded.
Get document
Retrieves a single document by its UUID or 20-character ElevenLabs document ID. Returns full details including metadata, folder info, and dependent agents.Must be
"documents"Must be
"get"The document UUID or ElevenLabs document ID (
el_doc_id).Whether the request succeeded.
Non-admin users can only access their own documents or documents marked as public. Admin users with
adminMode: true can access all documents and see owner information.Create document
Creates a new document by delegating to the document upload pipeline. Supports multiple content sources: PDFs, websites, YouTube videos, and text.Must be
"documents"Must be
"create"Whether the request succeeded.
The
create action delegates to the internal document upload pipeline (doc-upload edge function). The nested data.action field determines which content source is used. Supported sub-actions:upload-website— Extract content from a single URLscrape-website— Crawl and parse website contentextract-youtube— Extract the transcript from a YouTube video URLupload-pdf— Upload and process a PDF fileextract-document— Extract content from various document formats (DOCX, TXT, etc.)
Update document (data mode)
Updates document metadata fields without changing the content. Only the fields you provide are updated. Metadata is intelligently merged with existing values.Must be
"documents"Must be
"update"The document UUID to update.
Whether the request succeeded.
Update document (content mode)
Replaces the document content in ElevenLabs. The old ElevenLabs document is deleted and a new one is created. All dependent agents are automatically updated with the new content.Must be
"documents"Must be
"update"The document UUID to update.
Whether the request succeeded.
Content mode deletes the old ElevenLabs document and creates a new one. All genies that depend on this document are automatically updated with the new ElevenLabs document ID.
Delete document
Permanently deletes a document, removes it from storage and ElevenLabs, and syncs the removal with all dependent agents.Must be
"documents"Must be
"delete"The document UUID to delete.
Whether the request succeeded.
Attach documents to agent
Adds one or more documents to a genie’s knowledge base. Duplicate documents are automatically skipped.Must be
"documents"Must be
"attach"Whether the request succeeded.
Summary of attached documents.
Number of documents successfully attached.
Detach documents from agent
Removes specific documents from a genie’s knowledge base.Must be
"documents"Must be
"detach"Whether the request succeeded.
Summary of detached documents.
Number of documents successfully detached.
Replace agent knowledge base
Completely replaces a genie’s knowledge base with a new set of documents. Documents not in the new list are removed; new documents are added.Must be
"documents"Must be
"replace"Whether the request succeeded.
Summary of replaced documents.
Number of documents in the new knowledge base.
Sync documents with agents
Synchronizes document changes across all dependent agents. Removes old ElevenLabs documents and adds updated ones to each agent’s knowledge base. Typically used internally after document content is updated or deleted.Must be
"documents"Must be
"sync-with-agent"Whether the request succeeded.
Error codes
| Code | Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid authentication token |
INVALID_TOKEN | 401 | Token validation failed |
FORBIDDEN | 403 | User lacks required permissions |
NOT_FOUND | 404 | Document not found |
VALIDATION_ERROR | 400 | Invalid request parameters |
INVALID_ACTION | 400 | Unknown action for the documents resource |
INTERNAL_ERROR | 500 | Server-side error |

