Skip to main content
POST
/
v1
/
documents
/
list
/
batch
Run multiple list-documents queries concurrently.
curl --request POST \
  --url https://api.mixpeek.com/v1/documents/list/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "queries": [
    {
      "key": "<string>",
      "request": {
        "filters": {
          "AND": [
            {
              "field": "name",
              "operator": "eq",
              "value": "John"
            },
            {
              "field": "age",
              "operator": "gte",
              "value": 30
            }
          ],
          "OR": [
            {
              "field": "status",
              "operator": "eq",
              "value": "active"
            },
            {
              "field": "role",
              "operator": "eq",
              "value": "admin"
            }
          ],
          "NOT": [
            {
              "field": "department",
              "operator": "eq",
              "value": "HR"
            },
            {
              "field": "location",
              "operator": "eq",
              "value": "remote"
            }
          ],
          "case_sensitive": true
        },
        "sort": {
          "field": "created_at",
          "direction": "desc"
        },
        "search": "<string>",
        "cursor": "<string>",
        "return_presigned_urls": false,
        "return_vectors": false,
        "return_vector_names": false,
        "group_by": "source_object_id",
        "select": [
          "metadata.title",
          "content"
        ],
        "expand": [
          "customer_id"
        ],
        "limit": 10,
        "offset": 0,
        "collection_ids": [
          "<string>"
        ]
      }
    }
  ]
}
'
import requests

url = "https://api.mixpeek.com/v1/documents/list/batch"

