Fetch All Campaigns

get

/rest/api/v1.3/campaigns

Obtain the campaign properties for all EMD Email, Push, Message Center, SMS, or MMS campaigns.

Request

Supported Media Types
Query Parameters
  • Number of campaigns to return in the response (defaults to 200 and cannot exceed 200)
  • Starts at 0 and indicates the record number for the response result set
  • The type of campaigns to return in the response (email, push, sms, mms or pushiocampaign, defaults to email)
Back to Top

Response

Supported Media Types

Default Response

Body ()
Root Schema : EMD Campaigns
Type: object
Title: EMD Campaigns
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Campaign
Type: object
Title: Campaign
Show Source
Nested Schema : attachmentPaths
Type: array
Attachments for the campaign.
Show Source
Nested Schema : campaignVariables
Type: object
Additional Properties Allowed
Show Source
Map of Name and value of campaign variables which are used as default values for text replacement.
Nested Schema : externalTrackingParams
Type: object
Additional Properties Allowed
Show Source
Map of Name and value of external tracking parameters.
Nested Schema : filterPaths
Type: array
Paths of filter to be used for this campaign. This can be used to select a group of customers to receive specific messages. Either standard filter or SQL View can be specified.
Show Source
Nested Schema : segmentPaths
Type: array
Segmentations are used to divide a list into segments using attributes of a profile extension table or profile list.
Show Source
Nested Schema : supplementaryCampaignDataSourcePaths
Type: array
Supplementary data sources can be used for inclusions or exclusions of the audience.
Show Source
Nested Schema : supplementaryProofDataSourcePaths
Type: array
Supplementary proof data sources can be used for inclusions or exclusions from proof list.
Show Source
Nested Schema : supplementarySeedDataSourcePaths
Type: array
Supplementary seed data sources can be used for inclusions or exclusions from seed list.
Show Source
Nested Schema : suppressionListPaths
Type: array
This is used to exclude recipients from data sources.
Show Source
Back to Top

Examples

Use this interface to get campaigns of a particular type (EMD Email, SMS, MMS, Message Center, or Push) and their properties. Use the type attribute to select the type of campaign objects to return.

For this API:
  • "Email" returns EMD email campaigns only; it does not return Classic campaigns.
  • "Push" (type=push) includes Push, Rich Push, and In-app campaigns. To query for "Message Center" campaigns separately, use the type=pushiocampaign query attribute.

IMPORTANT: To get all EMD email campaigns, your account must be enabled for Email Message Designer (EMD). To get all Push campaigns, your account must be enabled for Push. To get all Message Center campaigns, your account must be enabled for Push and for Message Center. To get all SMS campaigns, you account must be enabled for SMS. To get all MMS campaigns, you account must be enabled for MMS. Otherwise using the call will result in an error with HTTPS status code of 401 Unauthorized and API_DISABLED_FOR_USER in the error message payload.

Required request headers:

FIELDS DESCRIPTION
Authorization <AUTH_TOKEN>
Content-Type application/json

Request parameters:

FIELDS DESCRIPTION
offset starts at 0 and indicates the record number for the response result set (defaults to 0)
limit number of campaigns to return in the response (defaults to 200 and cannot exceed 200)
type the type of campaigns to return in the response (email, sms, mms, push, or pushiocampaign; it defaults to email if you do not specify a type)

