Skip to Content

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

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

SubcommandEndpoint
segments [--search --page --limit]GET /api/v1/app/segments
segments statsGET /api/v1/app/segments/stats
segment <id>GET /api/v1/app/segments/:id
segment <id> contacts [--page --limit]GET /api/v1/app/segments/:id/contacts
segment <id> countGET /api/v1/app/segments/:id/count
segment <id> refresh / recomputePOST /api/v1/app/segments/:id/refresh

Write

# 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>
SubcommandEndpoint
segment create --name --filters …POST /api/v1/app/segments
segment update <id> [flags…] (alias: edit)PATCH /api/v1/app/segments/:id
segment delete <id> (aliases: rm, remove)DELETE /api/v1/app/segments/:id

Filter DSL reference

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

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

Fields (from CreateSegmentDialog):

FieldTypeNotes
displayNametextContact’s display name
phoneNumbertextE.164 phone, e.g. +91…
emailtext
tagsarray of stringsUse includes / notIncludes
hasOptedOutboolMarketing opt-in flag
isBlockedbool
createdAttimestampISO 8601
updatedAttimestampISO 8601

Operators:

OperatorWorks on
equals, notEqualstext, bool
contains, notContainstext
startsWith, endsWithtext
isEmpty, isNotEmptytext (value omitted)
includes, notIncludesarray (tags)

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

# 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
  • Tagstags is the most-used segment field
  • Broadcasts — pass --segment-ids to send to a segment