Create Email Campaign

Use this interface to create an 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

Request Method:

POST

Request Header:

Authorization=<AUTH_TOKEN>

Content-Type=application/json

Request Body - Required Properties:

name – Name of the new campaign

folderName – Name of the folder that will contain the new campaign

dataSource – Details about the Data Sources for the campaign including Profile List. The properties path, fields, and type must be specified.

Sample Request Body

{
  "name": "testcampaign-b11",
  "folderName": "testfolder",
  "type": "EMAIL",
  "description": "<description>",
  "purpose": "PROMOTIONAL",
  "marketingStrategy": "<strategy>",
  "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
    }
  ],
  "marketingProgram": "<program>",
  "filterPaths": [
    "foldername/objectName1",
    "foldername/objectName2"
  ],
  "refiningDataSourcePath": "foldername/objectName1",
  "proofListPath": "foldername/objectName1",
  "seedListPath": "foldername/objectName1",
  "supplementaryProofDataSourcePaths": [
    "foldername/objectName1",
    "foldername/objectName2"
  ],
  "supplementarySeedDataSourcePaths": [
    "foldername/objectName1",
    "foldername/objectName2"
  ],
  "supplementaryLookupDataSource": [
    {
      "path": "foldername/objectName1",
      "alias": "<data source alias name>",
      "fields": [
        {
          "name": "<column name>",
          "alias": "<alias name>",
          "lookUpKey": true
        }
      ]
    }
  ],
  "suppressionListPaths": [
    "foldername/objectName1",
    "foldername/objectName2"
  ],
  "subject": "<subject>",
  "fromName": "<from name>",
  "fromEmail": "<from email>",
  "replyToEmail": "<reply to email>",
  "bccEmail": "<bcc email>",
  "htmlMessagePath": "documentPath",
  "textMessagePath": "documentPath",
  "enableExternalTracking": true,
  "externalTrackingParams": {
    "name1": "value1",
    "name2": "value2"
  },
  "enableLinkTracking": true,
  "linkTablePath": "foldername/objectName1",
  "attachmentPaths": [
    "documentPath1",
    "documentPath2"
  ],
  "useUTF8": true,
  "locale": "<value>",
  "trackHTMLOpens": true,
  "trackConversions": true,
  "sendTextIfHTMLUnknown": true,
  "segmentTrackingColumnName": "<name>",
  "unsubscribeOption": "OPTOUT_SINGLE_CLICK",
  "unsubscribeFormName": "name",
  "autoCloseOption": "NO_AUTO_CLOSE",
  "autoCloseValue": "<value>",
  "closedCampaignURL": "<URL>",
  "externalCampaignCode": "<code>",
  "salesForceCampaignId": "<salesforce id>"
}

Sample Response Body

{
  "id": 1000,
  "name": "testcampaign-b11",
  "folderName": "testfolder",
  "type": "EMAIL",
  "description": "<description>",
  "purpose": "PROMOTIONAL",
  "marketingStrategy": "<strategy>",
  "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
    }
  ],
  "marketingProgram": "<program>",
  "filterPaths": [
    "foldername/objectName1",
    "foldername/objectName2"
  ],
  "refiningDataSourcePath": "foldername/objectName1",
  "proofListPath": "foldername/objectName1",
  "seedListPath": "foldername/objectName1",
  "supplementaryProofDataSourcePaths": [
    "foldername/objectName1",
    "foldername/objectName2"
  ],
  "supplementarySeedDataSourcePaths": [
    "foldername/objectName1",
    "foldername/objectName2"
  ],
  "supplementaryLookupDataSource": [
    {
      "path": "foldername/objectName1",
      "alias": "<data source alias name>",
      "fields": [
        {
          "name": "<column name>",
          "alias": "<alias name>",
          "lookUpKey": true
        }
      ]
    }
  ],
  "suppressionListPaths": [
    "foldername/objectName1",
    "foldername/objectName2"
  ],
  "subject": "<subject>",
  "fromName": "<from name>",
  "fromEmail": "<from email>",
  "replyToEmail": "<reply to email>",
  "bccEmail": "<bcc email>",
  "htmlMessagePath": "documentPath",
  "textMessagePath": "documentPath",
  "enableExternalTracking": true,
  "externalTrackingParams": {
    "name1": "value1",
    "name2": "value2"
  },
  "enableLinkTracking": true,
  "linkTablePath": "foldername/objectName1",
  "attachmentPaths": [
    "documentPath1",
    "documentPath2"
  ],
  "useUTF8": true,
  "locale": "<value>",
  "trackHTMLOpens": true,
  "trackConversions": true,
  "sendTextIfHTMLUnknown": true,
  "segmentTrackingColumnName": "<name>",
  "unsubscribeOption": "OPTOUT_SINGLE_CLICK",
  "unsubscribeFormName": "name",
  "autoCloseOption": "NO_AUTO_CLOSE",
  "autoCloseValue": "<value>",
  "closedCampaignURL": "<URL>",
  "externalCampaignCode": "<code>",
  "salesForceCampaignId": "<salesforce id>",
  "links": [
    {
      "rel": "self",
      "href": "/rest/api/v1.5/campaigns",
      "method": "POST"
    },
    {
      "rel": "get",
      "href": "/rest/api/v1.5/campaigns",
      "method": "GET"
    },
    {
      "rel": "get",
      "href": "/rest/api/v1.5/campaigns/testcampaign-b11",
      "method": "GET"
    },
    {
      "rel": "update",
      "href": "/rest/api/v1.5/campaigns/testcampaign-b11",
      "method": "PUT"
    }
  ]
}