Email Campaign Collections

Use this end point to retrieve (GET) the collection of existing email campaigns, or to create (POST) a new email campaign.

Methods:

Click a method to view its documentation

GET POST

DescriptionTOP

Privileges required: campaign:list

Retrieves the email campaigns in a user's account as follows:

  • all campaigns in the user's account (no query parameter specified)
  • campaigns with the status specified using the status query parameter; see the parameter table below for status types and definitions
  • campaigns modified on or after the date/time specified using the modified_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

About DELETED campaigns

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.

GET: https://api.constantcontact.com/v2/emailmarketing/campaigns

Test API

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 limit.

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:

  • ALL: Default, returns all campaigns
  • DRAFT: Email campaign is in draft stage, is not scheduled, and can still be edited
  • RUNNING: The email message is in the process of being sent and cannot be edited
  • SENT: The email message has been sent to recipients, and cannot be edited
  • SCHEDULED: The email messages has been scheduled to be sent out on a specific date and cannot be edited unless it's returned to Draft status

Response CodesTOP

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

Response StructureTOP

property

type(max length)

description

id

string

Unique identifier for the email campaign

modified_date

string

Date the email campaign was last modified, in ISO-8601 format

name

string (80)

Name of the email campaign; each email campaign name must be unique within a user's account

status

string

Current status of the email campaign, valid values:

  • DRAFT: This is the default status for an email that is still being worked on. Draft emails have been saved and can be edited at any time.
  • RUNNING: The email messagSente is in the process of being sent and cannot be edited.
  • SENT: An email that has been sent has already been mailed to it's contact list. It cannot be edited.
  • SCHEDULED: A scheduled email has been set to mail on a specific date and cannot be edited unless it's returned to Draft status.

Example ResponseTOP

{
    "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"
        }
        ]
}