Response Notes:

  • The response contains an array of up to 200 campaign objects per request. Use the next link in the response to get the next set of objects (if there are more than 200).
  • This API does not support fetching Classic Email campaigns, so the response will not contain Classic Email campaign objects.
  • Each item in the array contains a campaign object, which includes the campaign ID and the campaign's other properties.
  • The campaign properties returned in the response may vary, depending on what was configured for the campaign when it was created.
  • The response also contains a links array for the interface. This array contains the endpoints for obtaining the previous and next batch of campaign objects. Campaign operations links may or may not be supported by your level of access. The campaign properties returned in the response may vary, depending on what has been configured for the campaign in Responsys.
  • By default, Campaign Purpose is "Promotional" for Push.
  • The response body for Push and for Message Center queries include a new property, channelList. The value is the App Channel List name used by the campaign, and this property is only returned when type=push or type=pushiocampaign.
  • The response body includes some EMD campaign attributes, which may or may not be applicable for other campaign types. These values are set either to "false" or to the account-level settings. Examples: "trackHTMLOpens": false, "trackConversions": false, "sendTextIfHTMLUnknown": false, "unsubscribeOption": "OPTOUT_SINGLE_CLICK", "autoCloseOption": "AUTO_CLOSE_X_DAYS_AFTER_LAUNCH", "autoCloseValue": "30"
  • When an account has no campaigns for the type you have requested, a 200 OK status is returned but the campaigns array in the response body is empty.

Sample Request URL for Email:

TIP: Leave the following parameters set to their default values and use the "prev" and "next" links returned in the response to get additional EMD campaigns as needed.

    /rest/api/v1.3/campaigns?type=email
	

Sample Response

{
  "campaigns": [
    {
      "id": 1000,
      "name": "testcampaign-b11",
      "folderName": "testfolder",
      "type": "EMAIL",
      "campaignStatus": "ACTIVE",
      "description": "description",
      "purpose": "PROMOTIONAL",
      "marketingStrategy": "strategy",
      "marketingProgram": "program",
      "listName": "listname",
      "filterPaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "refiningDataSourcePath": "foldername/objectName1",
      "proofListPath": "foldername/objectName1",
      "seedListPath": "foldername/objectName1",
      "segmentPaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryCampaignDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryLookupDataSourcePaths"[
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryProofDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementarySeedDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "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"
      ],
      "campaignVariables": {
        "name1": "value1",
        "name2": "value2"
      },
      "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.3/campaigns/testcampaign-b11",
          "method": "GET"
        },
        {
          "rel": "create",
          "href": "/rest/api/v1.3/campaigns",
          "method": "POST"
        },
        {
          "rel": "updateCampaign",
          "href": "rest/api/v1.3/campaigns/testcampaign-b11",
          "method": "PUT"
        }
      ]
    },
    {
      "id": 1001,
      "name": "testcampaign-b12",
      "folderName": "testfolder",
      "type": "EMAIL",
      "campaignStatus": "ACTIVE",
      "description": "description",
      "purpose": "PROMOTIONAL",
      "marketingStrategy": "strategy",
      "marketingProgram": "program",
      "listName": "listname",
      "filterPaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "refiningDataSourcePath": "foldername/objectName1",
      "proofListPath": "foldername/objectName1",
      "seedListPath": "foldername/objectName1",
      "segmentPaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryCampaignDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryLookupDataSourcePaths"[
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryProofDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementarySeedDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "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"
      ],
      "campaignVariables": {
        "name1": "value1",
        "name2": "value2"
      },
      "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.3/campaigns/testcampaign-b12",
          "method": "GET"
        },
        {
          "rel": "create",
          "href": "/rest/api/v1.3/campaigns",
          "method": "POST"
        },
        {
          "rel": "updateCampaign",
          "href": "rest/api/v1.3/campaigns/testcampaign-b12",
          "method": "PUT"
        }
      ]
    }
  ],
  "links": [
    {
      "rel": "self",
      "href": "/rest/api/v1.3/campaigns?type=email",
      "method": "GET"
    },
    {
      "rel": "prev",
      "href": "/rest/api/v1.3/campaigns?limit=200&offset=0&type=email",
      "method": "GET"
    },
    {
      "rel": "next",
      "href": "rest/api/v1.3/campaigns?limit=200&offset=200&type=email",
      "method": "GET"
    }
  ]
}
	

Sample Request URL for Push campaigns

TIP: Leave the following parameters set to their default values and use the "prev" and "next" links returned in the response to get additional Push campaigns as needed.

    /rest/api/v1.3/campaigns?type=push
	

