Javascript (Jquery) example

ⓘ This example is purely and solely for example purposes and is by no means production ready. If you have written a library based on our API please keep in touch.

Find below an example of using jQuery.ajax to subscribe an email address.

// Set variables
var uuid = "YOUR_LIST_UUID"
var base_url = ""+ uuid +"/subscribers";
var payload = {
  api_token: "YOUR_API_TOKEN",
  hosting_url: "YOUR_HOSTING_URL",
  email: "",
  name: "John Doe"

// POST the request
  url: base_url,
  type: "POST",
  data: payload,
  success: function(data) {
    if (data.status == "ok") {
      // Email successful subscribed
    } else {
      // Handle error

Still need help? Contact Us Contact Us