Lists & Segments
RadarSend uses the same broad audience system for static lists and dynamic segments.
In the external API:
- lists are static segments
- segments are rule-based dynamic audiences
Both are referenced with friendly keys instead of raw UUIDs.
Public identifier#
Use:
segment_key
In broadcast payloads, use:
include_segment_keysexclude_segment_keys
Required scopes#
lists:readlists:writesegments:readsegments:write
The scope needed depends on whether the object is a static list or a dynamic segment.
List all visible audiences#
GET /api/segments
For API-key callers, RadarSend filters the response by the key’s scopes:
- a key with only
lists:readsees static lists - a key with only
segments:readsees dynamic segments - a key with both sees both
Get one list or segment#
GET /api/segments/:segment_key
Example:
GET /api/segments/vip-list
The response includes cached member counts and a count field for compatibility.
Create a dynamic segment#
POST /api/segments
A definition is a rule tree: a top-level { logic, conditions } where logic
is and or or, and each condition carries a type that selects its shape
(field, custom_field, event, subscription, segment, visit,
page_view, activity, or a nested group). It is recursive — a group
condition nests another { logic, conditions }.
Example — contacts who opened any email in the last 30 days:
{
"name": "Openers last 30 days",
"type": "dynamic",
"definition": {
"logic": "and",
"conditions": [
{
"type": "event",
"event_type": "email_opened",
"frequency": "exists",
"time_window": { "type": "relative", "direction": "within", "value": 30, "unit": "days" }
}
]
}
}
The definition is stored as sent and is not schema-validated on write, so a
malformed tree is accepted here but fails when the segment is evaluated. Build
it in the app once and copy the shape if you are unsure.
Required scope:
segments:write
Create a static list#
POST /api/segments
Example:
{
"name": "VIP List",
"type": "static"
}
Required scope:
lists:write
Update a list or segment#
PUT /api/segments/:segment_key
The allowed write scope depends on the target object:
- static list ->
lists:write - dynamic segment ->
segments:write
Delete a list or segment#
DELETE /api/segments/:segment_key
Same write scope as an update. Returns 204. Deleting a static list drops its
memberships; no contact is deleted either way.
A list or segment that something still depends on can’t be deleted: the call
returns 409 SEGMENT_IN_USE, and error.details.usage lists what holds it, by
source (broadcasts, sequences, automations, forms, segments), each
entry an { id, name, status? }. That covers broadcasts not yet finished that
include or exclude it, non-archived sequences (entry trigger, list step,
condition or wait), automations (trigger or Add to list), non-archived forms
that add submitters to it, and other segments built on it. Remove it from
those, then delete again. A built-in segment returns 409 SYSTEM_SEGMENT_LOCKED.
Refresh counts#
POST /api/segments/:segment_key/refresh-count
Use this when you want RadarSend to recompute cached counts for a dynamic audience.
Create a segment from broadcast engagement#
POST /api/segments/from-broadcast
Example:
{
"name": "Clicked April launch",
"broadcast_id": "8b11b2d7-e546-4a0f-a959-c7c7796fdb10",
"criterion": "clickers"
}
Returns the created segment, keyed by segment_key like every other segment
response — use it as the path parameter on the endpoints above.
Required scope:
segments:write
Static list member operations#
These endpoints only apply to static lists.
Add members#
POST /api/segments/:segment_key/members
Example:
{
"contact_ids": [
"2ec8d707-7b2d-451f-b5ec-e4f041d2b844",
"39de8127-0e65-4e72-b344-b9017608fe35"
]
}
You can name contacts by email address instead, or as well:
{
"emails": ["ada@example.com", "grace@example.com"]
}
Emails are matched without regard to case. An address that matches no contact
is not created; it comes back in not_found, so create the contact first with
PUT /api/contacts if it might be new:
{
"added": 1,
"not_found": ["grace@example.com"]
}
not_found is present only when the request sent emails. Send up to 1,000
ids and 1,000 emails per call. A request that names nobody returns
400 MISSING_IDS.
Naming contacts by email with an API key needs contacts:read as well as
lists:write, because not_found tells you which addresses are contacts in
the account. Without it the call returns 403 INSUFFICIENT_SCOPE; send
contact_ids instead.
These endpoints work on static lists only. A dynamic segment returns
400 NOT_STATIC before anything else is checked.
Remove members#
DELETE /api/segments/:segment_key/members
Takes contact_ids, emails, or both, exactly as adding does, and returns
{ "removed": 1 } with not_found when emails were sent.
List members#
GET /api/segments/:segment_key/members
Supported query parameters:
cursorlimitsearch
Required scopes:
lists:writefor add/removelists:readfor list members
List membership check#
POST /api/segments/membership-check
Example:
{
"contact_ids": [
"2ec8d707-7b2d-451f-b5ec-e4f041d2b844"
]
}
This returns each contact’s static list memberships using segment_key.
Integration guidance#
- Use segment keys in your own config instead of storing raw segment UUIDs.
- Use static lists when your integration owns exact membership.
- Use dynamic segments when RadarSend should evaluate rules over time.
- Keep list membership operations separate from dynamic segment management in your integration logic.