Copy Email Campaign
Use this interface to copy an existing Email Message Designer (EMD) Email campaign object.
The response returns the campaign object, which includes the campaign ID number and other campaign properties (echoing the request format). The links array contains the campaign object’s related API operations, specific to the campaign name where applicable.
Note: The Responsys Advanced API is generally available for all Responsys customers.
Service URL:
/rest/api/v1.5/campaigns/{campaignName}/actions/copy
Required Path Parameters:
campaignName
- Name of the campaign to be copied.
Request Method:
POST
Request Header:
Authorization=<AUTH_TOKEN>
Content-Type=application/json
Request Body - Required Properties:
newCampaignName – The name of the copy of the campaign.
description – A description of the new campaign. If null, the description of the existing campaign will be used.
folderName – The name of the folder where the existing campaign is located in Responsys. If null, the folder of the existing campaign will be used.
Sample Request Body
{
"newCampaignName": "<newCampaignName>",
"description": "<description>",
"folderName": "<folderName>"
}
Sample Response Body - Success
{
"id": "<campaignId>",
"name": "<campaignName>",
"folderName": "<folderName>",
"type": "EMAIL",
"purpose": "PROMOTIONAL",
"description": <description>,
"dataSource": [
{
"path": "folderName/objectName",
"alias": "<dataSourceAliasName>",
"fields": [
{
"name": "<columnName>",
"alias": "<aliasName>",
"lookUpKey": false,
"defaultValue": null
},
{
"name": "<columnName>",
"alias": "<aliasName>",
"lookUpKey": false,
"defaultValue": null
}
],
"type": "PROFILE_LIST",
"defaultValue": null
}
],
"supplementaryLookupDataSource": [
{
"path": "Rest_<folderName>/Table1",
"alias": "Table1",
"fields": [
{
"name": "TEST1",
"alias": "TEST1",
"lookUpKey": true
},
{
"name": "TEST2",
"alias": "TEST2",
"lookUpKey": true
}
]
}
],
"htmlMessagePath": "/contentlibrary/campaigns/Scenario 1.htm",
"enableLinkTracking": true,
"linkTablePath": "<folderName>/<campaignName>_linktable",
"enableExternalTracking": false,
"subject": "<#include \"cms://messagelibrary/email/90092387/DynamicSubjectLine.itl.txt\">",
"fromName": "<fromName>",
"fromEmail": "<fromEmail>",
"replyToEmail": “<replyToEmail>”,
"useUTF8": false,
"locale": "en",
"trackHTMLOpens": true,
"trackConversions": false,
"sendTextIfHTMLUnknown": false,
"unsubscribeOption": "OPTOUT_SINGLE_CLICK",
"autoCloseOption": "AUTO_CLOSE_X_DAYS_AFTER_LAST_RESPONSE",
"autoCloseValue": "90",
"links": [
{
"rel": "self",
"href": "/rest/api/v1.5/campaigns/<campaignName>/actions/copy",
"method": "POST"
},
{
"rel": "get",
"href": "/rest/api/v1.5/campaigns",
"method": "GET"
},
{
"rel": "get",
"href": "/rest/api/v1.5/campaigns/<campaignName>",
"method": "GET"
},
{
"rel": "update",
"href": "/rest/api/v1.5/campaigns/<campaignName>",
"method": "PUT"
},
{
"rel": "create",
"href": "/rest/api/v1.5/campaigns",
"method": "POST"
}
]
}
Sample Response Body - Failure
400 Bad Request
Invalid request parameters in folder name. Error when the folder name uses an invalid character:
{
"type": "",
"title": "Invalid request parameters",
"errorCode": "INVALID_PARAMETER",
"detail": "Invalid characters in the Folder Name",
"errorDetails": []
}
Folder not found. Error when there is no folder with the name used as the input:
{
"type": "",
"title": "Folder not found",
"errorCode": "FOLDER_NOT_FOUND",
"detail": "The Folder <folderName> is not found",
"errorDetails": []
}
Campaign already exists. Error when the campaign name already exists, including when the campaign name is the same as the original campaign’s name:
{
"type": "",
"title": "Campaign already exists",
"errorCode": "CAMPAIGN_ALREADY_EXISTS",
"detail": "A campaign named <campaignName> already exists",
"errorDetails": []
}
Invalid request parameters in campaign name. Error when the campaign name contains an invalid character:
{
"type": "",
"title": "Invalid request parameters",
"errorCode": "INVALID_PARAMETER",
"detail": "'null' or illegal characters in campaignName",
"errorDetails": []
}
Invalid request parameters when the campaign name is too long. Error when the campaign name exceeds 150 characters:
{
"type": "",
"title": "Invalid request parameters",
"errorCode": "INVALID_PARAMETER",
"detail": "campaignName exceeds 150 characters",
"errorDetails": []
}
Not a valid campaign. Error when the campaign is a classic campaign instead of an EMD campaign:
{
"type": "",
"title": "Invalid request parameters",
"errorCode": "INVALID_PARAMETER",
"detail": "campaignName exceeds 150 characters",
"errorDetails": []
}
Not a valid campaign. Error when the campaign is a non-EMD campaign (e.g. SMS or push campaign):
{
"type": "",
"title": "Not a valid campaign",
"errorCode": "CAMPAIGN_IS_INVALID",
"detail": "Only applicable for Email campaigns whereas [<campaignName>] is a Email campaign",
"errorDetails": []
}
401 Unauthorized
API disabled for user. Error when the user does not have advanced API access, or when the user’s account does not have the message designer feature enabled.
{
"type": "",
"title": "API disabled for user",
"errorCode": "API_DISABLED_FOR_USER",
"detail": "API is disabled for user",
"errorDetails": []
}