Skip to main content
POST
/
v1
/
taxonomies
/
{taxonomy_id}
/
analytics
/
transitions
Compute step transition analytics
curl --request POST \
  --url https://api.mixpeek.com/v1/taxonomies/{taxonomy_id}/analytics/transitions \
  --header 'Content-Type: application/json' \
  --data '
{
  "collection_id": "<string>",
  "taxonomy_id": "<string>",
  "from_step": "<string>",
  "to_step": "<string>",
  "max_window_days": 183,
  "filters": {},
  "override_step_analytics": {
    "timestamp_field": "<string>",
    "sequence_id_field": "<string>",
    "step_key_source": "assignment_label",
    "step_key_field_path": "metadata.workflow_stage",
    "covariates": [
      {
        "field_path": "<string>",
        "covariate_type": "categorical",
        "name": "<string>",
        "binning_strategy": "quartiles",
        "clustering_method": "kmeans",
        "n_clusters": 10
      }
    ],
    "max_sequence_duration_days": 183
  },
  "min_support": 10
}
'
{
  "from_step": "<string>",
  "to_step": "<string>",
  "count": 1,
  "converted": 1,
  "conversion_rate": 0.5,
  "durations_sec": {
    "mean": 123,
    "median": 123,
    "p50": 123,
    "p90": 123,
    "p95": 123,
    "std_dev": 123,
    "min": 123,
    "max": 123
  },
  "top_predictors": [
    {
      "field": "<string>",
      "value": "<string>",
      "count": 1,
      "conversion_rate": 0.5,
      "lift": 123
    }
  ],
  "metadata": {}
}

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.

X-Namespace
string

REQUIRED: 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'

Path Parameters

taxonomy_id
string
required

Body

application/json

API request model for step transition analytics.

This model extends the engine query model with API-specific validation and documentation.

Use this to analyze how documents transition from one taxonomy step to another, computing conversion rates, durations, and predictor lifts.

Example: json { "collection_id": "col_emails", "taxonomy_id": "tax_sales_stages", "from_step": "inquiry", "to_step": "closed_won", "max_window_days": 90, "min_support": 10 }

Response includes: - Conversion rate (% reaching to_step) - Duration statistics (mean, median, p90, p95) - Top predictors (covariates with highest lift)

collection_id
string
required

Collection to analyze for step transitions

taxonomy_id
string
required

Taxonomy ID (each taxonomy_id is immutable, clone creates new ID)

from_step
string
required

Starting step label (e.g., 'inquiry', 'draft')

to_step
string
required

Ending step label (e.g., 'closed_won', 'published')

max_window_days
integer | null

Maximum days between from_step and to_step. Sequences exceeding this are excluded.

Required range: 1 <= x <= 365
filters
Filters · object

Optional filters for events (e.g., {'metadata.region': 'US'})

override_step_analytics
StepAnalyticsConfig · object

Override taxonomy's default step_analytics config for this query

min_support
integer
default:10

Minimum number of sequences required for valid analysis

Required range: x >= 1

Response

Successful Response

API response model for step transition analytics.

Contains comprehensive statistics about the A→B transition including conversion metrics, duration analysis, and predictor insights.

Example Response: json { "from_step": "inquiry", "to_step": "closed_won", "count": 1000, "converted": 350, "conversion_rate": 0.35, "durations_sec": { "mean": 432000.0, "median": 345600.0, "p50": 345600.0, "p90": 691200.0, "p95": 864000.0, "std_dev": 172800.0, "min": 86400.0, "max": 1209600.0 }, "top_predictors": [ { "field": "Sender Domain", "value": "enterprise.com", "count": 150, "conversion_rate": 0.75, "lift": 2.14 } ], "metadata": { "collection_id": "col_emails", "taxonomy_id": "tax_sales_stages", "total_events_analyzed": 5432 } }

from_step
string
required

Starting step

to_step
string
required

Ending step

count
integer
required

Total number of sequences starting at from_step

Required range: x >= 0
converted
integer
required

Number of sequences that reached to_step

Required range: x >= 0
conversion_rate
number
required

Percentage that converted (converted / count)

Required range: 0 <= x <= 1
durations_sec
DurationStats · object

Duration statistics (None if no conversions)

top_predictors
PredictorLift · object[]

Covariates with highest lift (sorted by absolute lift)

Maximum array length: 50
metadata
Metadata · object

Additional metadata (collection_id, event counts, etc.)