30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

MailerPress Pro Update Segment

mailerpress-pro/update-segment renames a segment, replaces its conditions, or both.

Both fields are required even when you only mean to change one. That is MailerPress’s requirement rather than a choice made here.

At a glance

Abilitymailerpress-pro/update-segment
ToolsetMailerPress Pro — toolset/mailerpress-pro
GroupMailerPress Pro › Segments
RequiresAcrossAI Pro, plus MailerPress with its Pro add-on active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Pro 0.9.16 and later

No partial update

The endpoint takes a complete segment. Sending only a new name without the conditions is rejected, so a rename means reading the current conditions and sending them back unchanged.

That makes a read-then-write the standard pattern here, and it makes mailerpress-pro/list-segments the call before any edit.

Conditions are an object, not an array: {operator: "AND"|"OR", conditions: [ {type, operator, value}, … ]}. MailerPress’s runtime evaluator rejects any other shape with invalid_conditions, so the wrapper is not optional formatting.

Replacing conditions changes the membership immediately, and the membership is what a campaign sends to. A segment edited between a campaign being scheduled and sent reaches a different audience than the one it was written for.

Renaming has its own consequence: segments are addressed by name in several places, so the old name stops resolving.

Idempotent — sending the same payload twice leaves the same segment.

Input

NameTypeRequiredWhat it is
idintegerYesThe segment ID.
namestringYesThe name. Required even when unchanged.
conditionsobjectYesThe complete conditions object. Required even when unchanged.

What comes back

NameTypeWhat it is
segmentobjectThe segment after the write.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Change the lapsed-customer window to 60 days.

It resolves to one call:

{
  "ability": "mailerpress-pro/update-segment",
  "parameters": {
    "id": 4,
    "name": "Lapsed customers",
    "conditions": {
      "operator": "AND",
      "conditions": [
        { "type": "last_open", "operator": "before", "value": "-60 days" }
      ]
    }
  }
}

Worth knowing

  • Both fields are always required. A rename still needs the conditions.
  • Read the segment first — this is a read-then-write by necessity.
  • Changing conditions changes who a scheduled campaign reaches.
  • Renaming breaks references by the old name.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading