Create a segment from a campaign

Creates a segment of people who opened, clicked or did not open a campaign.

MCP tool campaign_monitor_write → create_segment_from_campaign

write

Does what Create Segment on the Snapshot page does. Returns the segment ID, which create_campaign_draft takes as recipients. Reaches no one and is deleted with one click in the app, so it does not wait for your OK. A new segment can take a while to calculate, so send to it later.

Parameters

Parameters: create_segment_from_campaign
NameTypeDescription
campaign_id string required string Campaign ID from list_campaigns.
audience string required string opened (Email opened), clicked (Has any link clicked) or not_opened (Email not opened).
list_id string string List to build the segment on. Required when the campaign went to more than one list.
name string string Segment name. Renamed after creation in the segment builder.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "campaign_monitor_write",
    "arguments": {
      "operation": "create_segment_from_campaign",
      "arguments": {
        "campaign_id": "c8e1d4a07b3f4a9e8d2c5b6a7f901234",
        "audience": "not_opened",
        "list_id": "f2a9b7c1d3e44f08a6b5c4d3e2f10987",
        "name": "Autumn sale: not opened"
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "segment_id": "9e2b5d8a1c7f4630b4a9d2e5f8c13706",
    "name": "Autumn sale: not opened",
    "list_id": "f2a9b7c1d3e44f08a6b5c4d3e2f10987",
    "rule": "Email not opened",
    "source_campaign_id": "c8e1d4a07b3f4a9e8d2c5b6a7f901234"
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.