Sample Response

{
  "campaigns": [
    {
      "id": 1000,
      "name": "testcampaign-b11",
      "folderName": "testfolder",
      "type": "PUSH",
      "campaignStatus": "ACTIVE",
      "description": "description",
      "purpose": "PROMOTIONAL",
      "marketingStrategy": "strategy",
      "marketingProgram": "program",
      "listName": "listname",
      "channelList": "channelListName",
      "filterPaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "refiningDataSourcePath": "foldername/objectName1",
      "proofListPath": "foldername/objectName1",
      "seedListPath": "foldername/objectName1",
      "segmentPaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryCampaignDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryLookupDataSourcePaths"[
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryProofDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementarySeedDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "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"
      ],
      "campaignVariables": {
        "name1": "value1",
        "name2": "value2"
      },
      "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"
    },
    {
      "id": 1001,
      "name": "testcampaign-b12",
      "folderName": "testfolder",
      "type": "PUSH",
      "campaignStatus": "DRAFT",
      "description": "description",
      "purpose": "PROMOTIONAL",
      "marketingStrategy": "strategy",
      "marketingProgram": "program",
      "listName": "listname",
      "channelList": "channelListName",
      "filterPaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "refiningDataSourcePath": "foldername/objectName1",
      "proofListPath": "foldername/objectName1",
      "seedListPath": "foldername/objectName1",
      "segmentPaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryCampaignDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryLookupDataSourcePaths"[
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementaryProofDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "supplementarySeedDataSourcePaths": [
        "foldername/objectName1",
        "foldername/objectName2"
      ],
      "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"
      ],
      "campaignVariables": {
        "name1": "value1",
        "name2": "value2"
      },
      "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.3/campaigns?type=push",
      "method": "GET"
    },
    {
      "rel": "prev",
      "href": "/rest/api/v1.3/campaigns?limit=200&offset=0&type=push",
      "method": "GET"
    },
    {
      "rel": "next",
      "href": "rest/api/v1.3/campaigns?limit=200&offset=200&type=push",
      "method": "GET"
    }
  ]
}
	

Sample Request URL for SMS campaigns

TIP: Leave the following parameters set to their default values and use the "prev" and "next" links returned in the response to get additional SMS campaigns as needed.

    /rest/api/v1.3/campaigns?type=sms
	

Sample Response

The endpoint /rest/api/v1.3/campaigns?type=sms returned the following response (in this account, the limit set was for 5 campaigns, but there were only two SMS campaigns for the account):

{
  "campaigns": [
    {
      "id": 1234,
      "name": "SMS_CAMP1",
      "folderName": "Folder1",
      "type": "SMS",
      "campaignStatus": "DRAFT",
      "purpose": "PROMOTIONAL",
      "listName": "R_SMS_LIST1",
      "textMessagePath": "/messagelibrary/sms/13187/Message.txt",
      "enableLinkTracking": false,
      "enableExternalTracking": false,
      "useUTF8": false,
      "trackHTMLOpens": false,
      "trackConversions": false,
      "sendTextIfHTMLUnknown": false,
      "unsubscribeOption": "OPTOUT_SINGLE_CLICK",
      "autoCloseOption": "AUTO_CLOSE_X_DAYS_AFTER_LAST_RESPONSE",
      "autoCloseValue": "90"
    },
    {
      "id": 12345,
      "name": "SMS_CAMP2",
      "folderName": "Folder2",
      "type": "SMS",
      "campaignStatus": "ACTIVE",
      "purpose": "PROMOTIONAL",
      "listName": "R_SMS_LIST2",
      "textMessagePath": "/messagelibrary/sms/13687/Message.txt",
      "enableLinkTracking": false,
      "enableExternalTracking": false,
      "campaignVariables": {
        "SMS_CARRIER": null,
        "SMS_USER_INPUT1": null,
        "SMS_USER_INPUT2": null,
        "SMS_USER_INPUT3": null,
        "SMS_USER_INPUT4": null,
        "SMS_USER_INPUT5": null,
        "SMS_CODE": null,
        "SMS_KEYWORD": " Default"
      },
      "useUTF8": false,
      "trackHTMLOpens": false,
      "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.3/campaigns?type=sms",
      "method": "GET"
    },
    {
      "rel": "prev",
      "href": "/rest/api/v1.3/campaigns?limit=5&amp;offset=0&amp;type=sms",
      "method": "GET"
    },
    {
      "rel": "next",
      "href": "rest/api/v1.3/campaigns?limit=5&amp;offset=200&amp;type=sms",
      "method": "GET"
    }
  ]
}
	

