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.

Body Params
string
required

Name for segment

number
required

application id

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 or strings.
  • Params example for a simple field condition:

    {
      "op": "OR",
      "conditions": [
        {
          "type": "field",
          "cond": {
            "age": {
              "gt": 30
            },
            "signupDate": {
              "lte": "2025-12-31T23:59:59Z"
            }
          }
        }
      ]
    }
  • Notes:

    • Each filter can contain multiple conditions.
    • The number of field conditions is limited to avoid overly complex filters.
Responses

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