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 'Authorization: Bearer <token>' \
  --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>",
        "name": "<string>",
        "binning_strategy": "quartiles",
        "clustering_method": "kmeans",
        "n_clusters": 10
      }
    ],
    "max_sequence_duration_days": 183
  },
  "min_support": 10
}
'
import requests

url = "https://api.mixpeek.com/v1/taxonomies/{taxonomy_id}/analytics/transitions"

payload = {
"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>",
"name": "<string>",
"binning_strategy": "quartiles",
"clustering_method": "kmeans",
"n_clusters": 10
}
],
"max_sequence_duration_days": 183
},
"min_support": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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>',
name: '<string>',
binning_strategy: 'quartiles',
clustering_method: 'kmeans',
n_clusters: 10
}
],
max_sequence_duration_days: 183
},
min_support: 10
})
};

fetch('https://api.mixpeek.com/v1/taxonomies/{taxonomy_id}/analytics/transitions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/taxonomies/{taxonomy_id}/analytics/transitions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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>',
'name' => '<string>',
'binning_strategy' => 'quartiles',
'clustering_method' => 'kmeans',
'n_clusters' => 10
]
],
'max_sequence_duration_days' => 183
],
'min_support' => 10
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.mixpeek.com/v1/taxonomies/{taxonomy_id}/analytics/transitions"

payload := strings.NewReader("{\n \"collection_id\": \"<string>\",\n \"taxonomy_id\": \"<string>\",\n \"from_step\": \"<string>\",\n \"to_step\": \"<string>\",\n \"max_window_days\": 183,\n \"filters\": {},\n \"override_step_analytics\": {\n \"timestamp_field\": \"<string>\",\n \"sequence_id_field\": \"<string>\",\n \"step_key_source\": \"assignment_label\",\n \"step_key_field_path\": \"metadata.workflow_stage\",\n \"covariates\": [\n {\n \"field_path\": \"<string>\",\n \"name\": \"<string>\",\n \"binning_strategy\": \"quartiles\",\n \"clustering_method\": \"kmeans\",\n \"n_clusters\": 10\n }\n ],\n \"max_sequence_duration_days\": 183\n },\n \"min_support\": 10\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.mixpeek.com/v1/taxonomies/{taxonomy_id}/analytics/transitions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collection_id\": \"<string>\",\n \"taxonomy_id\": \"<string>\",\n \"from_step\": \"<string>\",\n \"to_step\": \"<string>\",\n \"max_window_days\": 183,\n \"filters\": {},\n \"override_step_analytics\": {\n \"timestamp_field\": \"<string>\",\n \"sequence_id_field\": \"<string>\",\n \"step_key_source\": \"assignment_label\",\n \"step_key_field_path\": \"metadata.workflow_stage\",\n \"covariates\": [\n {\n \"field_path\": \"<string>\",\n \"name\": \"<string>\",\n \"binning_strategy\": \"quartiles\",\n \"clustering_method\": \"kmeans\",\n \"n_clusters\": 10\n }\n ],\n \"max_sequence_duration_days\": 183\n },\n \"min_support\": 10\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.mixpeek.com/v1/taxonomies/{taxonomy_id}/analytics/transitions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collection_id\": \"<string>\",\n \"taxonomy_id\": \"<string>\",\n \"from_step\": \"<string>\",\n \"to_step\": \"<string>\",\n \"max_window_days\": 183,\n \"filters\": {},\n \"override_step_analytics\": {\n \"timestamp_field\": \"<string>\",\n \"sequence_id_field\": \"<string>\",\n \"step_key_source\": \"assignment_label\",\n \"step_key_field_path\": \"metadata.workflow_stage\",\n \"covariates\": [\n {\n \"field_path\": \"<string>\",\n \"name\": \"<string>\",\n \"binning_strategy\": \"quartiles\",\n \"clustering_method\": \"kmeans\",\n \"n_clusters\": 10\n }\n ],\n \"max_sequence_duration_days\": 183\n },\n \"min_support\": 10\n}"

response = http.request(request)
puts response.read_body
{
  "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": {}
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

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')

Examples:

"inquiry"

"draft"

"violation_detected"

to_step
string
required

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

Examples:

"closed_won"

"published"

"resolved"

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 | null

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

override_step_analytics
StepAnalyticsConfig · object | null

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 | null

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.)