Get published messages

Use this REST API to get a list of published messages by channel (SMS or Push) along with given attributes so that the list can be used for further consumption. Messages are listed in order by Date, then by Message ID. If an organization has more than 50 published messages per channel, the first 50 messages are displayed and a nextPageURL is provided for the user to access the additional published messages.

Requirements to use this API

  • Your Acoustic Campaign org must must be enabled for the channel specified in the API call (SMS or Push).
    
  • A database in your Acoustic Campaign org must be enabled for the channel specified in the API call (SMS or Push).
    
  • The user making the API call must be enabled for the channel specified in the API call (SMS or Push).
    
  • The user making the API call must have valid [Oauth credentials](https://developer.goacoustic.com/acoustic-campaign/reference/getting-started-with-oauth). 
    

📘

Note:

Up to 10 concurrent requests are allowed to our API servers at any given time when using the OAuth method for authentication.

Endpoint

GET /channels/{channel}/publishedmessages

Request parameters

AttributeDescriptionExample
Channel (required)The channel for which you want to retrieve a list of published messages (either Push or SMS), – string.SMS

Published message attributes

AttributeDescriptionExample
idMessage IDc005b0b4-c805-47f9-ae49-2b52831b7662
NameMessage nameSMS welcome message
campaignNameCampaign associated with the published messageSpring promo
contactSourceIdID of the contact source associated with the published message.320000
programIdsSMS program ID(s) associated with the published message (SMS only)123456

Sample response body – Push

{
“meta”: {
“attributes”: {},
“generalErrors”: [],
“fieldErrors”: {},
“links”: [],
“nextPageUrl”: “https://engage-qa1-api.adm01.com/rest/channels/push/publishedmessages?page=2”
},
“data”: [

{
“id”: “24f339a0-cebe-4207-b385-2a1e4a5145bf”,
“name”: “Inbox – Video Published Message”,
“campaignName”: “Spring Promo”,
“contactSourceId”: 321687,
“programIds”: null
},
{
“id”: “a74850f7-ba91-4fd5-8689-50d7213c4142”,
“name”: “Inbox – Image Published Message”,
“campaignName”: “Spring Promo”,
“contactSourceId”: 321687,
“programIds”: null
}
] }

Sample response body – SMS

{
“meta”: {
“attributes”: {},
“generalErrors”: [],
“fieldErrors”: {},
“links”: [],
“nextPageUrl”: “https://engage-qa1-api.adm01.com/rest/channels/sms/publishedmessages?page=2”
},
“data”: [
{
“id”: “e3c3d1ea-e54b-458d-b32b-18a99f63b58c”,
“name”: “4.16 SMS published”,
“campaignName”: null,
“contactSourceId”: 320008,
“programIds”: “141690”
},
{
“id”: “9e5df88b-d7de-4936-ab38-56244d5d5948”,
“name”: “Spring sale 4-18″,
“campaignName”: null,
“contactSourceId”: 320008,
“programIds”: “119820”
}
] }

Sample response body – no published messages exist for specified channel

{
“meta”: {
“attributes”: {},
“generalErrors”: [],
“fieldErrors”: {},
“links”: [],
“nextPageUrl”: null
},
“data”: [] }

Response codes

ScenarioResponse codeMessage
Success200n/a
Did not specify channel as SMS or Push400Delivery draft type not defined for name: [specified channel]
User is not on an Org enabled for the channel specified in the API call403Forbidden
User calling the API is not enabled for the channel specified in the API call403Forbidden

Test your API call

Use Swagger to test your API call. To access the Swagger environment for your Org, replace {POD#} with the Pod where your Org exists:

https://api{POD#}.silverpop.com/restdoc/#!/channels/ published_messages_get_get_0

For example, here’s the link to use if your Org is on Pod 1:

https://api1.silverpop.com/restdoc/#!/channels/published_messages_get_get_0