Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents:

Table of Contents
minLevel2

(info) Note: Notice that in each API call you must provide the List ID that you are working on, otherwise the default List ID will be used. 

Methods Summary

DELETE /api/emails/<Email ID>

Description 

This method deletes an Email/Template.

...

  • 400 - Dependency error
  • 403 - Permission error
  • 404 - Email not found/deleted

GET /api/emails/<Email Message ID>

Description 

This method lists a single email/template, including mailings and addresses. Return a single Email/Template

...

  • 403 - Permission error
  • 404 - Unauthorized / Email not found

GET /api/emails

Description 

This method fetches a collection of email messages/templates.

...

This is the name of the email message (unrelated to the subject of the message, which is a separate parameters – parameter – see below).

parent_id

Optional number - id of folder in which the template is located

...

Code Block
{
 "metadata":
 {
  "error": false,
  "total": "2"
 },
 "payload":
 [
  {
   "id": "2008",
   "type": "email_message",
   "account_id": "26099",
   "list_id": "23939",
   "name": "Email name",
   "description": "",
   "subject": "Subject",
   "content_html": "Email html content",
   "content_text": "Email text content",
   "unsubscribe_default_link": "1",
   "unsubscribe_success_html": "You have been successfully unsubscribed",
   "unsubscribe_confirmation_html": "",
   "unsubscribe_confirmation_button": "",
   "created": "1415701181",
   "modified": "1415701181",
   "deleted": "0",
   "mailing_id": null
  },
  {
   "id": "2025",
   "type": "email_message",
   "account_id": "26099",
   "list_id": "23939",
   "name": "Email name",
   "description": "",
   "subject": "Email subject",
   "content_html": "Email html content",
   "content_text": "Email text content",
   "unsubscribe_default_link": "1",
   "unsubscribe_success_html": "You have been successfully unsubscribed",
   "unsubscribe_confirmation_html": "",
   "unsubscribe_confirmation_button": "",
   "created": "1416399606",
   "modified": "1416399614",
   "deleted": "0",
   "mailing_id": "111670"
  }
 ]
}

POST /api/emails

Description 

This method creates a new email message.

...

  • 403 - Permission error
  • 406 - Account setup is required

PUT /api/emails/<Email Message ID>

Description 

This method updates an existing email.

...

  • 403 - Permission error
  • 404 - Email not found/deleted
  • 500 - General error

PUT /api/emails/<Email Message ID>/copy

Description 

This method is used to copy email message to another list.

...

Code Block
  { "target_list_id" : "12345" }

PUT /api/emails/<Email Message ID>/favourite

Description 

This method is used to toggle favorite.

...

  • 403 - Permission error
  • 404 - Email not found

PUT /api/emails/<Email Message ID>/move

Description 

This method is used to move or rename an email/template in library.

...