---
title: "Batch add documents"
method: POST
path: "/v3/documents/batch"
tags: ["Ingest"]
---

# Batch add documents

`POST /v3/documents/batch`

Add multiple documents in a single request. Each document can have any content type (text, url, file, etc.) and metadata

## Request body

- object
  - `containerTag` string — 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.
  - `containerTags` string[] — (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.
  - `metadata` object — Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects.
  - `taskType` 'memory' | 'superrag' — Task type: "memory" (default) for full context layer with SuperRAG built in, "superrag" for managed RAG as a service.
  - `filepath` string — Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used by supermemoryfs to map documents to filesystem paths.
  - `filterByMetadata` object — Optional metadata filter scoping which existing memories are pulled as context during ingestion. Scalar values match exactly (AND across keys); array values match ANY (OR within key). Only memories whose source documents match this filter are used as context.
  - `documentDate` string — 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.
  - `entityContext` string — Optional entity context for this container tag. Max 1500 characters. Used during document processing to guide memory extraction.
  - `dreaming` 'instant' | 'dynamic' — Processing mode. "dynamic" (default) groups related documents together so memories form from coherent, logical units rather than one isolated entry at a time. "instant" processes each document on its own right away, and bills one extra operation per document.
  - `documents` union, required
    - object[]
      - `containerTag` string — 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.
      - `containerTags` string[] — (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.
      - `content` string, required — The content to extract and process into a document. This can be a URL to a website, a PDF, an image, or a video. Plaintext: Any plaintext format URL: A URL to a website, PDF, image, or video We automatically detect the content type from the url's response format.
      - `customId` string — Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document.
      - `metadata` object — Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects.
      - `taskType` 'memory' | 'superrag' — Task type: "memory" (default) for full context layer with SuperRAG built in, "superrag" for managed RAG as a service.
      - `filepath` string — Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used by supermemoryfs to map documents to filesystem paths.
      - `filterByMetadata` object — Optional metadata filter scoping which existing memories are pulled as context during ingestion. Scalar values match exactly (AND across keys); array values match ANY (OR within key). Only memories whose source documents match this filter are used as context.
      - `documentDate` string — 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.
      - `entityContext` string — Optional entity context for this container tag. Max 1500 characters. Used during document processing to guide memory extraction.
      - `dreaming` 'instant' | 'dynamic' — Processing mode. "dynamic" (default) groups related documents together so memories form from coherent, logical units rather than one isolated entry at a time. "instant" processes each document on its own right away, and bills one extra operation per document.
    - string[]
  - `content` unknown

## Response `200`

Documents added successfully

- object
  - `results` object[], required — Array of results for each document in the batch
    - `id` string, required — Unique identifier of the document (empty string for failed items)
    - `status` string, required — Status of the document (e.g. 'done', 'queued', 'error')
    - `error` string — Error message when status is 'error'
    - `details` string — Additional error details when status is 'error'
    - `url` string — URL of the failed item, when it had one. Only present on failed items, where it may be the only way to tell which input the error belongs to (the id falls back to 'unknown' when the input had neither an id nor a customId).
  - `failed` number, required — Count of documents that failed to add
  - `success` number, required — Count of documents successfully added

## Other responses

- `401` — Unauthorized
- `402` — Document token limit reached
- `500` — Internal server error

---

[API](https://skmtc.dev/supermemory/apis/supermemory-api.md) · [All operations](https://skmtc.dev/supermemory/apis/supermemory-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supermemory/supermemory-api/revisions/b8c2dbc8f2b5/schema)
