Documentation Index
Fetch the complete documentation index at: https://docs.ivory.finance/llms.txt
Use this file to discover all available pages before exploring further.
Overview
POST /v1/documents/upload ingests a document into your tenant’s isolated OpenSearch index. The pipeline extracts text, splits it into overlapping chunks, embeds each chunk with a 768-dimensional model, and stores the result ready for hybrid search.
The index (client-docs-{tenant_id}) is physically separate for every tenant — KNN queries cannot cross tenant boundaries.
The document index must be pre-provisioned for your tenant before the first upload. If not provisioned, the endpoint returns
503. Contact support if you see this error.IAM access control
Every document carries access control metadata written at upload time and enforced as mandatory pre-filters on every search query.| Field | Values | Who can see the document |
|---|---|---|
visibility | tenant_wide | Any authenticated user in your tenant |
visibility | deal_private | Only identity UUIDs in allowed_identity_ids |
visibility | team_only | Only users whose role is in allowed_roles |
barrier_id | UUID | Additionally requires the caller to have crossed the named information barrier |
Supported file types
| Format | Extraction method |
|---|---|
| pdfplumber — preserves paragraph structure | |
| DOCX | python-docx — paragraphs and table text |
| PPTX | python-pptx — all text frames across slides |
| TXT / MD / CSV | Direct UTF-8 decode |
| PNG / JPEG | GPT-4o-mini vision — OCR + chart/diagram description |
| SVG | <text> / <tspan> tag extraction; vision fallback if empty |
Request
The document to upload. Multipart form upload.
Your tenant UUID. Available from your JWT context or dashboard.
The identity UUID of the user performing the upload.
The entity this document relates to — a deal UUID, company entity UUID, or person UUID. Used to scope searches by entity.
Document classification. One of:
cim · nda · management_accounts · dd_report · board_pack · research_note · legal_agreement · pitch · otherAccess control level:
tenant_wide · deal_private · team_onlyComma-separated identity UUIDs that may access this document. Required when
visibility=deal_private.Comma-separated role slugs that may access this document. Required when
visibility=team_only. Example: compliance_officer,risk_managerInformation barrier UUID. When set, only users who have crossed this barrier will see the document in search results.
Response
UUID of the indexed document. Pass this to
/v1/documents/search or the agent.Original filename.
Number of text chunks indexed.
Your tenant UUID.
The OpenSearch index the document was stored in (
client-docs-{tenant_id}).Entity association, if provided.
Document classification.
The access level set on this document.
indexed — document is immediately searchable.Examples
Error responses
| Code | Reason |
|---|---|
413 | File exceeds 50 MB limit |
422 | No text could be extracted, or invalid visibility value |
503 | Document index not provisioned for this tenant — contact support |

