Skip to Content
MailerLite
MailerLite API

Automation steps

Build an automation's workflow: create, update, move, copy and delete its steps.

Steps are the workflow itself: the emails an automation sends, the waits between them, and the branches and actions in between. Every step points at its parent_id, the step it follows, so the steps of an automation form a tree rather than a flat list.

Create and update calls take the same shape: a type (on create) and a data object holding the settings for that type. data is optional on create, so you can add an empty step and configure it later. Updates replace the whole data object, so send every field you want to keep. A step's type cannot be changed once created.

Steps can only be added, changed, moved or deleted while the automation is inactive. Choosing an A/B test winner is the one exception and works on an active automation.

If the automation was deleted, every endpoint on this page returns 410 Gone.

Placement

parent_id decides where a step goes: omit it to make the step the first in the workflow, or set it to the step the new one should follow. When the parent is a condition or an A/B test, branch says which way out of it the step belongs to: yes or no for a condition, a_path, b_path or c_path for an A/B test. Only email and delay steps may live inside an A/B test branch.

Step types

typePurpose
emailSends an email
delayWaits before continuing
conditionSplits the workflow in two on what is true of the subscriber
abtestSplits traffic across two or three paths
actionChanges the subscriber, or jumps elsewhere in the workflow
webhookPosts to a URL of yours

Email step

FieldTypeRequiredNotes
namestringrequired without subjectMax 255. Internal name shown in the builder
subjectstringrequired without nameMax 255
fromemailyesMust be a verified sender whose domain is authenticated
from_namestringyesMax 255, no emojis
reply_toemailyesMust be verified
email_idintnoReuse an existing email, either unattached or already in this automation
language_idintnoA campaign language ID
google_analyticsboolnoAdd UTM tags to links
track_opensboolnoInclude the open-tracking beacon
preheaderstringnoMax 998. Rejected for emails whose builder does not support one

Set the email's HTML separately with the automation email content endpoint. An email step without content stops the automation from being enabled.

Delay step

unit decides which other fields apply.

Simple delays: minutes, hours, days, weeks, months. Wait a fixed amount of time.

FieldTypeRequiredNotes
unitstringyesOne of the five units above
valueintyesMin 1. Max per unit: minutes 2880, hours 720, days 730, weeks 104, months 24

Scheduled delays: next, next_weekday, next_monthday, next_date, subscriber_field. Wait until a particular moment. All of them take:

FieldTypeRequiredNotes
hourstringyes"00" to "23"
minutestringyes"00", "15", "30" or "45"
use_timezonestringyesaccount, subscriber or custom
timezone_idintconditionalNeeded when use_timezone is custom

Plus, depending on the unit:

unitExtra fields
nextNone. Continues at the next occurrence of the given time
next_weekdayweek_days: string[] (required, at least one, "1" Monday to "7" Sunday)
next_monthdaymonth_day: string (required, "1" to "31" or "last")
next_datedate: string (required, YYYY-MM-DD, must be far enough in the future in the chosen timezone) plus the elapsed-date fields below
subscriber_fieldfield_id: int (required, a date custom field) plus the elapsed-date fields below

Elapsed-date fields, for next_date and subscriber_field:

FieldTypeRequiredNotes
action_on_date_elapsedstringyesstop, move_to_next_step or move_to_step
go_to_step_idintconditionalRequired when the action is move_to_step. Must be a step in this automation
go_to_step_typestringconditionalRequired when the action is move_to_step. Must match the target step's type

Condition step

FieldTypeRequiredNotes
conditionsarrayyesUp to 5 conditions. A step saved without them is incomplete and stops the automation from being enabled
matching_typestringnoany to match on one condition, all to require them all. Defaults to any
yes_step_idintnoThe step to continue to when the condition matches
no_step_idintnoThe step to continue to when it does not

Each entry in conditions has a type plus its own fields:

