Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 1.07 KB

README.md

File metadata and controls

58 lines (46 loc) · 1.07 KB

Forms

List all forms

Official Documentation


const formType = "popup";

const params = {
  sort: "created_at",
  limit: 25,
  page: 1
};

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

Update a form

Official Documentation


const params = {
  name: "Updated name"
};

mailerlite.forms.update("FORM_ID", params)
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    if (error.response) console.log(error.response.data);
  });

Delete a form

Official Documentation


mailerlite.forms.delete("FORM_ID")
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    if (error.response) console.log(error.response.data);
  });