Our v3 API is now available! Learn more by visiting the v3 developer portal . Creating new v2 API keys is no longer supported.

Individual Email Campaign

Use this endpoint to retrieve (GET), update (PUT), or DELETE an existing email marketing campaign. To create a new email campaign message, use the POST method for the Email Campaign Collection API .

Methods:

Click a method to view its documentation

GET PUT DELETE

Description TOP

Privileges required : contacts:lists:write

PUT: Update the name, status of the ContactList specified by the listId path parameter. Performing a PUT overwrites all existing properties for the contactlist resource; any properties left blank or not included in the call will delete those property values prior to the call.

Description TOP

Privileges required : mylibrary:folder:update

Use PUT to modify the following properties for a folder specified by folderId path parameter:

  • update the folder's name
  • change the folder's location in the directory structure by changing it's parent_id
    To move a folder to level 1 in the directory structure, set the parent_id to 0

Description TOP

Privileges required : mylibrary:file:update

Use a PUT call to update the following for a file (specified using the fileId path parameter):

  • Update the name
  • Update the description
  • Move a file to another folder, using folder_id to specify the destination folder.

Description TOP

Privileges required : campaign:write

Update an existing event by using the eventId path parameter.

Description TOP

Privileges required : campaign:write

Update an existing event item; specify the event and the item using the eventId and itemId path parameters.

Description TOP

Privileges required : campaign:write

Update an existing promocode for an event; specify the code and event using the eventId and promocodeId path parameters.

Description TOP

Privileges required : campaign:write

Update an existing fee (specify using feeId ) for an event specified by eventId .

Description TOP

Privileges required : campaign:write

Update an existing item attribute by specifying the eventId , itemId , and attributeId path parameters. Include the attribute name and description in the JSON request body.

NOTE: You cannot change an attribute name once any have been sold to or claimed by event registrants.

Description TOP

Privileges required : campaign:activate

Update the schedule for an email campaign using the scheduleId and campaignId path parameters.

Description TOP

Privileges required : campaign:create

Update an existing email campaign message specified by the campaignId path parameter. For campaigns with a template_type = CUSTOM, all editable fields are available for updating. If template_type = STOCK, the following fields are not available for edit (read-only):

  • text_content
  • email_content
  • style_sheet

These fields can only be updated using the Constant Contact user interface.

NOTE: There are several campaign properties that are optional by default, but become REQUIRED once another property is used. See Structure table below for specific properties.

PUT: https://api.constantcontact.com/v2/emailmarketing/campaigns/{campaignId}

Test API

name

type

default

description

api_key

query

REQUIRED; The API key for the application

campaignId

path

Specifies the email campaign message to modify

Example JSON Request Body TOP

{
    "name": "Test Campaign 1351175725",
    "subject": "This Week's Specials",
    "from_name": "My Organization",
    "from_email": "from-email@example.com",
    "reply_to_email": "reply-to-email@example.com",
    "status": "DRAFT",
	"is_permission_reminder_enabled": true,    
	"permission_reminder_text": "Hi, just a reminder that you're receiving this email because you have expressed an interest in MyCompany. Don't forget to add from_email@example.com to your address book so we'll be sure to land in your inbox! You may unsubscribe if you no longer wish to receive our emails.",
    "is_view_as_webpage_enabled": true,    
	"view_as_web_page_text": "Having trouble viewing this message?",
    "view_as_web_page_link_text": "Click here to view as a Web page",
    "greeting_salutations": "Hello",
    "greeting_name": "FIRST_NAME",
    "greeting_string": "Dear ",
    "email_content": "<html><body><p>This is text of the email message.</p></body></html>",
    "text_content": "This is the text of the email",
    "email_content_format": "HTML",
    "style_sheet": "",
    "message_footer": {
        "organization_name": "Your Organization",
        "address_line_1": "123 Maple Street",
        "address_line_2": "Unit 1",
        "address_line_3": "",
        "city": "Anytown",
        "state": "MA",
        "international_state": "",
        "postal_code": "01444",
        "country": "US",
        "include_forward_email": true,
        "forward_email_link_text": "Forward this message to a friend!",
        "include_subscribe_link": true,
        "subscribe_link_text": "Sign up for our mailing list!"
    },
    "sent_to_contact_lists": [
        {
            "id": "1"
        }
    ]
}

Response Codes TOP

code

description

200

Request successful, email campaign updated

400

Either JSON was malformed or there was a data validation error

401

Authentication failure

406

Unsupported accept header value

415

Unsupported content-type in the header

500

Internal server error occurred

Structure TOP

property

type (max length)

description

Example Response TOP

{
    
    "name": "Test Campaign 1351175725",
    "subject": "This Week's Specials",
    "from_name": "My Organization",
    "from_email": "from-email@example.com",
    "reply_to_email": "reply-to-email@example.com",
	"campaign_type": "CUSTOM",
    "created_date": "2013-02-18T16:24:09.162Z",
    "modified_date": "2013-02-18T16:24:09.160Z",
    "is_permission_reminder_enabled": true,
	"permission_reminder_text": "Hi, just a reminder that you're receiving this email because you have expressed an interest in MyCompany. Don't forget to add from_email@example.com to your address book so we'll be sure to land in your inbox! You may unsubscribe if you no longer wish to receive our emails.",
    "is_view_as_webpage_enabled": true,
    "view_as_web_page_text": "Having trouble viewing this message?",
    "view_as_web_page_link_text": "Click here to view as a Web page",
    "greeting_salutations": "Hello",
    "greeting_name": "FIRST_NAME",
    "greeting_string": "Dear",
    "email_content": "<html><body><p>This is text of the email message.</p></body></html>",
    "text_content": "This is the text of the email",
    "email_content_format": "HTML",
    "style_sheet": "",
    "message_footer": {
        "organization_name": "Your Organization",
        "address_line_1": "123 Maple Street",
        "address_line_2": "Suite 999",
        "address_line_3": "",
        "city": "Anytown",
        "state": "MA",
        "international_state": "",
        "postal_code": "01444",
        "country": "US",
        "include_forward_email": true,
        "forward_email_link_text": "Forward this message",
        "include_subscribe_link": true,
        "subscribe_link_text": "Subscribe to Our Newsletter!"
    },
    "tracking_summary": {
        "sends": 0,
        "opens": 0,
        "clicks": 0,
        "forwards": 0,
        "unsubscribes": 0,
        "bounces": 0
    },
    "is_visible_in_ui": false,
	"sent_to_contact_lists": [
        {
            "id": "1"
        }
    ]
       
}