This is a tenant-specific API that is made available to specific clients. If you want to use this API, please contact your Webex Campaign representative to discuss your requirements. Your additional monthly charges will depend on how many days' transactions you need to have available with this API and your average daily outbound/inbound transactions count.
This API is used to get the last N transactions based on MSISDN or Email or Push ID. The transactions are sorted in ascending order by transaction date.
This API will also return the applicable message preview URLs along with customer transactions (SMS, Email, App Push Channels only). The Preview URLs will be included in the API response (over secure HTTPS protocol). A client will then be able to ingest these responses from this API and display this information within their own into their own Customer Care system. When a client’s customer care staff clicks on the Preview URL, they will be redirected to the Webex Campaign-generated HTTPS URL.
This API will not work if you wish to use an Email id to fetch an SMS or MMS transaction or MSISDN to fetch an Email transaction although the target data contains MSISDN and Email headers.
Know your endpoint
Based on the domain you use to log in to Webex Campaign, the endpoint domain for your API varies. For more information, refer to the Know Your API Endpoints section.
Go to the Postman Collection section to learn how to import a Postman collection. Click the below button, If you already know how to import a postman collection.
Headers
The following table describes the request headers:
Request Header | Description |
---|---|
content-Type | application/json |
authorization | Access token or API Secret Key in Bearer format Example: Bearer $(key) |
Body Parameters
The following table describes the elements in the request body:
Parameter | Type | Mandatory | Description |
---|---|---|---|
key | String | Conditionally | Specifies MSISDN or Email ID or APP Device ID. |
customer-id | String | Conditionally | Specifies either key or Customer ID. |
count | String | No | Specifies the number of transactions to retrieve. A maximum of 50 transactions can be retrieved in a single API call. |
from-date | String | No | Specifies from the date in the format yyyy-MM-dd. |
to-date | String | No | Specifies to date in the format yyyy-MM-dd. |
channel | String | No | Specifies the channel. The options are: SMS MMS USSD OBD APP |
message_preview | String | No | This parameter is used to get the URL of the preview message. To get the URL in the response, set this parameter to true (message_preview=true). |
Request Example
https://<yourdomain>/campaignapi/resources/v3/[email protected]&customer-id=CID100&count=2&message_preview=true
Response Parameters
This API will return the following response parameters:
Parameter | Description |
---|---|
campaign-id | Returns the Campaign ID. |
campaign-name | Returns the Campaign Name. |
deployment-id | Returns the Deployment ID. |
deployment-name | Returns the Deployment Name. |
deployment-date | Returns the Transaction date. The date format will be in yyyy-MM-dd HH:mm:ss format and Time Zone will be in server’s time zone. |
key | Returns the MSISDN or Email ID or APP Device ID. |
customer-id | Returns the customer ID. |
transaction-status | Returns one of the following status values: Successfully delivered to the Customer Failed to deliver to the Customer Attempted Send Expired Duplicate Invalid Partial Delivery Notpushed, InternalException Attempted Send successfully Pushed to Gateways Notpushed, GlobalDND Notpushed, ChannelDND Notpushed, CategoryDND Notpushed, CampaignDND Notpushed, DeploymentBlackListDND Notpushed, Controlgroup Notpushed, PolicyBreached Notpushed, Filtersapplied Notpushed, Abandoned Notpushed, DeploymentStopped Notpushed, Calendartimedout Notpushed, Others Notpushed, Limit reached Notpushed, Runtimefilter Email, hardbounced EmailSoftbounced Email, Mailblocks Email, ISPcomplaints DNDAddition DNDRemoval Email Unsubscribe MSISDN Unsubscribe EventProcessedSuccess EventProcessedFailed MOProcessedSuccess MOProcessedFailed Email,Opened Email, LinkClicked ActionProcessedSuccess ActionProcessedFailed SMS, LinkClicked USSD, DTMF Click Transaction MMS, LinkClicked OBD Success-Completed OBD Success-In Complete OBD Failed -NotAnswered OBD Failed -Rejected OBD Failed -Dropped OBD Failed -Busy OBD Failed - Out of Reach OBD Failed - Switched Off OBD Failed - Others OBD Failed-Number not obtainable OBD Failed-Number not in service App notification, Opened Landing Page Open * Landing Page Submit |
error-code | Returns the error code of the transaction. |
channel | Returns the channel name. 0-SMS 1-MMS 3-USSD 6-OBD 7-EMAIL 8-APP |
description | Returns the description of the response. |
transaction-id | Returns the unique Transaction ID of the operation. |
link-transaction-id | Returns the pushed transaction id for the responses. |
code | Returns the response code. |
msg_preview_url | Returns the URL to preview the message. |
Failure Response Codes
The API will return code within the response as per the following table in case of failure scenarios.
HTTP Status Code | Code within API Response | Description |
---|---|---|
200 | 1010 | The request was not processed. |
401 | 430 | Authorization failed. This resource is not allowed to access using this TOKEN or KEY |
498 | Invalid token or Access token expired | |
405 | 405 | Method not supported |
429 | 429 | Too many requests. Throttle limit reached for the time window. |
499 | 499 | Request failed. Check the exact reason of failure in application code and description of error stream. |
500 | 500 | Internal server error |
1001 | Invalid input JSON | |
1002 | Mandatory field missing such as key _or _customer id. |