Sample Request URL for MMS:

TIP: Leave the following parameters set to their default values and use the "prev" and "next" links returned in the response to get additional MMS campaigns as needed.

    /rest/api/v1.3/campaigns?type=mms
	

Sample Response

{
    "campaigns": [
        {
            "id": 10016762,
            "name": "test-mms",
            "folderName": "examples",
            "type": "MmsCampaign",
            "campaignStatus": "ACTIVE",
            "purpose": "PROMOTIONAL",
            "textMessagePath": "/messagelibrary/mms/10016762/Message.txt",
            "enableLinkTracking": false,
            "attachmentPaths": [
                null
            ],
            "enableExternalTracking": false,
            "useUTF8": false,
            "trackHTMLOpens": false,
            "trackConversions": false,
            "sendTextIfHTMLUnknown": false,
            "autoCloseOption": "None"
        },
		.
		.
		.
        {
            "id": 11081025,
            "name": "AG_AudienceTest_MMS",
            "folderName": "AG-Test",
            "type": "MmsCampaign",
            "campaignStatus": "ACTIVE",
            "purpose": "PROMOTIONAL",
            "listName": "2018 list",
            "textMessagePath": "/messagelibrary/mms/11081025/Message.txt",
            "enableLinkTracking": false,
            "attachmentPaths": [
                "/contentlibrary/2018_content^sale70.jpg"
            ],
            "enableExternalTracking": false,
            "useUTF8": false,
            "trackHTMLOpens": false,
            "trackConversions": false,
            "sendTextIfHTMLUnknown": false,
            "autoCloseOption": "None"
        }
    ],
    "links": [
        {
            "rel": "self",
            "href": "/rest/api/v1.3/campaigns?type=mms",
            "method": "GET"
        }
    ]
}

Sample Request URL for Message Center:

TIP: Leave the following parameters set to their default values and use the "prev" and "next" links returned in the response to get additional Message Center campaigns as needed.

    /rest/api/v1.3/campaigns?type=pushiocampaign
	

Sample Response

The response data for Message Center campaigns returns two attributes that are specific to this channel: appName contains the name of the mobile app, and destinationMessageCenter contains the name of the message center to which the marketer wanted the campaign message to be sent.

{
  "campaigns": [
    {
      "id": 11896453,
      "name": "jmp-test-mc-021419",
      "folderName": "jmp-test",
      "type": "PushIOCampaign",
      "campaignStatus": "DRAFT",
      "purpose": "PROMOTIONAL",
      "marketingStrategy": "Other",
      "marketingProgram": "Other",
      "listName": "mmlist",
      "channelList": "mm_APP",
      "appName": "JMP Training App",
      "destinationMessageCenter": "Primary",
      "textMessagePath": "/messagelibrary/push/11896453/Message.txt",
      "enableLinkTracking": false,
      "enableExternalTracking": false,
      "useUTF8": false,
      "trackHTMLOpens": false,
      "trackConversions": false,
      "sendTextIfHTMLUnknown": false
    }
  ],
  "links": [
    {
      "rel": "self",
      "href": "/rest/api/v1.3/campaigns?type=pushiocampaign",
      "method": "GET"
    }
  ]
}
Back to Top