APIs
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.
The update API hard deletes the previous sequence and recreates them with new ones. Relying on a MessageId after a campaign has started is not a good idea.
Please be super careful when using the update API. You could easily blow up your campaign by not having the correct steps in place for Super Send to work correctly.
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.
Message Types:
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',
}
We support a/b testing. subject
= subject A, subject_b
= B test. Same for body. body
= body A, body_b
= body B.
The first message below is a twitter follow message
The second message below is a standard wait step.
The third message below is a standard email message.
Every message must have a wait step between two messages.
body
takes HTML
curl -X PUT https://api.supersend.io/v1/auto/sequences \
-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"
}'
Get Sequence
curl -X GET 'https://api.supersend.io/v1/auto/messages?TeamId=xxx&CampaignId=xxx' \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"