curl --request PUT \
--url https://api.comm.com/api/v1/segments/{segment} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"query": {
"condition": "AND",
"rules": [
{
"field": "clicked_count",
"operator": "greater",
"value": 0
},
{
"field": "country_id",
"operator": "equal",
"value": 225
},
{
"condition": "OR",
"rules": [
{
"field": "leads_count",
"operator": "equal",
"value": 1
},
{
"field": "sales_count",
"operator": "equal",
"value": 1
}
]
},
{
"field": "date_created",
"operator": "equal",
"value": "2023-07-05"
}
]
}
}'
{
"data": {
"id": "<string>",
"type": "<string>",
"name": "<string>",
"query": "<string>",
"is_active": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
curl --request PUT \
--url https://api.comm.com/api/v1/segments/{segment} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"query": {
"condition": "AND",
"rules": [
{
"field": "clicked_count",
"operator": "greater",
"value": 0
},
{
"field": "country_id",
"operator": "equal",
"value": 225
},
{
"condition": "OR",
"rules": [
{
"field": "leads_count",
"operator": "equal",
"value": 1
},
{
"field": "sales_count",
"operator": "equal",
"value": 1
}
]
},
{
"field": "date_created",
"operator": "equal",
"value": "2023-07-05"
}
]
}
}'
{
"data": {
"id": "<string>",
"type": "<string>",
"name": "<string>",
"query": "<string>",
"is_active": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The segment ID
SegmentResource
The response is of type object
.