get https://yourapihubdomain.io/v1/campaigns
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 Header | Description |
---|---|
content-type | application/json |
authorization | Access 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:
Parameter | Description |
---|---|
refernceid | Returns the reference id that was provided to the campaign at the time of campaign creation. |
name | Returns the name of the campaign |
id | Returns the id of the campaign |
imageUri | Returns the Image URI path of the campaign logo. |
channels | Returns the deployment channels that were created in the campaign. |
categoryId | Returns the category id |
priority | Returns the priority that is configured to the campaign |
createdOn | Returns the campaign created. |
createdBy | Returns the API user id who created the campaign. |
deploymentsCount | Returns the deployments that are available in the campaign. |
businessStakeHolder | Returns the business stake holder that is provided at the time of creating the campaign. |
notifications | Returns 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 Code | Code within API Response | Description |
---|---|---|
400 | 400 | I/O error on post request. Cannot retry due to server authentication, in streaming mode. |
401 | 430 | Authorization failed. This resource is not allowed to access using this TOKEN or KEY |
401 | 498 | Invalid token or Access token expired |
404 | 404 | Not found |
405 | 405 | Method not supported |
500 | 500 | Internal server error |