Segments
A segment is a named, dynamically-defined group of contacts that you can target with a campaign.
Overview
When you create or update a campaign, you choose a segment as its audience by setting segment_uuid to a segment's UUID. This endpoint group lets you list the segments available to your account and look one up, so you can find the UUID to use and check the segment's audience size first.
Segments are created and managed in the dashboard. The API exposes them read-only — there is no endpoint to create, update, or delete a segment.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /segments | List segments |
| GET | /segments/{uuid} | Get a specific segment |
Segment Object
| Field | Type | Description |
|---|---|---|
uuid | string | Unique identifier for the segment. Use it as a campaign's segment_uuid. |
name | string|null | Segment name. null when the segment has no name. |
contacts_count | integer | Number of contacts in the segment. See Audience size. |
contacts_count_calculated_at | string|null | ISO 8601 timestamp (UTC) of when contacts_count was last calculated, or null when it has never been calculated. |
created_at | string | ISO 8601 timestamp (UTC) |
updated_at | string | ISO 8601 timestamp (UTC) |
Audience size
contacts_count is the segment's audience size. It is a cached figure refreshed periodically, so it can be a few minutes out of date and is best treated as approximate. contacts_count_calculated_at is the timestamp of the last calculation; it is null until the count has been calculated for the first time, in which case contacts_count is 0.