Add a member
POST/api/v1/segments/{id}/contacts
POST /segments/{id}/contacts
curl -X POST 'https://www.unitpost.com/api/v1/segments/seg_123/contacts' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"contact": "customer@example.com"
}'Response · 201
{
"object": "segment_member",
"contact_id": "contact_123",
"subscribed": false,
"unsubscribed_at": "2026-01-01T00:00:00.000Z"
}Add a contact to a segment, referenced by contact id or email. The operation is idempotent — adding a contact that's already a member is a no-op and still succeeds. See the current members with List segment members. Requires the segments:write capability.
Parameters1 field
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Request body2 fields
| Field | Type | Description |
|---|---|---|
contactrequired | string | — |
subscribed | boolean | — |
Response · 201 fields4 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
contact_idrequired | string | — |
subscribedrequired | boolean | — |
unsubscribed_atrequired | object | — |
201401404422