Close Campaign

Use this API to close a campaign and terminate its related listeners.

Note: The Responsys Advanced API is generally available for all Responsys customers.

Service URL:

/rest/api/v1.3/campaigns/(campaignName)/actions/close

Required Path Parameter:

campaignName - Name of the campaign to be closed.

Request Method:

PUT

Request Header:

Authorization=<AUTH_TOKEN>

Content-Type=application/json

Sample Request Body:

Not applicable

Sample Response in case of success:

{
  "status": true,
  "message": "",
  "links": [
    {
      "rel": "self",
      "href": "/rest/api/v1.3/campaigns/<campaignName>/actions/close",
      "method": "PUT"
    },
    {
      "rel": "searchCampaign",
      "href": "/rest/api/v1.3/campaigns/actions/search",
      "method": "POST"
    },
    {
      "rel": "copyCampaign",
      "href": "/rest/api/v1.3/campaigns/<campaignName>/actions/copy",
      "method": "POST"
    },
    {
      "rel": "get",
      "href": "/rest/api/v1.3/campaigns",
      "method": "GET"
    },
    {
      "rel": "get",
      "href": "/rest/api/v1.3/campaigns/<campaignName>",
      "method": "GET"
    },
    {
      "rel": "update",
      "href": "/rest/api/v1.3/campaigns/<campaignName>",
      "method": "PUT"
    },
    {
      "rel": "create",
      "href": "/rest/api/v1.3/campaigns",
      "method": "POST"
    }
  ]
}

Sample Response in case of failure:

400 Bad Request

Invalid character. Requests fail when the campaign name contains invalid characters. Error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "Invalid characters in the Campaign name: test^",
  "errorDetails": []
} 

401 Unauthorized

User has an insufficient role. Requests fail when the user does not have the Campaign Web Services Manager role. Error resembles:

{
  "type": "",
  "title": "Insufficient access",
  "errorCode": "INSUFFICIENT_ACCESS",
  "detail": "Insufficient privileges to invoke this API",
  "errorDetails": []
} 

User does not have access to the campaign. Requests fail when the user does not have access to the specified campaign. Error resembles:

{
  "type": "",
  "title": "Insufficient access",
  "errorCode": "INSUFFICIENT_ACCESS",
  "detail": "User WS_TL does not have access to campaign [KA_CopyCampaign ]",
  "errorDetails": []
} 

404 Not Found

Campaign does not exist. Requests fail when the campaign specified does not exist. Error resembles:

{
  "type": "",
  "title": "Campaign not found",
  "errorCode": "CAMPAIGN_NOT_FOUND",
  "detail": "Campaign not found with name [NotThereCamp]",
  "errorDetails": []
} 

Learn more