Skip to content

MCP tool

ma_audiences_create_segment: Save a segment

Markdown version

Create a segment from rules over traits, events, scores and consent, and count it.

  • Changes data: yes
  • Scope needed: marketing:write

Example call

{
  "name": "ma_audiences_create_segment",
  "arguments": {
    "body": {
      "name": "Recent buyers",
      "workspace_id": "ws_01J9ZZZZZZZZZZZZZZZZZZZZZZ",
      "definition": {
        "match": "all",
        "rules": [
          {
            "field": "event.order.placed",
            "op": "did",
            "within_days": 90
          }
        ]
      }
    }
  }
}

All tools: MCP tools. Connecting: quickstarts.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.