Skip to content

Latest commit

 

History

History
61 lines (52 loc) · 1.25 KB

File metadata and controls

61 lines (52 loc) · 1.25 KB

Automations

List all automations

Official Documentation


const params = {
  filter: {
    status: true,
    name: "test"
  },
  limit: 10,
  page: 1
};

mailerlite.automations.get(params)
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    if (error.response) console.log(error.response.data);
  });

Get an automation

Official Documentation


mailerlite.automations.find("AUTOMATION_ID")
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    if (error.response) console.log(error.response.data);
  });

Get the subscriber activity for an automation

Official Documentation


const params = {
  filter: {
    status: "active"
  },
  limit: 10,
  page: 1
};

mailerlite.automations.getAutomationSubscribers("AUTOMATION_ID", params)
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    if (error.response) console.log(error.response.data);
  });