How it Works

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

  1. Your Watson Campaign Automation org must must be enabled for the channel specified in the API call (SMS or Push).
  2. A database in your Watson Campaign Automation org must be enabled for the channel specified in the API call (SMS or Push).
  3. The user making the API call must be enabled for the channel specified in the API call (SMS or Push).
  4. The user making the API call must have valid Oauth credentials

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

Attribute: Channel

Description: the channel for which you want to retrieve a list of published messages (either Push or SMS), string, required


Example:
  SMS

  

Published Message Attributes

Attribute

Description

Example

id

Message ID

c005b0b4-c805-47f9-ae49-2b52831b7662

 

Name

Message name

SMS Welcome Message

campaignName

Campaign associated with the published message

Spring Promo

contactSourceId

ID of the contact source associated with the published message

320000

programIds

SMS 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

Scenario

Response Code

Message

Success

200

 

Did not specify channel as SMS or Push

400

Delivery draft type not defined for name: [specified channel]

User is not on an Org enabled for the channel specified in the API call

403

Forbidden

User calling the API is not enabled for the channel specified in the API call

403

Forbidden

 

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

Join The Discussion

Your email address will not be published. Required fields are marked *