Create a profile segment
Create a segment in a profile. A segment is a saved set of conditions rather than a fixed list, so its membership changes as contacts change. Creating one does not modify any contact.
Create a segment in a profile.
A segment is a saved set of conditions rather than a fixed list, so its membership changes as contacts change. Creating one does not modify any contact.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
profileUuidstringRequiredExample:
Profile uuid parameter
550e8400-e09b-41d4-a716-400055000000Body
Create a segment from a set of conditions
namestring · max: 255RequiredExample:
VIP Customerslogicstring · enumRequiredExample:
How to combine multiple conditions
ANDPossible values: Responses
200
Success response
application/json
uuidstringOptionalExample:
550e8400-e29b-41d4-a716-446655440000namestringOptionalExample:
Segment namecreated_atstring · date-timeOptionalExample:
2025-02-27T11:54:22Zupdated_atstring · date-timeOptionalExample:
2025-02-27T11:54:22Z401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
post/api/reach/v1/profiles/{profileUuid}/segmentation/segments
POST /api/reach/v1/profiles/{profileUuid}/segmentation/segments HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 125
{
"name": "VIP Customers",
"conditions": [
{
"attribute": "email",
"operator": "equals",
"value": "example@example.com"
}
],
"logic": "AND"
}{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "Segment name",
"query": {
"conditions": [
{
"attribute": "email",
"operator": "contains",
"value": "example.com"
}
],
"logic": "and"
},
"created_at": "2025-02-27T11:54:22Z",
"updated_at": "2025-02-27T11:54:22Z"
}Last updated
Was this helpful?