Skip to content
Splashify Pro
Docs

Segments

segments / segment mirror Settings → Segments — saved audience filters used to slice your contact list for broadcasts and reporting. Full CRUD plus per-segment introspection.

Quick start

bash
splashify segments                                # list, first page
splashify segments --page 2 --limit 50            # paginate
splashify segments --search vip                   # server-side name search
splashify segments stats                          # overall stats

splashify segment <id>                            # one segment
splashify segment <id> contacts                   # contacts in this segment
splashify segment <id> contacts --page 2 --limit 100
splashify segment <id> count                      # current member count
splashify segment <id> refresh                    # recompute count (for dynamic segments)

Command reference

Read

Write

bash
# Create — --filters JSON is required (see DSL below)
splashify segment create \
  --name "VIP iOS users" \
  --description "Tagged VIP, on iOS, marketing-opted-in" \
  --filters '{
    "conditions": [
      {"field": "tags",        "operator": "includes", "value": "VIP"},
      {"field": "hasOptedOut", "operator": "equals",   "value": false}
    ],
    "logic": "and"
  }' \
  --dynamic true \
  --active  true

# Update — every flag is optional; only what you pass is sent (PATCH semantics)
splashify segment update <id> --name "VIP — refreshed"
splashify segment update <id> --active false
splashify segment update <id> --filters '{"conditions":[…],"logic":"or"}'

# Delete
splashify segment delete <id>

Filter DSL reference

The --filters JSON is shipped to the backend verbatim. Shape:

json
{
  "conditions": [
    {"field": "<field>", "operator": "<operator>", "value": "<value>"},
    {"field": "<field>", "operator": "<operator>"}    // value omitted for isEmpty / isNotEmpty
  ],
  "logic": "and"   // or "or"
}

Fields (from CreateSegmentDialog):

Operators:

The web app (/settings/segments) is a visual builder for this DSL. Use it once to design a complex segment, then splashify segment <id> to see the JSON it produced, then build similar segments programmatically.

Common patterns

bash
# IDs of all active segments
splashify segments --limit 100 | jq -r '.segments[] | select(.is_active) | .id'

# Get a segment ID by exact name
splashify segments --search "VIP" | \
  jq -r '.segments[] | select(.name == "VIP") | .id'

# Use a segment ID in a broadcast
SEGMENT_ID=$(splashify segments --search "VIP" | jq -r '.segments[0].id')
splashify broadcast create --name "May launch" \
  --template payment_failed \
  --segment-ids "$SEGMENT_ID"

# Trigger refresh on every dynamic segment (e.g. nightly cron)
splashify segments --limit 100 | \
  jq -r '.segments[] | select(.is_dynamic) | .id' | \
  xargs -I{} splashify segment {} refresh
  • Contacts — segments filter over the contact list
  • Tags — tags is the most-used segment field
  • Broadcasts — pass --segment-ids to send to a segment