Get Funnel Step Sessions
Returns sessions that either reached or dropped off at a specific funnel step. Useful for analyzing user behavior at each stage.
POST /api/sites/:site/funnels/:stepNumber/sessionsReturns sessions that either reached or dropped off at a specific funnel step. Useful for analyzing user behavior at each stage.
Path Parameters
Prop
Type
Query Parameters
Accepts all Common Parameters plus the following:
Prop
Type
Request Body
Prop
Type
Response
Prop
Type
Session Object
Session fields other than traits (the identified user's current profile) are computed from the events inside the requested time range. Sessions are ordered by session_end, newest first.
Prop
Type
Returns 400 for fewer than 2 steps, a stepNumber outside the steps, an invalid mode, or an invalid replays_only.
curl -X POST "https://app.rybbit.io/api/sites/1/funnels/2/sessions?mode=dropped&page=1" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"steps": [
{ "type": "page", "value": "/", "name": "Homepage" },
{ "type": "page", "value": "/pricing", "name": "Pricing" },
{ "type": "page", "value": "/signup", "name": "Signup" }
]
}'const response = await fetch(
'https://app.rybbit.io/api/sites/1/funnels/3/sessions?mode=reached&page=1',
{
method: 'POST',
headers: {
'Authorization': 'Bearer your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
steps: [
{ type: 'page', value: '/', name: 'Homepage' },
{ type: 'page', value: '/pricing', name: 'Pricing' },
{ type: 'page', value: '/signup', name: 'Signup' }
]
})
}
);
const data = await response.json();import requests
response = requests.post(
'https://app.rybbit.io/api/sites/1/funnels/2/sessions',
params={
'mode': 'dropped',
'page': 1
},
json={
'steps': [
{ 'type': 'page', 'value': '/', 'name': 'Homepage' },
{ 'type': 'page', 'value': '/pricing', 'name': 'Pricing' },
{ 'type': 'page', 'value': '/signup', 'name': 'Signup' }
]
},
headers={
'Authorization': 'Bearer your_api_key_here'
}
)
data = response.json()$body = [
'steps' => [
['type' => 'page', 'value' => '/', 'name' => 'Homepage'],
['type' => 'page', 'value' => '/pricing', 'name' => 'Pricing'],
['type' => 'page', 'value' => '/signup', 'name' => 'Signup']
]
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://app.rybbit.io/api/sites/1/funnels/2/sessions?mode=dropped&page=1');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer your_api_key_here',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);require 'net/http'
require 'json'
uri = URI('https://app.rybbit.io/api/sites/1/funnels/2/sessions?mode=dropped&page=1')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer your_api_key_here'
request['Content-Type'] = 'application/json'
request.body = {
steps: [
{ type: 'page', value: '/', name: 'Homepage' },
{ type: 'page', value: '/pricing', name: 'Pricing' },
{ type: 'page', value: '/signup', name: 'Signup' }
]
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
data = JSON.parse(response.body)body := map[string]interface{}{
"steps": []map[string]string{
{"type": "page", "value": "/", "name": "Homepage"},
{"type": "page", "value": "/pricing", "name": "Pricing"},
{"type": "page", "value": "/signup", "name": "Signup"},
},
}
jsonBody, _ := json.Marshal(body)
req, _ := http.NewRequest("POST", "https://app.rybbit.io/api/sites/1/funnels/2/sessions?mode=dropped&page=1", bytes.NewBuffer(jsonBody))
req.Header.Set("Authorization", "Bearer your_api_key_here")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)let body = serde_json::json!({
"steps": [
{"type": "page", "value": "/", "name": "Homepage"},
{"type": "page", "value": "/pricing", "name": "Pricing"},
{"type": "page", "value": "/signup", "name": "Signup"}
]
});
let client = reqwest::Client::new();
let res = client
.post("https://app.rybbit.io/api/sites/1/funnels/2/sessions?mode=dropped&page=1")
.header("Authorization", "Bearer your_api_key_here")
.json(&body)
.send()
.await?;
let data: serde_json::Value = res.json().await?;String json = """
{
"steps": [
{"type": "page", "value": "/", "name": "Homepage"},
{"type": "page", "value": "/pricing", "name": "Pricing"},
{"type": "page", "value": "/signup", "name": "Signup"}
]
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.rybbit.io/api/sites/1/funnels/2/sessions?mode=dropped&page=1"))
.header("Authorization", "Bearer your_api_key_here")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());var body = new
{
steps = new[]
{
new { type = "page", value = "/", name = "Homepage" },
new { type = "page", value = "/pricing", name = "Pricing" },
new { type = "page", value = "/signup", name = "Signup" }
}
};
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer your_api_key_here");
var content = new StringContent(
JsonSerializer.Serialize(body),
Encoding.UTF8,
"application/json");
var response = await client.PostAsync(
"https://app.rybbit.io/api/sites/1/funnels/2/sessions?mode=dropped&page=1",
content);
var data = await response.Content.ReadAsStringAsync();{
"data": [
{
"session_id": "sess_abc123",
"user_id": "user_xyz789",
"identified_user_id": "",
"traits": null,
"country": "US",
"region": "US-CA",
"city": "San Francisco",
"language": "en-US",
"device_type": "desktop",
"browser": "Chrome",
"browser_version": "128.0",
"operating_system": "macOS",
"operating_system_version": "14.5",
"screen_width": 1920,
"screen_height": 1080,
"referrer": "https://google.com",
"channel": "Organic Search",
"hostname": "example.com",
"page_title": "Home",
"querystring": "",
"utm_source": "",
"utm_medium": "",
"utm_campaign": "",
"utm_term": "",
"utm_content": "",
"session_start": "2024-01-31 14:00:00",
"session_end": "2024-01-31 14:02:05",
"session_duration": 125,
"entry_page": "/",
"exit_page": "/pricing",
"pageviews": 3,
"events": 0,
"errors": 0,
"outbound": 0,
"ip": null,
"lat": 37.77,
"lon": -122.42,
"tag": "",
"has_replay": 0
}
]
}Analyze FunnelPOST
Analyzes a funnel and returns step-by-step conversion data. Sessions must complete steps in order (step 2 must occur after step 1, etc.).
Create FunnelPOST
Creates or updates a saved funnel. If `reportId` is provided, updates the existing funnel. Requires the member role or above on the site (the `funnels:write` permission).