API endpoints
Segments
Create, list, retrieve and delete segments.
A segment groups contacts for broadcasts. Segments and audiences are the same resource: a segment ID works as an audience_id and the other way around.
Create a segment
POST /segments
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The segment name. |
curl -X POST https://api.usend.et/segments \
-H "Authorization: Bearer us_123456789" \
-H "Content-Type: application/json" \
-d '{ "name": "Newsletter" }'{ "object": "segment", "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "Newsletter" }Retrieve a segment
GET /segments/{id}
curl https://api.usend.et/segments/78261eea-8f8b-4381-83c6-79fa7120f1cf \
-H "Authorization: Bearer us_123456789"{
"object": "segment",
"id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"name": "Newsletter",
"created_at": "2026-10-11T08:00:00.000Z",
"contact_count": 1240
}List segments
GET /segments
curl https://api.usend.et/segments \
-H "Authorization: Bearer us_123456789"{
"object": "list",
"data": [
{
"object": "segment",
"id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"name": "Newsletter",
"created_at": "2026-10-11T08:00:00.000Z",
"contact_count": 1240
}
],
"has_more": false
}Delete a segment
DELETE /segments/{id}
Deletes the segment and its memberships. A segment that a broadcast uses cannot be deleted: the request fails with 422 validation_error.
curl -X DELETE https://api.usend.et/segments/78261eea-8f8b-4381-83c6-79fa7120f1cf \
-H "Authorization: Bearer us_123456789"{ "object": "segment", "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "deleted": true }Update a segment
PATCH /segments/{id}
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The new segment name. |
curl -X PATCH https://api.usend.et/segments/78261eea-8f8b-4381-83c6-79fa7120f1cf \
-H "Authorization: Bearer us_123456789" \
-H "Content-Type: application/json" \
-d '{ "name": "Weekly digest" }'{ "object": "segment", "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf", "name": "Weekly digest", "created_at": "2026-10-11T08:00:00.000Z", "contact_count": 1240 }List a segment's contacts
GET /segments/{id}/contacts
Supports pagination and subscription=subscribed or subscription=unsubscribed.
curl "https://api.usend.et/segments/78261eea-8f8b-4381-83c6-79fa7120f1cf/contacts?subscription=subscribed" \
-H "Authorization: Bearer us_123456789"{
"object": "list",
"data": [
{
"object": "contact",
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
"email": "[email protected]",
"first_name": "Ann",
"last_name": "",
"unsubscribed": false,
"created_at": "2026-10-11T08:00:00.000Z",
"properties": {}
}
],
"has_more": false
}Segment metrics
GET /segments/{id}/metrics
Contact counts, and what the segment's contacts did with the broadcasts sent to them (distinct emails).
curl https://api.usend.et/segments/78261eea-8f8b-4381-83c6-79fa7120f1cf/metrics \
-H "Authorization: Bearer us_123456789"{
"object": "segment_metrics",
"id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"contacts": 1240,
"subscribed": 1200,
"unsubscribed": 40,
"sends": 2400,
"delivered": 2380,
"bounced": 12,
"opens": 900,
"clicks": 210
}