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

Update a profile segment

Rename a segment and/or replace the conditions that define it.

Update a profile segment

put

Rename a segment and/or replace the conditions that define it.

name is always required. Omit conditions to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
profileUuidstringRequired

Profile uuid parameter

Example: 550e8400-e09b-41d4-a716-400055000000
segmentUuidstringRequired

Segment uuid parameter

Example: 550e8400-e09b-41d4-a716-400055000000
Body

Rename a segment and/or replace the conditions that define it

namestring · max: 255RequiredExample: VIP Customers
logicstring · enumOptional

How to combine multiple conditions. Required when conditions are given.

Example: 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
put/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}
PUT /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid} 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?