Segments
Create a segment
Creates a new segment. Returns 201 with the created segment and Location header.
post/segments
Request
- Base URLhttps://api.qonversion.io/v4
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Idempotency-Keystring
Idempotency key for safe retries.
Request body
Example request
{
"name": "Premium Users",
"conditions": [
{
"metric": "environment",
"comparator": "eq",
"value": "prod",
"negate": false
}
]
}Response
Segment created
Example response
{
"object": "segment",
"id": "premium-users",
"url": "/v4/segments/premium-users",
"name": "Premium Users",
"conditions": [
{
"metric": "environment",
"comparator": "eq",
"value": "prod"
}
],
"created_at": "2025-09-15T12:30:00Z",
"updated_at": "2025-11-03T10:26:40Z"
}Changes
No recorded changes to this operation across all 1 revision of this API.