Creates a segment

Creates a segment entity.

A segment represents a collection of customers filtered by specified conditions, which can be used for targeted campaigns, analytics, or custom workflows.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Schema for create a new segment

string
required

Name for segment

number
required

application id

string | null

Optional description for the segment.

filterDefinition
object
required
  • Defines the filter rules for querying or segmenting data. The filter includes
    a top-level operator (op) and an array of conditions (conditions).

  • Top-level operator:

    • op: currently, only "OR" is supported.
  • Condition types:

    • field: compares a field against a value using operators like lt, gt, gte, lte, eq, neq.
      • For lt, gt, gte, lte, only numbers or dates (ISO 8601 format) are allowed.
      • eq and neq accept numbers, strings or booleans.
      • For boolean fields, filtering by eq: false matches only customers whose field is explicitly false; customers without a value (null/absent) are not returned. Use isnull to match those.
      • isnull / isnotnull: field has no value / field has a value (no value required).
      • filterOperator: optional, defines how to combine multiple fields within the same condition or operations inside fields('AND' or 'OR'). Default: 'AND'.
  • Params example for a simple field condition:

    {
      "op": "OR",
      "conditions": [
        {
          "type": "field",
          "cond": {
            "age": {
              "gt": 30,
              "lt": 90,
              "filterOperator": "AND"
            },
            "signupDate": {
              "lte": "2025-12-31T23:59:59Z"
            }
          },
          "filterOperator": "AND"
        },
        {
          "type": "field",
          "cond": {
            "city": {
              "eq": "Madrid"
            },
            "premium": {
              "eq": true
            }
          },
          "filterOperator": "OR"
        }
      ]
    }
  • Notes:

    • Each filter can contain multiple conditions.
    • The number of field conditions is limited to avoid overly complex filters.
    • filterOperator determines how fields are combined within each condition:
      • "AND" (default): customer must match ALL fields in that condition
      • "OR": customer must match AT LEAST ONE field in that condition
      • If only one field is present, filterOperator has no effect
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json