curl -X POST "https://api.confidence.dev/v1/segments?segmentId=nordic-android" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Nordic Android users",
"targeting": {
"criteria": {
"nordics": {
"attribute": {
"attributeName": "country",
"setRule": {
"values": [
{"stringValue": "SE"},
{"stringValue": "DK"},
{"stringValue": "NO"},
{"stringValue": "FI"}
]
}
}
},
"ios": {
"attribute": {
"attributeName": "device.os",
"eqRule": {"value": {"stringValue": "ios"}}
}
}
},
"expression": {
"and": {
"operands": [
{"ref": "nordics"},
{"not": {"ref": "ios"}}
]
}
}
},
"allocation": {"proportion": {"value": "1.0"}}
}'