Upload Knowledge Document
ethora-source-doc-uploadUpload documents (1–5; PDF, text, etc.) into an agent's knowledge base (the one named by agentId, else the app's default agent) (app-token / B2B variant of ethora-source-doc-upload-legacy). Async - content becomes queryable once indexing finishes; files passed as base64, 50MB max each. Pass tags to tag every document of the call in the same request (no separate ethora-source-doc-tags-update per document); the result lists each document's id and tags.
Requires: a selected app (ethora-app-select) or an explicit appId.
Auth: app-token mode OR B2B mode with an explicit appId. Errors: 401/403 wrong auth; 404 unknown appId; 413 too large; 422 unsupported document type. Related: ethora-source-doc-list, ethora-source-doc-delete.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Tags to put on every document of this call (up to 50, 64 characters each), e.g. `["billing", "faq"]`. An agent with `ragTags` answers only from sources carrying at least one of those tags; an agent without `ragTags` uses everything it has. If the tags match no source the agent has no knowledge to answer from, so tag the sources first. Change them later with `ethora-source-doc-tags-update`. | |
| appId | No | 24-char hex appId to ingest into. Required in B2B mode unless already set via `ethora-app-select`; ignored in app-token mode. | |
| files | Yes | 1 to 5 documents to ingest in this call. | |
| agentId | No | Agent whose knowledge base gets the content (24-char hex, from `ethora-agent-list` / `ethora-agent-create`). Must be your own agent or one of this app's. Omit to file it under the app's default agent (the one answering its website widget); an app still on the shared Support Agent first gets its own copy of it. | |
| agentIdOrAddress | No | Alias for `agentId` - either name is accepted, pass whichever you have. |