payload = { "queries": [
{
"key": "<string>",
"request": {
"filters": {
"AND": [
{
"field": "name",
"operator": "eq",
"value": "John"
},
{
"field": "age",
"operator": "gte",
"value": 30
}
],
"OR": [
{
"field": "status",
"operator": "eq",
"value": "active"
},
{
"field": "role",
"operator": "eq",
"value": "admin"
}
],
"NOT": [
{
"field": "department",
"operator": "eq",
"value": "HR"
},
{
"field": "location",
"operator": "eq",
"value": "remote"
}
],
"case_sensitive": True
},
"sort": {
"field": "created_at",
"direction": "desc"
},
"search": "<string>",
"cursor": "<string>",
"return_presigned_urls": False,
"return_vectors": False,
"return_vector_names": False,
"group_by": "source_object_id",
"select": ["metadata.title", "content"],
"expand": ["customer_id"],
"limit": 10,
"offset": 0,
"collection_ids": ["<string>"]
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
queries: [
{
key: '<string>',
request: {
filters: {
AND: [
{field: 'name', operator: 'eq', value: 'John'},
{field: 'age', operator: 'gte', value: 30}
],
OR: [
{field: 'status', operator: 'eq', value: 'active'},
{field: 'role', operator: 'eq', value: 'admin'}
],
NOT: [
{field: 'department', operator: 'eq', value: 'HR'},
{field: 'location', operator: 'eq', value: 'remote'}
],
case_sensitive: true
},
sort: {field: 'created_at', direction: 'desc'},
search: '<string>',
cursor: '<string>',
return_presigned_urls: false,
return_vectors: false,
return_vector_names: false,
group_by: 'source_object_id',
select: ['metadata.title', 'content'],
expand: ['customer_id'],
limit: 10,
offset: 0,
collection_ids: ['<string>']
}
}
]
})
};

fetch('https://api.mixpeek.com/v1/documents/list/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/documents/list/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'queries' => [
[
'key' => '<string>',
'request' => [
'filters' => [
'AND' => [
[
'field' => 'name',
'operator' => 'eq',
'value' => 'John'
],
[
'field' => 'age',
'operator' => 'gte',
'value' => 30
]
],
'OR' => [
[
'field' => 'status',
'operator' => 'eq',
'value' => 'active'
],
[
'field' => 'role',
'operator' => 'eq',
'value' => 'admin'
]
],
'NOT' => [
[
'field' => 'department',
'operator' => 'eq',
'value' => 'HR'
],
[
'field' => 'location',
'operator' => 'eq',
'value' => 'remote'
]
],
'case_sensitive' => true
],
'sort' => [
'field' => 'created_at',
'direction' => 'desc'
],
'search' => '<string>',
'cursor' => '<string>',
'return_presigned_urls' => false,
'return_vectors' => false,
'return_vector_names' => false,
'group_by' => 'source_object_id',
'select' => [
'metadata.title',
'content'
],
'expand' => [
'customer_id'
],
'limit' => 10,
'offset' => 0,
'collection_ids' => [
'<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.mixpeek.com/v1/documents/list/batch"

payload := strings.NewReader("{\n \"queries\": [\n {\n \"key\": \"<string>\",\n \"request\": {\n \"filters\": {\n \"AND\": [\n {\n \"field\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"John\"\n },\n {\n \"field\": \"age\",\n \"operator\": \"gte\",\n \"value\": 30\n }\n ],\n \"OR\": [\n {\n \"field\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"active\"\n },\n {\n \"field\": \"role\",\n \"operator\": \"eq\",\n \"value\": \"admin\"\n }\n ],\n \"NOT\": [\n {\n \"field\": \"department\",\n \"operator\": \"eq\",\n \"value\": \"HR\"\n },\n {\n \"field\": \"location\",\n \"operator\": \"eq\",\n \"value\": \"remote\"\n }\n ],\n \"case_sensitive\": true\n },\n \"sort\": {\n \"field\": \"created_at\",\n \"direction\": \"desc\"\n },\n \"search\": \"<string>\",\n \"cursor\": \"<string>\",\n \"return_presigned_urls\": false,\n \"return_vectors\": false,\n \"return_vector_names\": false,\n \"group_by\": \"source_object_id\",\n \"select\": [\n \"metadata.title\",\n \"content\"\n ],\n \"expand\": [\n \"customer_id\"\n ],\n \"limit\": 10,\n \"offset\": 0,\n \"collection_ids\": [\n \"<string>\"\n ]\n }\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.mixpeek.com/v1/documents/list/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"queries\": [\n {\n \"key\": \"<string>\",\n \"request\": {\n \"filters\": {\n \"AND\": [\n {\n \"field\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"John\"\n },\n {\n \"field\": \"age\",\n \"operator\": \"gte\",\n \"value\": 30\n }\n ],\n \"OR\": [\n {\n \"field\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"active\"\n },\n {\n \"field\": \"role\",\n \"operator\": \"eq\",\n \"value\": \"admin\"\n }\n ],\n \"NOT\": [\n {\n \"field\": \"department\",\n \"operator\": \"eq\",\n \"value\": \"HR\"\n },\n {\n \"field\": \"location\",\n \"operator\": \"eq\",\n \"value\": \"remote\"\n }\n ],\n \"case_sensitive\": true\n },\n \"sort\": {\n \"field\": \"created_at\",\n \"direction\": \"desc\"\n },\n \"search\": \"<string>\",\n \"cursor\": \"<string>\",\n \"return_presigned_urls\": false,\n \"return_vectors\": false,\n \"return_vector_names\": false,\n \"group_by\": \"source_object_id\",\n \"select\": [\n \"metadata.title\",\n \"content\"\n ],\n \"expand\": [\n \"customer_id\"\n ],\n \"limit\": 10,\n \"offset\": 0,\n \"collection_ids\": [\n \"<string>\"\n ]\n }\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mixpeek.com/v1/documents/list/batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"queries\": [\n {\n \"key\": \"<string>\",\n \"request\": {\n \"filters\": {\n \"AND\": [\n {\n \"field\": \"name\",\n \"operator\": \"eq\",\n \"value\": \"John\"\n },\n {\n \"field\": \"age\",\n \"operator\": \"gte\",\n \"value\": 30\n }\n ],\n \"OR\": [\n {\n \"field\": \"status\",\n \"operator\": \"eq\",\n \"value\": \"active\"\n },\n {\n \"field\": \"role\",\n \"operator\": \"eq\",\n \"value\": \"admin\"\n }\n ],\n \"NOT\": [\n {\n \"field\": \"department\",\n \"operator\": \"eq\",\n \"value\": \"HR\"\n },\n {\n \"field\": \"location\",\n \"operator\": \"eq\",\n \"value\": \"remote\"\n }\n ],\n \"case_sensitive\": true\n },\n \"sort\": {\n \"field\": \"created_at\",\n \"direction\": \"desc\"\n },\n \"search\": \"<string>\",\n \"cursor\": \"<string>\",\n \"return_presigned_urls\": false,\n \"return_vectors\": false,\n \"return_vector_names\": false,\n \"group_by\": \"source_object_id\",\n \"select\": [\n \"metadata.title\",\n \"content\"\n ],\n \"expand\": [\n \"customer_id\"\n ],\n \"limit\": 10,\n \"offset\": 0,\n \"collection_ids\": [\n \"<string>\"\n ]\n }\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "results": [
    {
      "key": "<string>",
      "response": {
        "pagination": {
          "has_more": false,
          "limit": 10,
          "offset": 0,
          "total_count": 1
        },
        "results": [
          {
            "collection_id": "col_articles",
            "document_id": "doc_123",
            "metadata": {
              "title": "AI Article"
            }
          }
        ],
        "stats": {
          "avg_blobs_per_document": 1,
          "total_documents": 1
        }
      },
      "error": "<string>"
    }
  ]
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Batch-execute multiple namespace-scoped list-documents queries in parallel.

Intended to collapse dossier / multi-collection UI N+1 patterns into one round-trip. Canvas pages that fan out 5–10 parallel list_documents calls (e.g., scene counts + face clusters + scene archetypes filtered by the same brand_slug) should bundle them here instead.

queries
BatchListQuery · object[]
required

Queries to execute concurrently against the same namespace.

Required array length: 1 - 10 elements

Response

Successful Response

Response for POST /v1/documents/list/batch.

results
BatchListResult · object[]
required

One entry per input query, in the same order as requested.