curl --request POST \
--url https://api-message.nativehub.live/api/v1/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Premium Customers",
"conditions": {
"tags": {
"segment": "premium"
},
"region": [
"dhaka",
"chittagong"
]
}
}
'{
"id": "e7f8a9b0-c1d2-3456-ef78-901234567890",
"tenant_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "Premium Customers",
"conditions": {
"tags": {
"segment": "premium"
},
"region": [
"dhaka",
"chittagong"
]
},
"contact_count": 1250,
"created_at": "2026-02-05T10:00:00Z"
}Create a new contact segment with conditions
curl --request POST \
--url https://api-message.nativehub.live/api/v1/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Premium Customers",
"conditions": {
"tags": {
"segment": "premium"
},
"region": [
"dhaka",
"chittagong"
]
}
}
'{
"id": "e7f8a9b0-c1d2-3456-ef78-901234567890",
"tenant_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "Premium Customers",
"conditions": {
"tags": {
"segment": "premium"
},
"region": [
"dhaka",
"chittagong"
]
},
"contact_count": 1250,
"created_at": "2026-02-05T10:00:00Z"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.