Skip to main content
POST
Ingest context vault document

Authorizations

X-API-Key
string
header
required

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

application/json
workspaceId
string<uuid>
required
title
string
required
Maximum string length: 200
vaultId
string<uuid>

Optional vault inside the workspace. Defaults to the workspace's default vault.

content
string

Extracted text/Markdown for v1 JSON ingestion. Required unless uri is provided.

Maximum string length: 250000
sourceType
enum<string>
Available options:
pdf,
markdown,
text,
docx,
html,
url,
csv,
png,
jpg,
jpeg,
webp,
tiff
scope
string
Maximum string length: 200
project
string
Maximum string length: 100
mimeType
string
originalFilename
string
uri
string<uri>

Public documentation/web URL or public file URL. Set sourceType for file URLs such as pdf, docx, markdown, text, csv, or an image type.

crawlSubpages
boolean
default:true

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.

priorityPageLimit
integer
default:15

Maximum priority pages to fetch from a discovered docs index such as llms.txt.

Required range: 1 <= x <= 25
subpageTarget
string[]

Terms to prioritize when crawling subpages.

Maximum array length: 8
Maximum string length: 100
category
enum<string>
  • preference - 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").
Available options:
preference,
fact,
decision,
context

Response

202 - application/json

Document accepted 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