Sequence API

A Message is the same as the Sequence in the UI. It is a list of messages that are sent to a contact.

Update Sequence

Send an array of messages to update a sequence. If you have more than 100 messages, you can split them into multiple requests.

bash
Sequence.Types = {
  1: 'EMAIL',
  2: 'WAIT',
  3: 'LINKEDIN_PROFILE_VISIT',
  4: 'LINKEDIN_CONNECTION',
  5: 'LINKEDIN_CONNECTION_WITH_MESSAGE',
  9: 'LINKEDIN_MESSAGE',
  15: 'LINKEDIN_LIKE_RECENT_POST',
  6: 'TWITTER_FOLLOW',
  16: 'TWITTER_UNFOLLOW',
  7: 'TWITTER_MESSAGE',
  8: 'ONE_OFF_EMAIL',
  12: 'START_NODE',
  10: 'IF_NODE',
  11: 'STOP_NODE',
  13: 'NOTE_NODE',
  21: 'MOVE_TO_ANOTHER_CAMPAGIN',
}

Node.Types = {
  'startNode': 'Start Node',
  'emailNode': 'Email Node',
  'waitNode': 'Wait Node',
  'ifNode': 'If Node',
  'stopNode': 'Stop Node',
  'noteNode': 'Note Node',
  'linkedinProfileVisitNode': 'LinkedIn Profile Visit Node',
  'linkedinConnectionNode': 'LinkedIn Connection Node',
  'linkedinConnectionWithMessageNode': 'LinkedIn Connection With Message Node',
  'linkedinMessageNode': 'LinkedIn Message Node',
  'linkedinLikeRecentPostNode': 'LinkedIn Like Recent Post Node',
  'twitterFollowNode': 'Twitter Follow Node',
  'twitterDMNode': 'Twitter DM Node',
  'twitterUnFollowNode': 'Twitter UnFollow Node',
  'moveToAnotherCampaignNode': 'Move To Another Campaign Node',
}

Key Notes:

We support A/B testing. subject = Subject A, subject_b = Subject B test. Same for body: body = Body A, body_b = Body B.

bash
{
  "id": "2852bfde-49f0-4108-a137-85e858348241",
  "data": {
    "type": 10,
    "wait": 1,
    "event": "country",
    "label": "If Node",
    "wait_unit": "days",
    "comparison": "=",
    "step_number": 1,
    "send_as_reply": false,
    "comparison_value": "US"
  },
  "type": "ifNode",,
  "true_step_number": 2,
  "false_step_number": 3,
  "width": 384,
  "height": 214,
  "dragging": false,
  "position": {
    "x": 374.1282297640014,
    "y": -395.7084951681734
  },
  "selected": false,
  "positionAbsolute": {
    "x": 374.1282297640014,
    "y": -395.7084951681734
  },
  "next_step_number": null
}

Update a Single Node in a Sequence

The first message below is a Twitter follow message.

