List of campaigns for an account.
Response format | JSON |
---|---|
Requires authentication? | Yes |
channel_sid optional | Filter by SID |
---|---|
status optional | Filter by status (unscheduled, scheduled, sending, completed) |
name optional | Filter by campaign name |
curl -X GET \
-u '[SID]:[TOKEN]' \
'https://api.essential.to/v2/account/campaigns'
# Sample response
[
{
"name": "Test Campaign",
"external_ref_id": "",
"send_at": null,
"status": "unscheduled",
"body": "Message to be sent",
"media_urls": [
""
],
"created_at": "2016-12-01T03:20:00.000Z",
"updated_at": "2016-12-01T03:30:00.000Z",
"sid": "GNeqmVGQmWay8DDypTdgVg",
"account_sid": "XsbrYCSo2m0sShMLOlZqtw",
"channel_sid": "sRhvpNDGZwyDeH-YRZIr9A",
"tag_expression": {
"tag_sids": null,
"left": null,
"operator": "UNION",
"right": null
},
"send_to_inboxed": true,
"results": [
]
},
{
"name": "Special offer for new subscribers",
"external_ref_id": "",
"send_at": "2017-01-05T17:40:50.000Z",
"status": "completed",
"body": "This is the body of the campaign",
"media_urls": [
],
"created_at": "2017-01-03T16:20:00.000Z",
"updated_at": "2017-01-05T17:46:50.000Z",
"sid": "fVI2SxzLsjMH55V-YBiPjg",
"account_sid": "XsbrYCSo2m0sShMLOlZqtw",
"channel_sid": "sRhvpNDGZwyDeH-YRZIr9A",
"tag_expression": {
"tag_sids": [
"lYpW4kwdnrlVhpIrnmBahg",
"eJ1WDpPBufJuDDYVO5xrKg"
],
"left": null,
"operator": "UNION",
"right": null
},
"send_to_inboxed": true,
"results": [
{
"owner_type": "V2::Campaign",
"pending": 0,
"success": 1,
"failure": 0,
"created_at": "2017-01-05T17:45:50.000Z",,
"updated_at": "2017-01-05T17:46:50.000Z",,
"sid": "daBoeXvpfadRPgyYaaZJpw",
"account_sid": "PsbrYCSo2m0sShMLOlZqtw",
"owner_sid": "scshms-zuQVC039NSULS3A"
}
]
}
...
]
Python coming soon.
Node coming soon.