Skip to main content
POST
/
v1
/
collections
/
{collection_identifier}
/
trigger
Trigger Collection Processing
curl --request POST \
  --url https://api.mixpeek.com/v1/collections/{collection_identifier}/trigger \
  --header 'Content-Type: application/json' \
  --data '
{
  "include_buckets": [
    "<string>"
  ],
  "include_collections": [
    "<string>"
  ],
  "object_ids": [
    "<string>"
  ],
  "source_filters": {
    "AND": [
      {
        "field": "status",
        "operator": "eq",
        "value": "pending"
      }
    ]
  }
}
'
{
  "batch_id": "<string>",
  "task_id": "<string>",
  "collection_id": "<string>",
  "total_tiers": 123,
  "message": "<string>",
  "source_bucket_ids": [
    "<string>"
  ],
  "source_collection_ids": [
    "<string>"
  ],
  "object_count": 123,
  "document_count": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.mixpeek.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Headers

Authorization
string

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

Examples:

"Bearer YOUR_API_KEY"

"Bearer YOUR_STRIPE_API_KEY"

authorization
string
X-Namespace
string

Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'. Falls back to ?namespace= query parameter if the header is omitted.

Examples:

"ns_abc123def456"

"production"

"my-namespace"

Path Parameters

collection_identifier
string
required

The ID or name of the collection to trigger

Body

application/json

Request to trigger (re)processing through a collection.

For bucket-sourced collections (tier 0): Discovers objects from source bucket(s) and creates a batch for processing. Use include_buckets to limit which source buckets to process from.

For collection-sourced collections (tier N): Processes existing documents from upstream collection(s). Use include_collections to limit which source collections to process from.

Use source_filters for field-level filtering on objects or documents.

Document Overwrite Behavior:

  • If source bucket has unique_key configured: Documents are UPSERTED (overwrites existing)
  • If source bucket has NO unique_key: New documents are CREATED (may cause duplicates)

To enable idempotent re-processing, configure unique_key on the source bucket.

include_buckets
string[] | null

Limit processing to objects from these specific buckets (IDs or names). Only applies to bucket-sourced collections. If not provided, all configured source buckets are used.

include_collections
string[] | null

Limit processing to documents from these specific collections (IDs or names). Only applies to collection-sourced collections. If not provided, all configured source collections are used.

object_ids
string[] | null

Limit processing to these specific object IDs. Only applies to bucket-sourced collections. This is a convenience shorthand — equivalent to using source_filters with {"AND": [{"field": "object_id", "operator": "in", "value": [...]}]}.

source_filters
LogicalOperator · object

Field-level filters for objects (bucket-sourced) or documents (collection-sourced). Uses LogicalOperator format (AND/OR/NOT). Use this to filter by metadata fields, status, or any other object/document properties.

Example:
{
"AND": [
{
"field": "status",
"operator": "eq",
"value": "pending"
}
]
}

Response

Successful Response

Response after triggering collection processing.

Use batch_id or task_id to monitor progress via GET /v1/batches/{batch_id} or GET /v1/tasks/{task_id}.

batch_id
string
required

ID of the created batch for tracking progress.

task_id
string
required

Task ID for monitoring via GET /v1/tasks/{task_id}.

collection_id
string
required

ID of the collection being processed.

total_tiers
integer
required

Number of processing tiers in the DAG.

message
string
required

Human-readable status message.

source_bucket_ids
string[] | null

Bucket IDs that objects were discovered from (bucket-sourced collections).

source_collection_ids
string[] | null

Collection IDs that documents were read from (collection-sourced collections).

object_count
integer | null

Total number of objects included in the batch (bucket-sourced collections).

document_count
integer | null

Total number of documents to process (collection-sourced collections).