Endpoints:
Description: Returns all audiences/ segments within your account.
Endpoint: (GET) /campaigns/:uid
Response body:
{
"data": [
{
"id": "1000",
"userID": "1002",
"name": "Test",
"avatar": "",
"created": 1588201524,
"updated": 1588210437,
"type": "TEXT",
"isActive": true,
"archived": true,
"approved": 0,
"audiences": [
"all"
],
"templates": {
"body": "This is my preview of my super awesome {{brand}} message. \n\nAnother thing is 😍 emojies and macros like: {{loyaltySignupURL}}",
"scheduled": 1586905489,
"timezone": "",
"recurDays": -1,
"isMMS": true
},
"mediaURL": "http://localhost:8081/campaign/media/1002/1000",
"mediaContentType": "image/jpeg",
"sendAtTimePredicted": false,
"lastRun": 0,
"summary": {
"msgsSent": 1035021425041826800,
"msgsErrored": 345007141680608960,
"msgsReceived": 0,
"clicks": 1445707579500388000,
"redemptions": 0,
"discountRedemptions": 0,
"unsubscribes": 643250523199744900,
"convs": 1445707579500388000,
"uniqueClicks": 1445707579500388000,
"mmsCost": 0.15121625956751644,
"smsCost": 0.2855708438656657,
"uniqueUsers": 6005807097831053000,
"remainingUsers": 0,
"totalEligible": 0
}
},
]
}
Field | Type | Description | |
---|---|---|---|
id | string | ID of campaign | |
userID | string | User ID this campaign resides under | |
name | string | Name of campaign | |
avatar | string | The avatar for the campaign | |
created | epoch | When this campaign was created | |
updated | epoch | Last time this campaign was updated | |
type | string | Type of campaign “TEXT” is the only value at this moment | |
isActive | bool | Whether or not the campaign is LIVE or PAUSED | |
archived | bool | Whether or not the audience is archived | |
audiences | array | Audience ID’s this campaign will send to | |
templates | obj | The campaigns body message, scheduled start date if any, timezone, if it’s suppose to recur after a certain number of days (-1 = never recur), isMMS (if the sms is sending a media file). | |
mediaURL | string | URL to media for MMS if applicable | |
mediaContentType | string | Content type for media | |
sendAtTimePredicted | bool | Whether or not you want Alpine machine learning to send the message only within 2 hours of the time the persona normally visits the store. Fallback for avg across audiences targeted by campaign. | |
lastRun | epoch | Last time the SMS campaign was sent | |
summary | obj | And object full of stats related to the campaign. Note: “redemptions” is loyalty points redemptions vs “discountRedemptions” which is custom discounts not tied to points. |