Skip to content

Get segment

If you have questions regarding this API, please visit our API FAQ page.

Retrieving a segment

Make a GET request to https://webapi.inboxroad.com/api/v2/segments/{segment_id}/ with a valid X-API-Key. The response includes the segment’s full rule definition.

Terminal window
curl -X GET 'https://webapi.inboxroad.com/api/v2/segments/{segment_id}/' \
-H 'X-API-Key: <your_token>' \
-H 'Content-Type: application/json'

Path parameters

Param nameDescription
segment_idUnique identifier of the segment (UUID).

Response fields

Field nameDescription
idUnique identifier of the segment (UUID).
nameName of the segment.
colorHex color assigned to the segment.
descriptionDescription of the segment (may be null).
rules_jsonThe segment definition. See Segment rules.
contact_list_idsContact list ids (UUIDs) the segment draws from.
statusBuild state: PENDING, RUNNING, DONE, or FAILED.
total_countNumber of matching contacts. Only meaningful when status is DONE.
created_atDate and time the segment was created.
updated_atDate and time the segment was last updated.
display_fieldsDefault columns to surface when rendering this segment’s contacts (see below).

Display field object (display_fields[])

Field nameDescription
labelHuman-readable field label.
contact_column_nameUnderlying contact column key.
data_typeData type of the field.
choicesAllowed values for choice fields, or null.

Example response

{
"id": "92a6ef72-c74e-4e37-bd84-9e8fbb83fef4",
"name": "Active Gmail Subscribers",
"color": "#7cb7de",
"description": "Subscribed users who opened in the last 30 days",
"rules_json": {
"any": [
{
"all": [
{ "kind": "field", "field": "status", "operator": "equals", "value": "subscribed" },
{ "kind": "activity", "metric": "open", "operator": "count_gte", "value": 1,
"days_window": { "mode": "last", "days": 30 } }
]
}
]
},
"contact_list_ids": ["0fd3d5b4-1c0a-4e91-8a4f-0f17dc6dc5ab"],
"status": "DONE",
"total_count": 1824,
"created_at": "2026-05-10T09:00:00Z",
"updated_at": "2026-05-21T11:15:00Z",
"display_fields": [
{ "label": "Email", "contact_column_name": "email", "data_type": "EMAIL", "choices": null }
]
}

Possible response codes

Status codeDescription
200Segment retrieved successfully.
401Unauthorized.
404Segment not found.