Sync Collection Schema
Sample documents from Qdrant and automatically discover new fields to add to the collection’s output_schema.
This endpoint:
- Samples N documents from the collection (default: 1000)
- Discovers all fields present in actual documents
- Merges discovered fields into the collection’s output_schema (additive only)
- Optionally cascades schema updates to downstream collections
- Respects debounce window (max once per 5 minutes, unless force=true)
The sync operation is additive only - it never removes or changes existing field types.
Use this endpoint to:
- Manually trigger schema discovery after data ingestion
- Force an immediate schema sync (bypassing debounce)
- Update schemas with new fields discovered in documents
Headers
Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.
"Bearer YOUR_MIXPEEK_API_KEY"
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.
"ns_abc123def456"
"production"
"my-namespace"
Path Parameters
Collection ID to sync schema for
Body
Request to sync a collection's schema by sampling documents.
Used by:
- Manual API calls from users
- Automatic triggers from BatchJobPoller
Number of documents to sample for schema discovery
1 <= x <= 10000Force schema sync even if within debounce window. Default: false (respects 5-minute debounce)
Automatically update downstream collections that use this collection as source. Default: true
Response
Successful Response
- SchemaSyncResponse
- SchemaSyncSkippedResponse
Response from schema sync operation.
Whether schema sync succeeded
Collection that was synced
New schema version
Previous schema version
Total fields in output_schema
Number of documents sampled
List of new fields discovered
Downstream collections that were updated
Additional message or error

