Skip to content

Tool

create_segment

Create a segment

SurfacesChat agentMCPCLI

Save a multi-condition SEGMENT of an audience (a reusable rule-based slice, e.g. 'members tagged vip who opened the last campaign'). Requires a human approval step in chat — the approval card shows the segment name and how many members currently match (a live preview of the conditions). For a 'saved' segment, provide `conditions` (a match mode + rules); a 'static' segment has none (members are added manually later). To just PREVIEW reach without saving, use preview_segment instead. `newsletter:send` permission is required.

CLI: tinbox create-segment

Parameters

NameTypeRequiredDescription
audienceIdstringyesThe audience the segment belongs to.
namestringyesA name for the segment.
typesavedstaticno'saved' (rule-based, default) or 'static' (manual membership).
conditionsone ofnoThe rule tree for a saved segment (omit for static).
▸expand conditions
  • option 1object
    • match allanyrequired
    • ▸rules object[]required

      array items — object

      • field stringrequired
      • op stringrequired
      • value object
  • option 2null

Example

json
{
  "audienceId": "aud_…",
  "name": "<name>"
}