---
title: "Create Property Based Segmentation"
method: PUT
path: "/{databaseId}/segmentations/property-based/{segmentationId}"
tags: ["Segmentations Definition"]
---

# Create Property Based Segmentation

`PUT /{databaseId}/segmentations/property-based/{segmentationId}`

Creates a Segmentation that splits the items into segments based on values of a particular item property.

A segment is created for each unique value of the property.
In case of `set` properties, a segment is created for each value in the set. Item belongs to all these segments.

## Path parameters

- `databaseId` string, required
- `segmentationId` string, required

## Request body

- CreatePropertyBasedSegmentationParameters
  - `sourceType` string, required — What type of data should be segmented. Currently only `items` are supported.
  - `propertyName` string, required — Name of the property on which the Segmentation should be based
  - `title` string — Human-readable name that is shown in the Recombee Admin UI.
  - `description` string — Description that is shown in the Recombee Admin UI.

## Response `201`

successful operation

## Other responses

- `400` — segmentationId does not match ^[a-zA-Z0-9_\-:@\.]+$, property is not of supported type (`string` or `set`).
- `404` — Property does not exist.

---

[API](https://skmtc.dev/recombee/apis/recombee-api.md) · [All operations](https://skmtc.dev/recombee/apis/recombee-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/recombee/recombee-api/revisions/a9c9c33eb2e8/schema)
