Segments

Preview a segment definition

Returns subscriber counts for an unsaved segment definition. Include current_segment_id when previewing edits to an existing segment so circular segment references are rejected before saving.

post/v1/segments/preview

Request

  • Base URL: https://api.mailrith.com
  • URL: https://api.mailrith.com/v1/segments/preview
  • Auth: HTTP bearer

Request body

current_segment_idstring nullable

When previewing an edit to an existing segment, include that segment id so Mailrith can catch circular segment references before saving.

Example request

{
  "definition": {
    "match": "all",
    "groups": [
      {
        "id": "active-subscribers",
        "match": "all",
        "conditions": [
          {
            "id": "active-status",
            "field": "subscriber_status",
            "operator": "is",
            "value": [
              "Active"
            ]
          }
        ]
      }
    ]
  }
}

Response

The preview counts were returned.

Changes

No recorded changes to this operation across all 1 revision of this API.