For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact us
DocumentationAPI Reference
DocumentationAPI Reference
  • Authentication
    • GETVerify API key
  • Documents
    • POSTUpload document
    • POSTUpload document into folder
    • GETList documents
    • GETList documents in folder
    • GETGet document
    • POSTCreate folder
    • DELDelete folder
    • POSTMove documents between folders
    • DELDelete documents
  • Workspaces
    • GETGet workspace
    • DELDelete workspace
    • POSTUpdate workspace
    • POSTAdd or remove workspace embeddings
    • GETList workspace tools
    • POSTAttach tool to workspace
    • DELDetach tool from workspace
  • Number Requests
    • GETList number requests
    • POSTRequest a phone number
    • GETGet number request
  • Numbers
    • GETList phone numbers
    • GETList phone numbers in organization
  • Organizations
    • GETList organizations
    • POSTCreate organization
    • GETGet organization
    • DELDelete organization
    • POSTUpdate organization
    • GETList workspaces in organization
    • POSTCreate workspace
    • GETList organization tools
    • POSTCreate organization tool
    • DELDelete organization tool
    • PATCHUpdate organization tool
  • Accounts
    • GETList accounts
    • POSTCreate account
  • Voice Integration
    • GETGet voice assistant config
    • PATCHUpdate voice assistant config
    • GETGet voice integration catalog
    • POSTProvision voice integration
    • GETList voice call logs
    • GETList workspace voice call logs
  • Whats App Integration
    • POSTMint a WhatsApp Business connect page token
    • GETRender WhatsApp Business connect iframe page
    • POSTFinalize WhatsApp Business onboarding (iframe-initiated)
    • DELDisconnect WhatsApp Business integration
Contact us
LogoLogo
Documents

Upload document

POST
https://staging-app.lumenia.net/api/v1/org/:orgSlug/document/upload
POST
/api/v1/org/:orgSlug/document/upload
$curl -X POST https://staging-app.lumenia.net/api/v1/org/orgSlug/document/upload \
> -H "X-Account-Id: X-Account-Id" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: multipart/form-data" \
> -F file=@string
1{
2 "success": true,
3 "error": null,
4 "documents": [
5 {
6 "location": "lumenia/custom-documents/lumenia.txt-6e8be64c-c162-4b43-9997-b068c0071e8b.json",
7 "name": "lumenia.txt-6e8be64c-c162-4b43-9997-b068c0071e8b.json",
8 "url": "file://Users/tim/Documents/lumenia/collector/hotdir/lumenia.txt",
9 "title": "lumenia.txt",
10 "docAuthor": "Unknown",
11 "description": "Unknown",
12 "docSource": "a text file uploaded by the user.",
13 "chunkSource": "lumenia.txt",
14 "published": "1/16/2024, 3:07:00 PM",
15 "wordCount": 93,
16 "token_count_estimate": 115
17 }
18 ]
19}

Upload a new file to LumenIA to be parsed and prepared for embedding, with optional metadata. The file is stored under the organization identified by {orgSlug}. When addToWorkspaces is provided, every workspace slug must belong to the same organization — mixed-org fan-out is rejected.

Was this page helpful?
Previous

Upload document into folder

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

orgSlugstringRequired

Hex-encoded slug of the organization

Headers

X-Account-IdstringRequired
Account uuid context. Must belong to the API key's partner. Routes that target an org additionally require the org to belong to this account.

Request

Multipart form-data containing the file, optional addToWorkspaces, and optional metadata.

filefileRequired
The file to upload
addToWorkspacesstringOptional

Comma-separated workspace slugs to embed the document into post-upload. Every slug must belong to orgSlug. eg: workspace1,workspace2. Note: the workspace slugs use original slugs, not the hex-encoded ones used in the URL.

metadataobjectOptional

Key:Value pairs of metadata to attach to the document in JSON object format. Allowed keys: title, docAuthor, description, docSource, chunkSource, published.

Response

OK

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error