Batch add documents
Add multiple documents in a single request. Each document can have any content type (text, url, file, etc.) and metadata
Body ParametersJSON
Optional tag this document should be containerized by. This can be an ID for your user, a project ID, or any other identifier you wish to use to group documents.
(DEPRECATED: Use containerTag instead) Optional tags this document should be containerized by. This can be an ID for your user, a project ID, or any other identifier you wish to use to group documents.
When this document’s content is from, as opposed to when it was uploaded. Accepts YYYY-MM-DD or a full ISO 8601 timestamp. Memory extraction resolves relative dates (‘yesterday’, ‘last quarter’) against this instead of the ingestion time, and documents in a batch are processed oldest-first so newer facts correctly supersede older ones. Set this whenever you backfill historical content.
Optional entity context for this container tag. Max 1500 characters. Used during document processing to guide memory extraction.
Batch add documents
curl https://api.supermemory.ai/v3/documents/batch \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY" \
-d "{
\"documents\": [
{
\"content\": \"Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s.\"
}
],
\"containerTag\": \"user_alex\",
\"documentDate\": \"2025-03-14\",
\"dreaming\": \"instant\",
\"entityContext\": \"User's name is {XYZ}\",
\"filepath\": \"/documents/reports/file.pdf\",
\"filterByMetadata\": {
\"department\": \"engineering\",
\"region\": \"us\"
},
\"metadata\": {
\"source\": \"upload\",
\"language\": \"en\"
},
\"taskType\": \"memory\"
}"{
"failed": 0,
"results": [
{
"id": "id",
"status": "status",
"details": "details",
"error": "error",
"url": "url"
}
],
"success": 0
}Returns Examples
{
"failed": 0,
"results": [
{
"id": "id",
"status": "status",
"details": "details",
"error": "error",
"url": "url"
}
],
"success": 0
}