Unify and manage your data

Update segment API

Learn more about the Segmentation Api to update a segment.

This API accepts a segment ID and enables you to update the corresponding segment. You can opt to update the segment fully or partially.

Request

PUT /{tenantId}/segments/{id}
Parameter Required Description
Headers Authorization YesInformation about authentication access token in the format "Bearer <accessToken>". For more information, see Authentication API.
QueryoptionsNoThe update mode, which can be one of the following:
  • partialOverrride - Use this value to perform a partial update. The fields that are included in the request body payload are updated. The other fields retain their current value.

  • blank - If you leave this parameter blank, the segment is fully updated.

Request body

{
  "label": "Platinum Members",
  "schedule": {
      "startTime": "2000-10-31T01:30:00.000-05:00",
      "repeat":"RRULE:FREQ=WEEKLY;BYDAY=FR"
  },
}

Response

{
  "id": "S1",
  "label": "Platinum Members",
  "owner": "noname@mail.com",
  "sharing":"private",
  "type": "batch",
  "status": "submitted",
  "rule": "equals(entity.attributes.Gender, 'M') and range(entity.attributes.Age, 30, 40) and equals(entity.attributes.Address.City, 'NY') and gte(count(equals(interaction.type, 'configuration/interactionTypes/Meeting')), 2)",
  "schedule": {
      "startTime": "2000-10-31T01:30:00.000-05:00",
      "repeat":"RRULE:FREQ=WEEKLY;BYDAY=FR"
  },
}