typeFields
campaign_activitycampaign_id (required), action (required), link_id (required for the specific-link actions)
workflow_activityemail_id (required, an email in this automation), action (required), link_id (required for the specific-link actions)
custom_fieldsfield_id (required, an ID or "email"), action (required, an operator valid for that field's type), action_value (required for operators that compare a value)
group_membershipgroup_id (required)
segment_membershipsegment_id (required, the segment must have a filter)

action on the two activity conditions is one of clicked, link_clicked, link_not_clicked, opened, not_opened or opened_not_clicked. The open-based actions are only available on emails that track opens.

A/B test step

FieldTypeRequiredNotes
split_percentagesarrayyes2 or 3 entries, each { label, path, value }. Paths are a_path, b_path, c_path, must be unique, and the values must add up to 100. A step saved without them is incomplete and stops the automation from being enabled
namestringnoShown in the builder
a_path_step_idintnoThe first step of the A path
b_path_step_idintnoThe first step of the B path
c_path_step_idintnoThe first step of the C path. Only with three splits
ab_test_winnerstringnoa_path, b_path or c_path. Cannot be changed once set

Webhook step

FieldTypeRequiredNotes
urlstringyesA valid, publicly reachable URL, max 2048
secretstringyes5 to 255 characters, used to sign the request
webhook_idintnoReuse an existing webhook in the account

Action step

action_type is always required and decides the rest.

action_typeFields
copy_to_groupgroup_ids: int[] (required, at least one)
remove_from_groupgroup_ids: int[] (required, at least one)
move_to_groupfrom_group_ids: int[] (required), to_group_ids: int[] (required, no overlap with from_group_ids)
mark_as_unsubscribedNone
go_to_stepgo_to_step_id: int, go_to_step_type: string (required together). Cannot target itself, another go_to_step, or a step inside an A/B branch
update_custom_fieldfield_id: int (required), date_operation (required for date fields: set_value, set_to_current_date, increase_by_days, decrease_by_days), number_operation (required for number fields: set_value, increase_value, decrease_value), value (required unless date_operation is set_to_current_date)
send_internal_email_notificationfrom: email (required, verified), from_name: string (required, max 255, no emojis), reply_to: email (required, verified), subject: string (required, max 255), message: string (required, max 500, supports field variables), recipients: email[] (required, 1 to 5), fields: int[] (up to 20)

Deleting

Deleting a condition or A/B test step takes branch_to_delete or branch_to_keep, which say what happens to the steps below it. Send one or the other, not both.

branch_to_delete: all deletes every branch. A named branch in branch_to_delete means something different for each step type:

  • Condition: yes or no deletes that branch. The other branch is reattached where the condition was.
  • A/B test: a_path, b_path or c_path keeps that path. The other paths are deleted, and the kept path is reattached where the A/B test was.

branch_to_keep works the same way for both step types: it names the branch that takes the step's place, yes or no for a condition and a_path, b_path or c_path for an A/B test, and every other branch is deleted. The branch you name must hold at least one step.

A condition with steps in both branches needs one of the two parameters, otherwise the request returns a 422. Without either, a condition with only one branch filled is deleted on its own, and an A/B test step deletes every path.

A step other steps point at cannot be deleted until that reference is gone. That covers the target of a go_to_step action, a step used by a condition, and a step a delay continues from.

List automation steps

Returns every step in an automation's workflow, in order, each with its configuration and the records it references. parent_id and the branch fields on condition and A/B test steps describe how the steps connect.

If you want to get all steps of an automation use this GET request

GET https://connect.mailerlite.com/api/automations/{automation_id}/steps/index

Response

Response code: 200 OK
{
  "data": [
    {
      "id": "203114224673622808",
      "type": "email",
      "parent_id": null,
      "name": "Welcome email",
      "subject": "Welcome to the newsletter, {$name}",
      "from": "dummy@example.com",
      "from_name": "Dummy Testerson",
      "reply_to": "dummy@example.com",
      "email_id": "203114224708224206",
      "email": {
        "id": "203114224708224206",
        "account_id": "1",
        "emailable_id": "203114220633457868",
        "emailable_type": "automations",
        "type": "builder_html",
        "from": "dummy@example.com",
        "from_name": "Dummy Testerson",
        "reply_to": "dummy@example.com",
        "name": "Welcome email",
        "subject": "Welcome to the newsletter, {$name}",
        "plain_text": "Hello,\n\nYou have received a newsletter from {$account}.\n\n...",
        "screenshot_url": null,
        "uses_new_builder": false,
        "uses_landscape_screenshot": true,
        "generate_screenshot_timestamp": "2026-11-03 11:20:56",
        "is_building_content": false,
        "preview_url": "https://preview.mailerlite.io/emails/1234567890/preview",
        "report_preview_url": "https://preview.mailerlite.io/emails/1234567890/preview",
        "created_at": "2026-11-03 11:20:19",
        "updated_at": "2026-11-03 11:20:56",
        "is_designed": true,
        "language_id": null,
        "is_winner": false,
        "stats": {
          "sent": 0,
          "opens_count": 0,
          "open_rate": {
            "float": 0,
            "string": "0%"
          },
          "clicks_count": 0,
          "click_rate": {
            "float": 0,
            "string": "0%"
          },
          "unsubscribes_count": 0,
          "unsubscribe_rate": {
            "float": 0,
            "string": "0%"
          },
          "spam_count": 0,
          "spam_rate": {
            "float": 0,
            "string": "0%"
          },
          "hard_bounces_count": 0,
          "hard_bounce_rate": {
            "float": 0,
            "string": "0%"
          },
          "soft_bounces_count": 0,
          "soft_bounce_rate": {
            "float": 0,
            "string": "0%"
          },
          "deliveries_count": 0,
          "delivery_rate": {
            "float": 0,
            "string": "0%"
          },
          "forwards_count": 0,
          "forward_rate": {
            "float": 0,
            "string": "0%"
          },
          "social_interactions_count": 0,
          "social_interaction_rate": {
            "float": 0,
            "string": "0%"
          },
          "click_to_open_rate": {
            "float": 0,
            "string": "0%"
          }
        },
        "send_after": null,
        "track_opens": true,
        "uses_survey": false,
        "uses_quiz": false,
        "preheader": null
      },
      "language_id": 4,
      "complete": true,
      "created_at": "2026-11-03 11:20:19",
      "updated_at": "2026-11-03 11:20:50",
      "track_opens": true,
      "google_analytics": null,
      "tracking_was_disabled": false,
      "broken": false,
      "has_unsubscribe_url": true,
      "has_good_unsubscribe_contrast": true,
      "has_unlinked_buttons": false,
      "eligible_for_sending": true,
      "preheader": null,
      "builder_type": "builder_html",
      "description": "Send \"Welcome to the newsletter, {$name}\" email",
      "type_count": null
    },
    {
      "id": "203114227995511577",
      "type": "delay",
      "parent_id": "203114224673622808",
      "unit": "days",
      "complete": true,
      "created_at": "2026-11-03 11:20:22",
      "updated_at": "2026-11-03 11:20:22",
      "value": 2,
      "description": "Wait for 2 days",
      "type_count": null
    },
    {
      "id": "203114243556379418",
      "name": "Subject test",
      "type": "abtest",
      "parent_id": "203114227995511577",
      "complete": true,
      "broken": false,
      "a_path_step_id": "203114244338617115",
      "b_path_step_id": "203114245168040732",
      "c_path_step_id": null,
      "ab_test_winner": null,
      "can_select_winner": false,
      "split_percentages": [
        {
          "label": "A",
          "path": "a_path",
          "value": 50
        },
        {
          "label": "B",
          "path": "b_path",
          "value": 50
        }
      ],
      "created_at": "2026-11-03 11:20:37",
      "updated_at": "2026-11-03 11:20:38",
      "description": "Run an A/B split test",
      "type_count": null
    }
  ]
}

Create an automation step

Adds a step to an automation's workflow. type chooses the kind of step and data holds the settings for that type. Use parent_id to place the step after an existing one and branch to pick a side of a condition or A/B test. Omit both to make it the first step, or send append: true to add it after the last step of the main path. meta.warnings in the response lists anything about the new step that needs attention. The automation must be inactive.

If you want to add a step to an automation use this POST request

POST https://connect.mailerlite.com/api/automations/{automation_id}/steps

Request body

ParameterTypeRequiredLimitations
typestringyesMust be one of email, delay, condition, abtest, webhook or action. See the step types table above
parent_idintegernoPlace the new step immediately after this step. Omit it to make the new step the first step in the workflow
appendbooleannoPlace the new step after the last step of the main path, in place of parent_id. Cannot be sent with parent_id. Rejected when the main path ends in a condition, since either branch could be meant
branchstringnoWhich branch of the parent step the new step belongs to: yes or no for a condition, a_path, b_path or c_path for an A/B test. Required when the parent is a condition. Omit it to place the step after the parent rather than inside a branch
move_to_branchstringnoWhen the parent is a condition and it already has a step in the chosen branch, which branch that existing step is moved to: yes or no. Defaults to yes
dataobjectnoThe step's configuration. The fields it takes depend on type, see the step type tables above. Omit it to create an empty step and configure it later with the update endpoint. When you send it, send the complete payload for the type
data.action_typestringyes, for action stepsMust be one of copy_to_group, remove_from_group, move_to_group, mark_as_unsubscribed, go_to_step, update_custom_field or send_internal_email_notification

Request example:

{
  "type": "email",
  "data": {
    "name": "Welcome email",
    "subject": "Welcome to the newsletter, {$name}",
    "from": "dummy@example.com",
    "from_name": "Dummy Testerson",
    "reply_to": "dummy@example.com",
    "track_opens": true
  }
}

A delay step placed after another step:

{
  "type": "delay",
  "parent_id": "203114224673622808",
  "data": {
    "unit": "days",
    "value": 2
  }
}

An A/B test step with two paths:

{
  "type": "abtest",
  "parent_id": "203114227995511577",
  "data": {
    "name": "Subject test",
    "split_percentages": [
      {
        "label": "A",
        "path": "a_path",
        "value": 50
      },
      {
        "label": "B",
        "path": "b_path",
        "value": 50
      }
    ]
  }
}

Response

Response code: 201 Created
{
  "data": {
    "id": "203114224673622808",
    "type": "email",
    "parent_id": null,
    "name": "Welcome email",
    "subject": "Welcome to the newsletter, {$name}",
    "from": "dummy@example.com",
    "from_name": "Dummy Testerson",
    "reply_to": "dummy@example.com",
    "email_id": "203114224708224206",
    "email": {
      "id": "203114224708224206",
      "account_id": "1",
      "emailable_id": "203114220633457868",
      "emailable_type": "automations",
      "type": null,
      "from": "dummy@example.com",
      "from_name": "Dummy Testerson",
      "reply_to": "dummy@example.com",
      "name": "Welcome email",
      "subject": "Welcome to the newsletter, {$name}",
      "plain_text": "Hello,\n\nYou have received a newsletter from {$account}.\n\n...",
      "screenshot_url": null,
      "uses_new_builder": false,
      "uses_landscape_screenshot": true,
      "generate_screenshot_timestamp": null,
      "is_building_content": false,
      "preview_url": "https://preview.mailerlite.io/emails/1234567890/preview",
      "report_preview_url": "https://preview.mailerlite.io/emails/1234567890/preview",
      "created_at": "2026-11-03 11:20:19",
      "updated_at": "2026-11-03 11:20:19",
      "is_designed": false,
      "language_id": null,
      "language": {
        "id": "4",
        "shortcode": "en",
        "iso639": "en-US",
        "name": "English",
        "direction": "ltr"
      },
      "is_winner": false,
      "stats": {
        "sent": 0,
        "opens_count": 0,
        "open_rate": {
          "float": 0,
          "string": "0%"
        },
        "clicks_count": 0,
        "click_rate": {
          "float": 0,
          "string": "0%"
        },
        "unsubscribes_count": 0,
        "unsubscribe_rate": {
          "float": 0,
          "string": "0%"
        },
        "spam_count": 0,
        "spam_rate": {
          "float": 0,
          "string": "0%"
        },
        "hard_bounces_count": 0,
        "hard_bounce_rate": {
          "float": 0,
          "string": "0%"
        },
        "soft_bounces_count": 0,
        "soft_bounce_rate": {
          "float": 0,
          "string": "0%"
        },
        "deliveries_count": 0,
        "delivery_rate": {
          "float": 0,
          "string": "0%"
        },
        "forwards_count": 0,
        "forward_rate": {
          "float": 0,
          "string": "0%"
        },
        "social_interactions_count": 0,
        "social_interaction_rate": {
          "float": 0,
          "string": "0%"
        },
        "click_to_open_rate": {
          "float": 0,
          "string": "0%"
        }
      },
      "send_after": null,
      "track_opens": true,
      "uses_survey": false,
      "uses_quiz": false,
      "preheader": null
    },
    "language_id": 4,
    "complete": false,
    "created_at": "2026-11-03 11:20:19",
    "updated_at": "2026-11-03 11:20:21",
    "track_opens": true,
    "google_analytics": null,
    "tracking_was_disabled": false,
    "broken": false,
    "has_unsubscribe_url": false,
    "has_good_unsubscribe_contrast": true,
    "has_unlinked_buttons": false,
    "eligible_for_sending": true,
    "preheader": null,
    "builder_type": null,
    "description": "Send \"Welcome to the newsletter, {$name}\" email",
    "type_count": null
  },
  "meta": {
    "warnings": []
  }
}

meta.warnings is a list of messages, empty when there is nothing to fix. For example, a delay that is the last step on its path, or an internal notification sent to recipients who are not verified yet.

Get an automation step

Returns a single step with its type, its configuration and the records it references, such as the email or the groups it acts on.

If you want to get a single step use this GET request

GET https://connect.mailerlite.com/api/automations/{automation_id}/steps/{step_id}

Response

Response code: 200 OK
{
  "data": {
    "id": "203114227995511577",
    "type": "delay",
    "parent_id": "203114224673622808",
    "unit": "days",
    "complete": true,
    "created_at": "2026-11-03 11:20:22",
    "updated_at": "2026-11-03 11:20:22",
    "value": 2,
    "description": "Wait for 2 days",
    "type_count": null
  }
}

Update an automation step

Replaces a step's configuration. Send the complete data payload for the step's type. Fields you leave out are cleared, not kept. A step's type cannot be changed, and the automation must be inactive.

If you want to update a step use this PUT request

PUT https://connect.mailerlite.com/api/automations/{automation_id}/steps/{step_id}

Request body

ParameterTypeRequiredLimitations
parent_idintegernoMove the step so it comes immediately after this step. Omit it to leave the step where it is
dataobjectnoThe step's configuration. The fields it takes depend on the step's type, see the step type tables above. Send the complete payload for the type
reschedule_waiting_subscribersbooleannoFor delay steps, recalculate the wait for subscribers already in this delay using the new settings. Defaults to false, which keeps their existing schedule

Request example:

{
  "data": {
    "unit": "days",
    "value": 3
  }
}

Response

Response code: 200 OK
{
  "data": {
    "id": "203114227995511577",
    "type": "delay",
    "parent_id": "203114224673622808",
    "unit": "days",
    "complete": true,
    "created_at": "2026-11-03 11:20:22",
    "updated_at": "2026-11-03 11:21:00",
    "value": 3,
    "description": "Wait for 3 days",
    "type_count": null
  }
}

Delete an automation step

Removes a step from the workflow. Condition and A/B test steps hold branches. Send branch_to_delete or branch_to_keep to say what happens to them, see Deleting. The automation must be inactive. A step that other steps point at cannot be deleted until that reference is removed.

If you want to delete a step use this DELETE request

DELETE https://connect.mailerlite.com/api/automations/{automation_id}/steps/{step_id}

Request parameters

ParameterTypeRequiredLimitations
branch_to_deletestringnoFor condition and A/B test steps. For a condition: all deletes both branches, yes or no deletes that branch and reattaches the other one in its place. For an A/B test: all deletes every path, a_path, b_path or c_path keeps that path and deletes the others. Required for a condition with steps in both branches, unless you send branch_to_keep
branch_to_keepstringnoFor condition and A/B test steps. The branch that takes the step's place: yes or no for a condition, a_path, b_path or c_path for an A/B test. Every other branch is deleted. The branch must hold at least one step. Cannot be sent with branch_to_delete

Response

Response code: 204 No Content

Duplicate an automation step

Copies a step with its configuration and inserts the copy into the workflow. By default the copy becomes the first step. Pass parent_id to place it after a specific step instead. The automation must be inactive and under its step limit. The response is the whole automation.

If you want to duplicate a step use this POST request

POST https://connect.mailerlite.com/api/automations/{automation_id}/steps/{step_id}/copy

Request body

ParameterTypeRequiredLimitations
parent_idintegernoPlace the copy immediately after this step. Omit it to make the copy the first step in the workflow
branchstringnoWhich branch of the parent step the copy belongs to: yes or no for a condition, a_path, b_path or c_path for an A/B test. Required when copying into either, and rejected otherwise
move_to_branchstringnoWhen the chosen condition branch already holds a step, which branch that existing step is moved to: yes or no. Defaults to yes

Request example:

{
  "parent_id": "203114450965760805"
}

Response

Response code: 200 OK
{
  "data": {
    "id": "203114449598416102",
    "name": "Steps demo",
    "enabled": false,
    "trigger_data": {
      "track_ecommerce": false,
      "broken_workflow": false,
      "complete_workflow": false,
      "repeatable": false,
      "repeatable_settings": {
        "mode": "wait",
        "value": 1,
        "unit": "day"
      },
      "show_analytics": true,
      "valid": true
    },
    "triggers": [
      {
        "id": "203114450335565031",
        "type": "subscriber_joins_group",
        "group_ids": [
          "203105145192450069"
        ],
        "groups": [
          {
            "id": "203105145192450069",
            "name": "Test",
            "url": "https://connect.mailerlite.com/groups/203105145192450069"
          }
        ],
        "exclude_group_ids": [],
        "excluded_groups": [],
        "broken": false,
        "complete": true,
        "exit_when_no_longer_matches": false
      }
    ],
    "complete": false,
    "broken": false,
    "warnings": [],
    "emails_count": 0,
    "stats": {
      "bounce_rate": {
        "float": 0,
        "string": "0%"
      },
      "click_to_open_rate": {
        "float": 0,
        "string": "0%"
      },
      "sent": 0,
      "opens_count": 0,
      "unique_opens_count": null,
      "open_rate": {
        "float": 0,
        "string": "0%"
      },
      "clicks_count": 0,
      "unique_clicks_count": null,
      "click_rate": {
        "float": 0,
        "string": "0%"
      },
      "unsubscribes_count": 0,
      "unsubscribe_rate": {
        "float": 0,
        "string": "0%"
      },
      "spam_count": 0,
      "spam_rate": {
        "float": 0,
        "string": "0%"
      },
      "hard_bounces_count": 0,
      "hard_bounce_rate": {
        "float": 0,
        "string": "0%"
      },
      "soft_bounces_count": 0,
      "soft_bounce_rate": {
        "float": 0,
        "string": "0%"
      },
      "forward_rate": {
        "float": 0,
        "string": "0%"
      },
      "social_interactions_count": null,
      "social_interaction_rate": {
        "float": 0,
        "string": "0%"
      }
    },
    "created_at": "2026-11-03 11:23:53",
    "has_banned_content": false,
    "qualified_subscribers_count": 0,
    "automation_template_id": null,
    "automation_template_name": null,
    "building_in_progress": false,
    "steps": [
      {
        "id": "203114450965760805",
        "type": "delay",
        "parent_id": null,
        "unit": "hours",
        "complete": true,
        "created_at": "2026-11-03 11:23:55",
        "updated_at": "2026-11-03 11:23:55",
        "value": 1,
        "description": "Wait for 1 hour",
        "type_count": null
      },
      {
        "id": "203114452429572903",
        "type": "delay",
        "parent_id": "203114450965760805",
        "unit": "hours",
        "complete": true,
        "created_at": "2026-11-03 11:23:56",
        "updated_at": "2026-11-03 11:23:56",
        "value": 1,
        "description": "Wait for 1 hour",
        "type_count": null
      },
      {
        "id": "203114451539331878",
        "type": "delay",
        "parent_id": "203114452429572903",
        "unit": "days",
        "complete": true,
        "created_at": "2026-11-03 11:23:55",
        "updated_at": "2026-11-03 11:23:56",
        "value": 1,
        "description": "Wait for 1 day",
        "type_count": null
      }
    ]
  }
}

Move an automation step

Moves a step, with everything below it, to a new position in the workflow. Pass new_parent_step_id to place it after another step, or omit it to make it the first step. Send step_ids instead of dragged_step_id to move a run of consecutive steps together. The automation must be inactive. Moves that would leave the workflow invalid are rejected with a 422. The response is the whole automation.

If you want to move a step use this POST request

POST https://connect.mailerlite.com/api/automations/{automation_id}/steps/reorder

Request body

ParameterTypeRequiredLimitations
dragged_step_idintegeryes, unless step_ids is sentThe step to move. Everything below it moves with it. Cannot be sent with step_ids
step_idsarraynoUp to 50 steps to move together, in place of dragged_step_id. They must follow each other in the workflow, each one the child of the step before it, and keep their order. Either all of them move or none does
new_parent_step_idintegernoMove the step so it comes immediately after this step. Omit it to make the moved step the first step in the workflow
branchstringnoWhich branch of the new parent the step moves into: yes or no for a condition, a_path, b_path or c_path for an A/B test. Omit it to place the step after the parent rather than inside a branch
branch_for_childstringnoWhen the moved step is a condition and its new position already holds a step, which branch of the condition that existing step goes to: yes or no. Required in that case, otherwise the move is rejected with a 422

Request example:

{
  "dragged_step_id": "203114451539331878"
}

Response

Response code: 200 OK
{
  "data": {
    "id": "203114449598416102",
    "name": "Steps demo",
    "enabled": false,
    "trigger_data": {
      "track_ecommerce": false,
      "broken_workflow": false,
      "complete_workflow": false,
      "show_analytics": true,
      "valid": false,
      "repeatable": false,
      "repeatable_settings": {
        "mode": "wait",
        "value": 1,
        "unit": "day"
      }
    },
    "triggers": [],
    "complete": false,
    "broken": false,
    "warnings": [],
    "emails_count": 0,
    "stats": {
      "bounce_rate": {
        "float": 0,
        "string": "0%"
      },
      "click_to_open_rate": {
        "float": 0,
        "string": "0%"
      },
      "sent": 0,
      "opens_count": 0,
      "unique_opens_count": null,
      "open_rate": {
        "float": 0,
        "string": "0%"
      },
      "clicks_count": 0,
      "unique_clicks_count": null,
      "click_rate": {
        "float": 0,
        "string": "0%"
      },
      "unsubscribes_count": 0,
      "unsubscribe_rate": {
        "float": 0,
        "string": "0%"
      },
      "spam_count": 0,
      "spam_rate": {
        "float": 0,
        "string": "0%"
      },
      "hard_bounces_count": 0,
      "hard_bounce_rate": {
        "float": 0,
        "string": "0%"
      },
      "soft_bounces_count": 0,
      "soft_bounce_rate": {
        "float": 0,
        "string": "0%"
      },
      "forward_rate": {
        "float": 0,
        "string": "0%"
      },
      "social_interactions_count": null,
      "social_interaction_rate": {
        "float": 0,
        "string": "0%"
      }
    },
    "created_at": "2026-11-03 11:23:53",
    "has_banned_content": false,
    "automation_template_id": null,
    "automation_template_name": null,
    "building_in_progress": false,
    "steps": [
      {
        "id": "203114452429572903",
        "type": "delay",
        "parent_id": "203114450965760805",
        "unit": "hours",
        "complete": true,
        "created_at": "2026-11-03 11:23:56",
        "updated_at": "2026-11-03 11:23:58",
        "value": 1,
        "description": "Wait for 1 hour",
        "type_count": null
      },
      {
        "id": "203114451539331878",
        "type": "delay",
        "parent_id": null,
        "unit": "days",
        "complete": true,
        "created_at": "2026-11-03 11:23:55",
        "updated_at": "2026-11-03 11:24:10",
        "value": 1,
        "description": "Wait for 1 day",
        "type_count": null
      },
      {
        "id": "203114450965760805",
        "type": "delay",
        "parent_id": "203114451539331878",
        "unit": "hours",
        "complete": true,
        "created_at": "2026-11-03 11:23:55",
        "updated_at": "2026-11-03 11:24:10",
        "value": 1,
        "description": "Wait for 1 hour",
        "type_count": null
      }
    ]
  }
}

Select an A/B test winner

Picks the winning path of an A/B test step. The other paths stop getting subscribers. This works on an active automation. Once set, the winner cannot be changed.

If you want to pick the winner of an A/B test step use this PUT request

PUT https://connect.mailerlite.com/api/automations/{automation_id}/steps/{step_id}/select-ab-test-winner

Request body

ParameterTypeRequiredLimitations
ab_test_winnerstringyesThe winning path: a_path, b_path or c_path. Must be a path the step splits traffic to

Request example:

{
  "ab_test_winner": "a_path"
}

Response

Response code: 200 OK
{
  "data": {
    "step_id": "203114243556379418",
    "name": "Subject test",
    "ab_test_winner": "a_path",
    "parent_id": "203114227995511577",
    "can_select_winner": false,
    "a_path_step_id": "203114244338617115",
    "b_path_step_id": "203114245168040732",
    "c_path_step_id": null,
    "split_percentages": [
      {
        "label": "A",
        "path": "a_path",
        "value": 50
      },
      {
        "label": "B",
        "path": "b_path",
        "value": 50
      }
    ],
    "stats": {
      "a_path": {
        "subscribers": 0,
        "sent": 0,
        "opens": 0,
        "clicks": 0,
        "open_rate": {
          "float": 0,
          "string": "0%"
        },
        "click_rate": {
          "float": 0,
          "string": "0%"
        },
        "click_to_open_rate": {
          "float": 0,
          "string": "0%"
        }
      },
      "b_path": {
        "subscribers": 0,
        "sent": 0,
        "opens": 0,
        "clicks": 0,
        "open_rate": {
          "float": 0,
          "string": "0%"
        },
        "click_rate": {
          "float": 0,
          "string": "0%"
        },
        "click_to_open_rate": {
          "float": 0,
          "string": "0%"
        }
      }
    }
  }
}

On this page