curl --request POST \
--url https://api.memcontext.in/api/context-vault/documents \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({workspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', title: '<string>'})
};
fetch('https://api.memcontext.in/api/context-vault/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.memcontext.in/api/context-vault/documents"
payload = {
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"document": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceType": "<string>",
"status": "pending",
"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,
"status": "accepted",
"message": "<string>"
}Ingest context vault document
Adds workspace knowledge from extracted text, a public file URL, or a documentation/web URL.
Use content when your app already has clean text or Markdown. Use
uri with a file sourceType for public PDF, DOCX, Markdown, TXT, CSV,
or image URLs. Use sourceType: url for documentation sites and web
pages.
curl --request POST \
--url https://api.memcontext.in/api/context-vault/documents \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({workspaceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', title: '<string>'})
};
fetch('https://api.memcontext.in/api/context-vault/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.memcontext.in/api/context-vault/documents"
payload = {
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"document": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceType": "<string>",
"status": "pending",
"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,
"status": "accepted",
"message": "<string>"
}Authorizations
API key created from the MemContext dashboard. Keys are prefixed with mc_, bound to one workspace, and API-key requests cannot override that workspace.
Body
200Optional vault inside the workspace. Defaults to the workspace's default vault.
Extracted text/Markdown for v1 JSON ingestion. Required unless uri is provided.
250000pdf, markdown, text, docx, html, url, csv, png, jpg, jpeg, webp, tiff 200100Public documentation/web URL or public file URL. Set sourceType for file URLs such as pdf, docx, markdown, text, csv, or an image type.
Crawl linked subpages from a documentation/web URL. For docs sites with llms.txt, MemContext discovers canonical pages first and ingests only priority pages. Ignored for remote file URL ingestion.
Maximum priority pages to fetch from a discovered docs index such as llms.txt.
1 <= x <= 25Terms to prioritize when crawling subpages.
8100preference- User likes or dislikes (e.g. "prefers dark mode").fact- Objective information (e.g. "uses macOS").decision- Choices made (e.g. "chose the new billing provider").context- Background information (e.g. "working on e-commerce app").
preference, fact, decision, context Response
Document accepted and added to the workspace document list.
Hide child attributes
Hide child attributes
pending, processing, retrying, completed, failed, cancelled accepted 