Skip to content
IForevents Docs
IForevents Docs
HomeDashboardGitHubPrivacyTermsSecurityIntroduction
Support and SLA

Break one event down by a property value

POST
/v1/analytics/segments

Authorization

AuthorizationBearer <token>

Session token issued by the accounts service (or the legacy /v1/auth routes).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/analytics/segments" \  -H "Content-Type: application/json" \  -d '{    "end": "2026-09-13T12:30:45Z",    "event_name": "checkout_completed",    "limit": 20,    "property_key": "plan",    "start": "2026-08-14T00:00:00Z"  }'
{  "segments": {    "buckets": [      {        "events": 402,        "users": 310,        "value": "pro"      },      {        "events": 131,        "users": 120,        "value": "free"      }    ],    "event_name": "checkout_completed",    "property_key": "plan"  }}
end?string
Formatdate-time
event_name*string
limit?integer
property_key*string
start?string
Formatdate-time
values?array<string>

Optional subset of property values to report.