Update a saved subscriber segment
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/segments/{segmentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"filters": [
{}
],
"filterJoinOperator": "<string>",
"root": {}
}
'{
"success": true,
"segment": {
"id": "seg_active_non_buyers",
"name": "Active non-buyers - 30 days",
"filters": [
{
"id": "filter-1",
"field": "event",
"operator": "is_not",
"value": "saas.purchase:30d"
}
],
"filterJoinOperator": "and",
"format": "v2",
"root": {
"kind": "group",
"id": "root",
"joinOperator": "and",
"children": [
{
"kind": "filter",
"id": "filter-1",
"field": "event",
"operator": "is_not",
"value": "saas.purchase:30d"
}
]
}
}
}
filters or a nested root, not both.
and or or for legacy v1 filters.curl -X PATCH "https://api.sequenzy.com/api/v1/segments/seg_active_non_buyers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Active non-buyers - 30 days",
"root": {
"kind": "group",
"id": "root",
"joinOperator": "and",
"children": [
{
"kind": "filter",
"id": "filter-1",
"field": "event",
"operator": "is_not",
"value": "saas.purchase:30d"
}
]
}
}'
{
"success": true,
"segment": {
"id": "seg_active_non_buyers",
"name": "Active non-buyers - 30 days",
"filters": [
{
"id": "filter-1",
"field": "event",
"operator": "is_not",
"value": "saas.purchase:30d"
}
],
"filterJoinOperator": "and",
"format": "v2",
"root": {
"kind": "group",
"id": "root",
"joinOperator": "and",
"children": [
{
"kind": "filter",
"id": "filter-1",
"field": "event",
"operator": "is_not",
"value": "saas.purchase:30d"
}
]
}
}
}
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/segments/{segmentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"filters": [
{}
],
"filterJoinOperator": "<string>",
"root": {}
}
'{
"success": true,
"segment": {
"id": "seg_active_non_buyers",
"name": "Active non-buyers - 30 days",
"filters": [
{
"id": "filter-1",
"field": "event",
"operator": "is_not",
"value": "saas.purchase:30d"
}
],
"filterJoinOperator": "and",
"format": "v2",
"root": {
"kind": "group",
"id": "root",
"joinOperator": "and",
"children": [
{
"kind": "filter",
"id": "filter-1",
"field": "event",
"operator": "is_not",
"value": "saas.purchase:30d"
}
]
}
}
}