POST
/
v2
/
dimensions
/
{dimensionId}
/
segments
Create a new segment in a given dimension
curl --request POST \
  --url https://api.pelanor.io/v2/dimensions/{dimensionId}/segments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "rules": {
    "filterGroups": [
      {
        "operator": "OR",
        "filters": [
          {
            "propertyId": "<string>",
            "values": [
              "<string>"
            ],
            "operator": "EQUALS"
          }
        ],
        "children": [
          {}
        ],
        "constraint": "USES"
      }
    ]
  },
  "isCustom": true
}'
{
  "id": "<string>"
}
When creating a segment, you’ll define a filter condition for this segment. Use the List Attributes endpoint to get available properties and their IDs.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

dimensionId
string
required

Body

application/json

Response

200
application/json

A successful response.

The response is of type object.