Manage Documents

Batch add documents

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

post/v3/documents/batch

Request body

containerTagstring

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.

containerTagsstring[]

(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.

metadataobject

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.

{"stackTrail":"paths:/v3/documents/batch:post:requestBody:content:application/json:schema:properties:content","oasType":"schema","type":"unknown"}

Example request

{
  "containerTag": "user_123",
  "containerTags": [
    "user_123",
    "project_123"
  ],
  "metadata": {
    "category": "technology",
    "isPublic": true,
    "readingTime": 5,
    "source": "web",
    "tag_1": "ai",
    "tag_2": "machine-learning"
  },
  "documents": [
    {
      "containerTag": "user_123",
      "containerTags": [
        "user_123",
        "project_123"
      ],
      "content": "This is a detailed article about machine learning concepts...",
      "customId": "mem_abc123",
      "metadata": {
        "category": "technology",
        "isPublic": true,
        "readingTime": 5,
        "source": "web",
        "tag_1": "ai",
        "tag_2": "machine-learning"
      }
    }
  ]
}

Response

Documents added successfully

idstring required

Unique identifier of the document

statusstring required

Status of the document

Changes