For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a new contact segment

Create a new contact segment.

Deprecated

Create a new contact segment

post

Create a new contact segment.

This endpoint allows creating a new contact segment that can be used to organize contacts. The segment can be configured with specific criteria like email, name, subscription status, etc.

Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot create segments in any other profile. Use POST /api/reach/v1/profiles/{profileUuid}/segmentation/segments instead.

Authorizations
AuthorizationstringRequired

API Token authentication

Body
namestringRequiredExample: New segment name
logicstring · enumRequiredExample: ANDPossible values:
Responses
200

Success response

application/json
uuidstringOptionalExample: 550e8400-e29b-41d4-a716-446655440000
namestringOptionalExample: Segment name
created_atstring · date-timeOptionalExample: 2025-02-27T11:54:22Z
updated_atstring · date-timeOptionalExample: 2025-02-27T11:54:22Z
post/api/reach/v1/segmentation/segments
POST /api/reach/v1/segmentation/segments HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 127

{
  "name": "New segment name",
  "conditions": [
    {
      "operator": "equals",
      "value": "example@example.com",
      "attribute": "note"
    }
  ],
  "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?