Update Campaign API

This API is used to create a campaign. You can create deployments within a campaign.

📘

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 Headers

The following table describes the elements in the request body:

ParameterTypeMandatoryDescription
nameStringYesSpecifies the name of the campaign.
referenceidStringNoSpecifies a reference id for the campaign.
imageNameStringNoSpecifies the name for the campaign logo image. The size should not be more than 100x100 px size.
imageContentStringNo (Mandatory only when imageName is provided in the request)Specifies the image content in base64 format.
categoryIdStringYesSpecifies the category id for the campaign.
priorityIntegerNoSpecifies the priority for the campaign. The options are
0 - low
1 - medium
* 2 - high
notificationsObjectYesSpecifies the notifications to be received for the configured email ids. The parameters are:

emailId: Specifies the email id of the notification recipient about the deployment status.
description: Specifies the description for the email id that is entered for the notification recipient.
status: Specifies the notification recipient is set to active or inactive to receive notifications. The options are:
1- active
0 - inactive
excepitonAlert: Specifies if the exception alerts are enabled for the notification recipient. The options are:
1- enabled
0 - not enabled
defaultUser: Specifies if the notification recipient is default notification recipient. The options are
1- default recipient
* 0 - additional recipient
alertsettingsObjectYesSpecifies the alert settings. The parameters are:

alertType: Specifies the alert notification. The options are:
N0002
businessStakeHolderStringNoSpecifies the business stakeholder.

Request Example

{
    "refernceid": "20222023",
    "name": "Sample_campaign",
    "imageName":"logoimage.png",
    "imageContent": "iVBORw0KGgoAAAANSUhEUgAAAGQAAABjCAIAAADihTK7AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAABVNSURBVHhe3Z15WBRXusY1LqCiqMgqCCiIoOCezDUxmehoxhgT7yTmJtGbZZLJowYaARW3uMYkxHHDxGiMk0lGjSHGBLpZBARFMaKAIIuo7HZ3nd53+DP3qz6ni6agu6tXfO77vPLQXdXL+fGd73yn6lQ5qHugpe/qulDROnVb/if8OrlaR559nPSHSQMMS6s3",
    "categoryId": "Others",
    "priority": 0,
    "notifications": [
        {
            "emailId": "[email protected]"
        }
    ],
   "alertsettings": [
        {
            "alertType": "N0002"

        } 
    ],
    "businessStakeHolder": "marketing"
}

Response Parameters

This API will return the following response parameters:

ParameterDescription
idReturns the id of the campaign
nameReturns the name of the campaign
messageReturns the confirmation message

Response Example

{
    "id":"16710994420000",
    "name":"Sample_Campaign",
    "message":"Campaign updated successfully."
}

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.
400400Campaign category is required
400400Image Content is required.
400400Maximum Permissible Priority is High. User cannot create campaigns above than this priority.
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
5001001Invalid input JSON
Language