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

  1. {
  2. "name": "Test Campaign 1351175725",
  3. "subject": "This Week's Specials",
  4. "from_name": "My Organization",
  5. "from_email": "from-email@example.com",
  6. "reply_to_email": "reply-to-email@example.com",
  7. "status": "DRAFT",
  8. "is_permission_reminder_enabled": true,
  9. "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.",
  10. "is_view_as_webpage_enabled": true,
  11. "view_as_web_page_text": "Having trouble viewing this message?",
  12. "view_as_web_page_link_text": "Click here to view as a Web page",
  13. "greeting_salutations": "Hello",
  14. "greeting_name": "FIRST_NAME",
  15. "greeting_string": "Dear ",
  16. "email_content": "<html><body><p>This is text of the email message.</p></body></html>",
  17. "text_content": "This is the text of the email",
  18. "email_content_format": "HTML",
  19. "style_sheet": "",
  20. "message_footer": {
  21. "organization_name": "Your Organization",
  22. "address_line_1": "123 Maple Street",
  23. "address_line_2": "Unit 1",
  24. "address_line_3": "",
  25. "city": "Anytown",
  26. "state": "MA",
  27. "international_state": "",
  28. "postal_code": "01444",
  29. "country": "US",
  30. "include_forward_email": true,
  31. "forward_email_link_text": "Forward this message to a friend!",
  32. "include_subscribe_link": true,
  33. "subscribe_link_text": "Sign up for our mailing list!"
  34. },
  35. "sent_to_contact_lists": [
  36. {
  37. "id": "1"
  38. }
  39. ]
  40. }

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

  1. {
  2. "name": "Test Campaign 1351175725",
  3. "subject": "This Week's Specials",
  4. "from_name": "My Organization",
  5. "from_email": "from-email@example.com",
  6. "reply_to_email": "reply-to-email@example.com",
  7. "campaign_type": "CUSTOM",
  8. "created_date": "2013-02-18T16:24:09.162Z",
  9. "modified_date": "2013-02-18T16:24:09.160Z",
  10. "is_permission_reminder_enabled": true,
  11. "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.",
  12. "is_view_as_webpage_enabled": true,
  13. "view_as_web_page_text": "Having trouble viewing this message?",
  14. "view_as_web_page_link_text": "Click here to view as a Web page",
  15. "greeting_salutations": "Hello",
  16. "greeting_name": "FIRST_NAME",
  17. "greeting_string": "Dear",
  18. "email_content": "<html><body><p>This is text of the email message.</p></body></html>",
  19. "text_content": "This is the text of the email",
  20. "email_content_format": "HTML",
  21. "style_sheet": "",
  22. "message_footer": {
  23. "organization_name": "Your Organization",
  24. "address_line_1": "123 Maple Street",
  25. "address_line_2": "Suite 999",
  26. "address_line_3": "",
  27. "city": "Anytown",
  28. "state": "MA",
  29. "international_state": "",
  30. "postal_code": "01444",
  31. "country": "US",
  32. "include_forward_email": true,
  33. "forward_email_link_text": "Forward this message",
  34. "include_subscribe_link": true,
  35. "subscribe_link_text": "Subscribe to Our Newsletter!"
  36. },
  37. "tracking_summary": {
  38. "sends": 0,
  39. "opens": 0,
  40. "clicks": 0,
  41. "forwards": 0,
  42. "unsubscribes": 0,
  43. "bounces": 0
  44. },
  45. "is_visible_in_ui": false,
  46. "sent_to_contact_lists": [
  47. {
  48. "id": "1"
  49. }
  50. ]
  51. }
  52.