Create Trigger
Create a new trigger for scheduled job execution.
Action Types:
cluster: Execute clustering on a cluster definitiontaxonomy_enrichment: Apply taxonomy enrichment to a collection
Schedule Types:
cron: Execute at specific times using cron expressions (e.g., “0 2 * * *” for daily at 2am)interval: Execute at fixed intervals (e.g., every 6 hours)event: Execute when specific events occur (e.g., after 100 documents added)conditional: Execute when conditions are met (e.g., drift threshold exceeded)
Examples:
Cluster trigger (daily at 2am):
{
"action_type": "cluster",
"action_config": {"cluster_id": "clust_abc123"},
"trigger_type": "cron",
"schedule_config": {"cron_expression": "0 2 * * *", "timezone": "UTC"},
"description": "Daily clustering at 2am"
}
Taxonomy enrichment trigger (every 6 hours):
{
"action_type": "taxonomy_enrichment",
"action_config": {
"taxonomy_id": "tax_products",
"collection_id": "col_inventory",
"batch_size": 1000
},
"trigger_type": "interval",
"schedule_config": {"interval_seconds": 21600},
"description": "Re-enrich products every 6 hours"
}
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
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"
Body
Request to create a new trigger.
Examples: Cluster trigger (cron): { "action_type": "cluster", "action_config": {"cluster_id": "clust_abc123"}, "trigger_type": "cron", "schedule_config": {"cron_expression": "0 2 * * *", "timezone": "UTC"}, "description": "Daily clustering at 2am" }
Taxonomy trigger (interval):
{
"action_type": "taxonomy_enrichment",
"action_config": {"taxonomy_id": "tax_products", "collection_id": "col_inv"},
"trigger_type": "interval",
"schedule_config": {"interval_seconds": 21600},
"description": "Re-enrich every 6 hours"
}Type of action to execute
cluster, taxonomy_enrichment, batch_rerun, collection_trigger Action-specific configuration
Type of schedule
cron, interval, event, conditional Schedule-specific configuration
Human-readable description
Initial status (active or paused)
active, paused, disabled, failed Response
Successful Response
Unified trigger model for all action types.
A trigger defines:
- What to execute (action_type + action_config)
- When to execute (trigger_type + schedule_config)
- State tracking (execution count, failures, next scheduled time)
Namespace ID
Organization internal ID
Type of action to execute
cluster, taxonomy_enrichment, batch_rerun, collection_trigger Action-specific configuration
Type of schedule
cron, interval, event, conditional Schedule-specific configuration
Unique trigger identifier
Current trigger status
active, paused, disabled, failed Last time trigger fired
Task ID of last execution
Next scheduled execution time
Total successful executions
Consecutive failures
Status of last execution
Error from last execution (if failed)
Current event count since last trigger
Last time cooldown was applied
Baseline snapshot for drift measurement (captured after successful execution)
Result of most recent drift measurement check
When condition was last evaluated
Human-readable description
Creation timestamp
Last update timestamp
User who created trigger

