General concepts
The partner/account/org/workspace hierarchy, opaque ids, folders, and embedding.
The hierarchy
Every API call carries enough context to resolve a path through this tree:
Identifiers are opaque
Every resource returns an id — a UUID. That id is the only way the API addresses a resource.
Take the id a resource returns and pass it back as-is — in the URL path or the X-Account-Id header. Do not construct, parse, hex-encode, or otherwise transform ids. There is no separate “slug” form to worry about.
You obtain ids from the list and detail endpoints, for example:
- Accounts —
GET /v1/accounts - Organizations —
GET /v1/organizations(scoped byX-Account-Id) - Workspaces —
GET /v1/organizations/{orgId}/workspaces - Documents —
GET /v1/organizations/{orgId}/documents - Prompt templates —
GET /v1/prompt-templates(partner-level: noX-Account-Id)
Account scoping
Account-scoped routes require the X-Account-Id header, and the resource in the URL must belong to that account:
- The account must be owned by your company (partner), or you get
403. - The org/workspace/document/tool must live under that account, or you get
404— a valid id from a different account will not resolve.
This is by design: the same key can serve many accounts, and the header is what selects which one a request applies to.
Documents and folders
A document is a file uploaded into an organization’s storage. Documents are organized into folders within the org:
- List folders with
GET /v1/organizations/{orgId}/folders; create one withPOST /v1/organizations/{orgId}/folders. - If you upload without naming a folder, the document lands in
custom-documents, the catch-all for unfiled docs. - The target folder must already exist before you upload into it.
A document’s id is stable and shared: the same id identifies the org document and every workspace that has it embedded. You address the document by that one id everywhere.
Only single-document file types are accepted for upload: pdf, docx, pptx, odt, odp, txt, md, rst, adoc, org, html, csv, epub.
Workspaces and embedding
Uploading a document does not automatically make it queryable. To use a document in a workspace, embed it:
Notes:
- The document must belong to the same organization as the workspace.
- Embedding is idempotent — re-embedding a document that is already embedded in the workspace is a no-op and returns success.
- Remove an embedding with
DELETE /v1/workspaces/{workspaceId}/documents/{documentId}(this detaches it from the workspace; the org document itself is unaffected).
Workspace integrations
Each workspace can connect to external channels, each managed under /v1/workspaces/{workspaceId}/integrations/...:
- voice — a phone assistant (a LumenOne-owned routing number the customer forwards their line to)
- whatsapp — WhatsApp Business
- telegram — a Telegram bot
Reading a workspace (GET /v1/workspaces/{workspaceId}) inlines each channel’s status. A channel that is not set up reads { connected: false }, and secret tokens are never returned.
Go deeper
Each resource has its own guide under Core concepts:
- Partner — your company, the principal behind the API key
- Accounts — a customer container and the value behind
X-Account-Id - Organizations — the tenant boundary
- Workspaces — settings, knowledge, tools, and channels
- Documents & knowledge base — org-shared uploads, embedding, and what deletion does
- Tools — HTTP actions, calling them from the prompt, and using their responses
- Prompt templates — partner-owned, versioned prompts rolled out to many workspaces
- Voice integration & routing numbers — phone assistants and the number pool
- Call logs — read-only records of handled voice calls
- WhatsApp integration
- Telegram integration

