Create a segment
flow_create_segmentCreates a segment: contacts matched by a filter, kept up to date by Bind. Its member count is worked out after it is saved; read it with flow_get_segment. The answer gives its id and link. filters is one group, e.g. {"operator":"AND","conditions":[{"field":"city","operator":"equals","value":"Zagreb"}]}; a condition is {field, operator, value} or a nested group (5 levels at most). Fields: name, lastName, email, city, address, note (operators equals, notEquals, contains, notContains, startsWith, endsWith, isEmpty, isNotEmpty); status (VERIFIED, UNVERIFIED, INVALID_NUMBER) and gender (Male, Female, Non-binary, Unknown) with equals, notEquals, in, notIn; prefixCountryId, countryId, networkId with the same four, as ids (a country object from flow_get_segment is taken by its id); birthDate (YYYY-MM-DD) with equals, notEquals, before, after, between [from, to]. in and notIn take an array.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"filters": "<filters>"
},
"name": "flow_create_segment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| brandId | No | The id of the brand this change is for: the active brand (flow_whoami). Required when the connection covers several brands; the change is refused when another brand is active. | |
| filters | Yes | The filter group; see the description |