bash
curl -X PUT https://api.supersend.io/v1/auto/sequence -H "Authorization: Bearer <API_KEY>" -H "Content-Type: application/json" -D '{  "messages": [
  {
    "data": {
        "sent": false,
        "test": "a",
        "type": 1,
        "wait": 1,
        "label": "Email",
        "body_a": "<p>Welcome to new world</p>",
        "body_b": "<p>Welcome to another world</p>",
        "body_c": "",
        "body_d": "",
        "finish": false,
        "public": false,
        "deleted": false,
        "subject_a": "New World",
        "subject_b": "Another World",
        "subject_c": "",
        "subject_d": "",
        "wait_unit": "hours",
        "step_number": 0,
        "send_as_reply": false
    },
    "type": "emailNode",
    "style": {
        "width": 250,
        "height": 250
    },
    "width": 250,
    "height": 250,
    "status": "current",
    "dragging": false,
    "position": {
        "x": 325.41129771978865,
        "y": -308.72513064223426
    },
    "selected": false,
    "positionAbsolute": {
        "x": 325.41129771978865,
        "y": -308.72513064223426
    }
  },
  {
    "data": {
        "type": 2,
        "wait": 1,
        "label": "Wait Node",
        "wait_unit": "days",
        "step_number": 1,
        "send_as_reply": false
    },
    "type": "waitNode",
    "width": 384,
    "height": 126,
    "status": "upcoming",
    "dragging": false,
    "position": {
        "x": 355.17094502527937,
        "y": -1.5414901386073439
    },
    "selected": false,
    "positionAbsolute": {
        "x": 355.17094502527937,
        "y": -1.5414901386073439
    }
  },
  {
    "data": {
        "body": "",
        "sent": false,
        "test": "a",
        "type": 1,
        "wait": 1,
        "label": "Email",
        "body_a": "<p>World A</p>",
        "body_b": "<p>World B</p>",
        "body_c": "",
        "body_d": "",
        "finish": false,
        "public": false,
        "deleted": false,
        "subject_a": "",
        "subject_b": "",
        "subject_c": "",
        "subject_d": "",
        "wait_unit": "hours",
        "step_number": 2,
        "send_as_reply": true
    },
    "type": "emailNode",
    "style": {
        "width": 250,
        "height": 250
    },
    "width": 250,
    "height": 250,
    "status": "upcoming",
    "dragging": false,
    "position": {
        "x": 283.781307474487,
        "y": 185.22378777916458
    },
    "selected": true,
    "positionAbsolute": {
        "x": 283.781307474487,
        "y": 185.22378777916458
    }
  },
  {
    "data": {
        "type": 2,
        "wait": 1,
        "label": "Wait Node",
        "wait_unit": "days",
        "step_number": 3,
        "send_as_reply": false
    },
    "type": "waitNode",
    "width": 384,
    "height": 126,
    "status": "upcoming",
    "dragging": false,
    "position": {
        "x": 355.17094502527937,
        "y": -1.5414901386073439
    },
    "selected": false,
    "positionAbsolute": {
        "x": 355.17094502527937,
        "y": -1.5414901386073439
    }
  },
  {
    "id": "d878c346-f38b-4d34-ba38-8abc66fca03b",
    "data": {
      "body": "",
      "sent": false,
      "team": {
        "id": "06c58219-5879-4d63-b689-7dee76b661d5",
        "name": "My Team"
      },
      "type": 21,
      "wait": 1,
      "label": "Move To Another Campaign",
      "body_b": "",
      "finish": false,
      "public": false,
      "deleted": false,
      "subject": "",
      "campaign": {
        "id": "4fbbda2f-5fb8-4a9d-9f03-e427a90f8ad7",
        "name": "Eighth Campaign"
      },
      "subject_b": "",
      "wait_unit": "days",
      "step_number": 4,
      "send_as_reply": false
    },
    "type": "moveToAnotherCampaignNode",
    "style": {
      "width": 250,
      "height": 150
    },
    "width": 250,
    "height": 150,
    "dragging": false,
    "position": {
      "x": 1185.1325899041324,
      "y": 1910.6987519168117
    },
    "selected": false
  }
],
"TeamId":"xx",
"CampaignId":"xx"
}'
bash
curl -X PUT 'https://api.supersend.io/v1/auto/message/:node_id/' -H "Authorization: Bearer <API_KEY>" -H "Content-Type: application/json" -D '{     "message": {
        "id": "f1d5e49a-00a5-49dc-a8b1-c604fda021e0",
        "data": {
            "body": "",
            "sent": false,
            "test": "a",
            "type": 1,
            "wait": 1,
            "label": "Email",
            "body_a": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>",
            "body_b": "<p>sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</p>",
            "finish": false,
            "public": false,
            "deleted": false,
            "subject": "",
            "subject_a": "Welcome to New World",
            "subject_b": "",
            "wait_unit": "days",
            "step_number": 3,
            "send_as_reply": false
        },
        "type": "emailNode",
        "level": 1,
        "style": {
            "width": 250,
            "height": 250
        },
        "width": 250,
        "height": 250,
        "dragging": false,
        "position": {
            "x": 594.9026787757265,
            "y": -102.86708848319853
        },
        "selected": false,
        "next_step_number": 5,
        "positionAbsolute": {
            "x": 594.9026787757265,
            "y": -102.86708848319853
        }
    },
    "TeamId": "xxx-xxx",
    "CampaignId": "xxx-xxx"
}'
bash
curl -X GET 'https://api.supersend.io/v1/auto/sequence?TeamId=xxx&CampaignId=xxx' -H "Authorization: Bearer <API_KEY>" -H "Content-Type: application/json"

Get Sequence

The second message below is a standard wait step.