Export customer segmentation changes

For the general submit-and-poll flow, see Exports overview.

Request

https://api.maestra.io/v3/operations/sync?endpointId={endpointId}&operation={operation}

Accept: application/json
Content-Type: application/json
Authorization: SecretKey {Secret key}

{
  "sinceDateTimeUtc": "<Start of the change window — UTC, YYYY-MM-DD hh:mm>",
  "segmentation": {
    "ids": {
      "externalId": "<Segmentation external ID>"
    }
  }
}

You can pass:

  • A UTC datetime — only customers who joined or left the requested segmentation after this date will be included.
  • externalId of a customer segmentation — required if you didn't pick one in the operation step settings.

Without a since date — the file has one row for every customer that has ever been in this segmentation. The inSegmentation field tells you whether the customer is currently in it, and segment shows which segment the customer belongs to.

With a since date — the file has rows only for customers who have joined or left the segmentation since that date.

Response format

{
  "customerSegments": [
    {
      "customer": {
        "ids": {
          "mindboxId": "<Maestra customer ID>",
          "<ID1>": "<External customer identifier>",
          "<ID2>": "<Another external customer identifier>"
        }
      },
      "inSegmentation": true,
      "segment": {
        "ids": {
          "externalId": "<Segment external ID>"
        }
      }
    },
    {
      "customer": {
        "ids": {
          "mindboxId": "<Maestra customer ID>",
          "<ID1>": "<External customer identifier>",
          "<ID2>": "<Another external customer identifier>"
        }
      },
      "inSegmentation": false
    }
  ]
}