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 }