Get Campaigns API

This API is used to get the campaign details..

📘

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.

Headers

The following table describes the request headers:

Request HeaderDescription
content-typeapplication/json
authorizationAccess token or API Secret Key in Bearer format

Example: Bearer $(key)

Request Example



https://yourapihubdomain.io/v1/campaigns
https://yourapihubdomain.io/v1/campaigns/16663731580000

Response Parameters

This API will return the following response parameters:

ParameterDescription
refernceidReturns the reference id that was provided to the campaign at the time of campaign creation.
nameReturns the name of the campaign
idReturns the id of the campaign
imageUriReturns the Image URI path of the campaign logo.
channelsReturns the deployment channels that were created in the campaign.
categoryIdReturns the category id
priorityReturns the priority that is configured to the campaign
createdOnReturns the campaign created.
createdByReturns the API user id who created the campaign.
deploymentsCountReturns the deployments that are available in the campaign.
businessStakeHolderReturns the business stake holder that is provided at the time of creating the campaign.
notificationsReturns the notifications object. This parameter will be returned only when a specific campaign id is passed in the API request. The following are the parameters in the object:
emailId: Returns the email id that is configured to receive notifications about the deployment status.
description: Returns the description that is entered for the notification recipient.
status: Returns the notification recipient is set to active or inactive to receive notifications. The options are:
1- active
0 - inactive
excepitonAlert: Returns 1 if the exception alerts are enabled for the notification recipient, else returns 0
* defaultUser: Returns 1 if the notification recipient is default notification recipient, else returns 0.

Response Example

[
   {
        "refernceid": "213213",
        "name": "Sample_Campaign",
        "id": "16530562950025",
        "imageUri": "https://campaignapi-staging.qa.webexcampaign.io/assets/group_images//1594233859535_Campaign_Conn_ST16530562934751653056295900.jpg",
        "channels": [
            "SMS"
        ],
        "categoryId": "Others",
        "referenceId": "213213",
        "priority": 0,
        "createdOn": "2022-05-20",
        "createdBy": "1594233859535",
        "deploymentsCount": 1,
        "businessStakeHolder": ""
    },
      {
        "refernceid": "2132143",
        "name": "_Blackfriday_Campaign",
        "id": "16530533520022",
        "imageUri": "https://campaignapi-staging.qa.webexcampaign.io/assets/group_images//1594233859535_Campaign_Conn_ST16530533499081653053352318.jpg",
        "channels": [
            "SMS"
        ],
        "categoryId": "Others",
        "referenceId": "213213",
        "priority": 0,
        "createdOn": "2022-05-20",
        "createdBy": "1594233859535",
        "deploymentsCount": 1,
        "businessStakeHolder": ""
    )

  
  ]

Failure Response Codes

The API will return code within the response as per the following table in case of failure scenarios.

HTTP Status CodeCode within API ResponseDescription
400400I/O error on post request. Cannot retry due to server authentication, in streaming mode.
401430Authorization failed. This resource is not allowed to access using this TOKEN or KEY
401498Invalid token or Access token expired
404404Not found
405405Method not supported
500500Internal server error
Language