Use this end point to retrieve (GET) the collection of existing email campaigns, or to create (POST) a new email campaign.
Click a method to view its documentation
Privileges required: campaign:list
Retrieves the email campaigns in a user's account as follows:
status
query parameter; see the parameter table below for status types and definitionsmodified_since
query parameter. This is useful for syncing email campaigns across applications.Campaign sort order depends on the campaign status:
Status | Campaign sort order |
DRAFT | by the latest modified_date |
SENT | by the latest last_run_date |
SCHEDULED | by the next_run_date |
DELETED | by the latest last_run_date if it was sent, or by the latest modified_date, if it was never sent |
Deleted campaigns are included in a GET response only when status=DELETED query parameter is used. They are not included in the GET collection by default. You cannot retrieve an individual deleted campaign object using the API.
Privileges required: campaign:read
Retrieves the email campaign message specified by the campaignId
path parameter. The tracking_summary data
is current as of the last scheduled update, unless you set updateSummary
=true to return updated data.
NOTE: Details of a deleted campaign cannot be retrieved. If a call is made to GET a deleted campaign by its ID, the call will fail and return a 404 Not Found response. You can login to the account to restore the campaign and then retrieve its details.
Privileges required: campaign:read
Retrieve a preview of an existing email marketing campaign (specify using required campaignId
path parameter). The preview includes both the text version and the rendered HTML version of the email campaign so the user can verify how the campaign will appear to recipients.
As with the campaign testsend endpoint, any content that is customized for each recipient using variables in the campaign and custom fields in the contact records is not processed in a campaign preview.
Privileges required: mylibrary:file:read
Retrieve a list of MyLibrary folders and their properties for the authorized Constant Contact account. MyLibrary supports a folder hierarchy with 3 levels of nesting. Primary, child (2nd level) and grandchild (3rd level) folders all have the same properties associated with them. This endpoint returns an empty results array if there are no folders in the user's account.
Privileges required: mylibrary:file:read
The following options are available when retrieving Library files:
api_key
)type
query parameter (ALL, IMAGE, or Document)source
query parametertype
and source
query parametersThere are many options available for sorting the JSON response using the sort_by
query parameter.
Privileges required: campaign:read
Retrieve a list of all items for an event specified using the eventId
path parameter.
Privileges required: campaign:read
Retrieve the collection of all registrants for the event specified using the event_id
path parameter.
Privileges required: campaign:read
Retrieve all promocodes for an event specified by the eventId
path parameter.
Privileges required: campaign:read
Retrieve all fees for the event specified by the event_id
path parameter.
GET: https://api.constantcontact.com/v2/emailmarketing/campaigns |
|||
name |
type |
default |
description |
---|---|---|---|
api_key |
query |
REQUIRED; The API key for the application |
|
limit |
query |
50 |
Specifies the number of results displayed per page of output, from 1 - 50, default = 50. See Paginated Output for more information on using |
modified_since |
query |
Use to retrieve only email campaigns that were modified on or after the date/time specified in ISO-8601 format. |
|
status |
query |
ALL |
Returns list of email campaigns with specified status - valid values:
|
code |
description |
---|---|
200 |
Request was successful |
401 |
Authentication failure |
404 |
Email campaign(s) not found |
406 |
Unsupported accept header value; must be application/json |
500 |
Internal server error occurred |
property |
type(max length) |
description |
---|
{ "meta": { "pagination": { "next_link": "/v2/emailmarketing/campaigns?next=cGFnZU51bT0yJnBhZ2VTaXplPTI" } }, "results": [ { "id": "1100395494220", "name": "1357157252225", "status": "SENT", "modified_date": "2013-01-07T18:51:35.975Z" }, { "id": "1100395673356", "name": "Update1357593398565", "status": "DRAFT", "modified_date": "2013-01-07T16:16:43.768Z" } ] }