Skip to main content
POST
https://api.memcontext.in
/
api
/
company-brain
/
documents
/
upload
Upload and ingest context vault document
curl --request POST \
  --url https://api.memcontext.in/api/company-brain/documents/upload \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-API-Key: <api-key>' \
  --form workspaceId=3c90c3cc-0d44-4b50-8888-8dd25736052a \
  --form 'title=<string>' \
  --form file='@example-file'
{
  "document": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "sourceType": "<string>",
    "chunkCount": 123,
    "extractedCount": 123,
    "totalChunks": 123,
    "processedChunks": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "title": "<string>",
    "processingPhase": "<string>",
    "heartbeatAt": "2023-11-07T05:31:56Z",
    "scope": "<string>",
    "project": "<string>",
    "completedAt": "2023-11-07T05:31:56Z",
    "error": "<string>",
    "publicUrl": "<string>"
  },
  "chunkCount": 123,
  "extractedCount": 123,
  "message": "<string>"
}

Authorizations

X-API-Key
string
header
required

API key created from the MemContext dashboard. Keys are prefixed with mc_.

Body

multipart/form-data
workspaceId
string<uuid>
required
title
string
required
file
file
required
sourceType
enum<string>
Available options:
pdf,
markdown,
text,
docx,
html,
url,
csv,
png,
jpg,
jpeg,
webp,
tiff
scope
string
project
string
content
string

Optional extracted text override for binary files.

Response

202 - application/json

File uploaded and added to the workspace document list.

document
object
required
chunkCount
integer
required
extractedCount
integer
required
status
enum<string>
required
Available options:
accepted
message
string
required