Segments
Operations
List segments for an app
Lists every segment belonging to the App, ordered by creation time.
Authorizations
Admin session cookie set by POST /v1/auth/login. Dashboard-only management.
App REST key (rk_...). Server-to-server calls.
Parameters
Path Parameters
App ID
Query Parameters
Comma-separated extras; \
Responses
OK
Create a segment
Creates a device segment (a named rule set) scoped to the App.
Authorizations
Admin session cookie set by POST /v1/auth/login. Dashboard-only management.
App REST key (rk_...). Server-to-server calls.
Parameters
Path Parameters
App ID
Request Body
Responses
Created
Count multiple segments' matching devices in one request
Resolves each listed segment's rules and returns how many devices each matches, as an id → count map. Ids that don't exist or belong to another App are silently omitted.
Authorizations
Admin session cookie set by POST /v1/auth/login. Dashboard-only management.
App REST key (rk_...). Server-to-server calls.
Parameters
Path Parameters
App ID
Query Parameters
Comma-separated segment ids (max 100)
Responses
OK
Preview a rule set's audience
Validates and resolves a rule set that has not been saved as a segment yet, returning the estimated audience as {reach, reachable, by_platform{ios,android,web}, sample[], total_devices, group_reach[]}. The sample is a token-free device projection; group_reach is present only for two or more rule groups. Bounded by a 5s statement timeout (503 preview_timeout) and 60 requests/min per user and app (429 rate_limited).
Authorizations
Admin session cookie set by POST /v1/auth/login. Dashboard-only management.
App REST key (rk_...). Server-to-server calls.
Parameters
Path Parameters
App ID
Request Body
Responses
OK
Get a segment
Fetches a single segment by ID, scoped to the App, with pending_sends (scheduled notifications) and sends_30d (non-test notifications of the last 30 days).
Authorizations
Admin session cookie set by POST /v1/auth/login. Dashboard-only management.
App REST key (rk_...). Server-to-server calls.
Parameters
Path Parameters
App ID
Segment ID
Responses
OK
Delete a segment
Deletes a segment by ID, scoped to the App.
Authorizations
Admin session cookie set by POST /v1/auth/login. Dashboard-only management.
App REST key (rk_...). Server-to-server calls.
Parameters
Path Parameters
App ID
Segment ID
Responses
No Content
Update a segment
Partially updates a segment's name and/or rules. Fields omitted from the request keep their existing value.
Authorizations
Admin session cookie set by POST /v1/auth/login. Dashboard-only management.
App REST key (rk_...). Server-to-server calls.
Parameters
Path Parameters
App ID
Segment ID
Request Body
Responses
OK
List a segment's matching devices
Resolves a segment's rules into the devices it currently matches. The response is capped at 1000 devices; truncated reports whether the segment matches more than that (a preview, not a send).
Authorizations
Admin session cookie set by POST /v1/auth/login. Dashboard-only management.
App REST key (rk_...). Server-to-server calls.
Parameters
Path Parameters
App ID
Segment ID
Responses
{"devices": [deviceResponse], "truncated": bool}
Count a segment's matching devices
Resolves a segment's rules and returns how many devices currently match, without listing their tokens.
Authorizations
Admin session cookie set by POST /v1/auth/login. Dashboard-only management.
App REST key (rk_...). Server-to-server calls.
Parameters
Path Parameters
App ID
Segment ID
Responses
OK
Duplicate a segment
Creates a copy of the segment with the same rules and description, scoped to the App. The body is optional: with a name the copy takes exactly that name (409 segment_name_taken if used, 422 over 100 characters); without one it is named "{name} (copy)", then "{name} (copy 2)", ...
Authorizations
Admin session cookie set by POST /v1/auth/login. Dashboard-only management.
App REST key (rk_...). Server-to-server calls.
Parameters
Path Parameters
App ID
Segment ID
Request Body
Responses
Created