Skip to main content
POST
/
v1
/
compounding
/
trigger
Trigger compounding job
curl --request POST \
  --url https://app.nex.ai/api/developers/v1/compounding/trigger \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "job_type": "consolidation",
  "dry_run": false
}
'
{
  "job_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "job_type": "consolidation",
  "workspace_id": 123,
  "dry_run": true,
  "success": true,
  "insights_scanned": 123,
  "insights_affected": 123,
  "candidates_created": 123,
  "duration_ms": 123
}
This endpoint requires the record.write scope on your API key.

Overview

Triggers an on-demand compounding intelligence job for your workspace. Use this after onboarding, file scanning, or bulk context ingestion to run intelligence pipelines immediately instead of waiting for the next scheduled cron cycle.

Job Types

Job TypeDescription
consolidationMerge near-duplicate insights that refer to the same underlying fact
pattern_detectionDiscover recurring patterns across insights
playbook_synthesisGenerate actionable playbook rules from detected patterns
decay_sweepReduce confidence scores on stale insights that have not been reinforced recently
metricsSnapshot compounding pipeline metrics for the workspace

Dry Run

Set dry_run to true to preview what the job would do without persisting any changes. The response will still include insights_scanned, insights_affected, and candidates_created counts so you can evaluate the impact before committing.

Example

curl -X POST "https://app.nex.ai/api/developers/v1/compounding/trigger" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"job_type": "pattern_detection", "dry_run": false}'
{
  "job_run_id": "550e8400-e29b-41d4-a716-446655440000",
  "job_type": "pattern_detection",
  "workspace_id": 12345,
  "dry_run": false,
  "success": true,
  "insights_scanned": 42,
  "insights_affected": 3,
  "candidates_created": 2,
  "duration_ms": 1200
}

Authorizations

Authorization
string
header
required

API key for authentication (format: "Bearer YOUR_API_KEY")

Body

application/json

Job trigger request

job_type
enum<string>
required

The type of compounding job to run

Available options:
consolidation,
pattern_detection,
playbook_synthesis,
decay_sweep,
metrics
dry_run
boolean
default:false

If true, preview impact without persisting changes

Response

Job execution result

job_run_id
string<uuid>

Unique identifier for this job execution

job_type
enum<string>

The type of job that was executed

Available options:
consolidation,
pattern_detection,
playbook_synthesis,
decay_sweep,
metrics
workspace_id
integer

Workspace ID the job ran against

dry_run
boolean

Whether the job ran in dry-run mode

success
boolean

Whether the job completed successfully

insights_scanned
integer

Total number of insights evaluated during the job

insights_affected
integer

Number of insights modified (or that would be modified in dry-run mode)

candidates_created
integer

Number of new candidates (e.g., merge candidates, pattern candidates) produced

duration_ms
integer

Job execution time in milliseconds

Last modified on March 19, 2026