eConnect Email Features

Get API: All You Need To Know About eConnect Email API

API Documentation

If you would like to download the API wrapper for PHP 5, you can click here.
  • getLists
  • Fetches all the lists or lists matching a given list name in the user’s account.
  • getSubscriber
  • Fetches the details of the subscriber specified by the subscriber ID.
  • searchSubscribers
  • Searches for subscribers by a set of criteria.
  • createSubscriber
  • Adds a new subscriber to a specific list.
  • updateSubscriber
  • Updates the email address and name of a specific subscriber.
  • deleteSubscriber
  • Deletes a specific subscriber from all the lists in the user’s account.
  • unsubscribeSubscriber
  • Unsubscribes a specific subscriber from all the lists in the user’s account.

getLists

Fetches all the lists or lists matching a given list name in the user’s account.

Parameters

api_key (Required)
Your API key.

name (Optional)
The full name or part of the name of the list(s) to return.

Example Response

<response status="200">
<resultset>
   <lists>
      <list>
         <id>1234</id>
         <name>My List</name>
         <description>This is the main mailing list</description>
      </list>
      <list>
         <id>1569</id>
         <name>My Favorite People</name>
         <description></description>
      </list>
   </lists>
</resultset>
</response>

Error Code & Messages


Error code Default error message Description
1101 A valid API key is missing. API key was not provided, or the provided API key was not a valid key.

Back To Top

getSubscriber

Fetches the details of the subscriber specified by the subscriber ID.

Parameters

api_key (Required)
Your API key.

id (Required)
The numeric ID of the subscriber

Example Response

<response status="200">
<resultset>
   <result>
      <subscriber>
         <id>752358</id>
         <name>John Doe</name>
         <email>john.doe@example.org</email>
         <hashkey>dzn0xzmtm0wtw</hashkey>
         <list_id>1569</list_id>
         <list_name>My Favorite People</list_name>
         <list_description></list_description>
      </subscriber>
   </result>
</resultset>
</response>

Error Code & Messages


Error code Default error message Description
1101 A valid API key is missing. API key was not provided, or the provided API key was not a valid key.
2903 The required numeric subscriber ID is missing. The required numeric subscriber ID was not provided.
2904 The provided subscriber ID is not a numeric ID. The subscriber ID provided was not in numeric format.

Back To Top

searchSubscribers

Searches for subscribers by a set of criteria.

Parameters

api_key (Required)
Your API key.

email (Optional)
Specify the full email address or part of the email address to match, if desired.

name (Optional)
Specify the full name or part of the name of the subscriber to match, if desired.

list_id (Optional)
Specify the numeric ID of the list to search for the subscribers.

start (Optional)
The index of the item to start from.

limit (Optional)
The maximum number of items to return.

Example Response

<response status="200">
<resultset>
   <subscribers>
      <subscriber>
         <id>752358</id>
         <name>John Doe</name>
         <email>john.doe@example.org</email>
         <hashkey>k05yrbtvevoaw</hashkey>
         <list_id>1569</list_id>
         <list_name> My Favorite People </list_name>
         <list_description></list_description>
      </subscriber>
      <subscriber>
         <id>421686</id>
         <name>John Doe</name>
         <email>john@example.com</email>
         <hashkey>b3oe.6bjplheu</hashkey>
         <list_id>1234</list_id>
         <list_name>My List</list_name>
         <list_description>This is the main mailing list</list_description>
      </subscriber>
      <subscriber>
         <id>343855</id>
         <name>Kirk Johnson</name>
         <email>johnson@example.net</email>
         <hashkey>h4oz-qouwkayc</hashkey>
         <list_id>1569</list_id>
         <list_name>My Favorite People</list_name>
         <list_description></list_description>
      </subscriber>
   </subscribers>
</resultset>
</response>

Error Code & Messages


Error code Default error message Description
1101 A valid API key is missing. API key was not provided, or the provided API key was not a valid key.
2902 The provided list ID is not a numeric ID. The list ID provided was not in numeric format.
2908 The parameters passed are incomplete. This method requires at least one or more of these to be provided: subscriber ID and email address.

Back To Top

createSubscriber

Adds a new subscriber to a specific list.

Parameters

api_key (Required)
Your API key.

list_id (Required)
The numeric ID of the list to add the subscriber to.

email (Required)
The email address of the subscriber to add.

name (Optional)
The full name of the subscriber to add.

Example Response

<response status="200">
<resultset>
   <result>
      <subscriber>
         <id>439978</id>
         <name>John Doe</name>
         <email>john.doe@example.net</email>
         <hashkey>tustippflshy2</hashkey>
         <list_id>1234</list_id>
         <list_name>My List</list_name>
         <list_description>This is the main mailing list</list_description>
      </subscriber>
   </result>
</resultset>
</response>

Error Code & Messages


Error code Default error message Description
1101 A valid API key is missing. API key was not provided, or the provided API key was not a valid key.
2201 Subscriber cannot be added because the email address already exists in this list. The email address already exists in your mailing list, and cannot be added again.
2202 Subscriber cannot be added because the email address is in the suppression list. The email address exists in the suppression list, and cannot be added to your mailing list.
2203 Subscriber cannot be added because the email address is in the black list. The email address exists in the black list, and cannot be added to your mailing list.
2901 The required numeric list ID is missing. The required numeric list ID was not provided.
2902 The provided list ID is not a numeric ID. The list ID provided was not in numeric format.
2905 The required subscriber email address is missing. The required subscriber email address was not provided.
2906 The provided subscriber email address is not a valid email address. The subscriber email address provided was not in a valid email address format.

Back To Top

updateSubscriber

Updates the email address and name of a specific subscriber.

Parameters

api_key (Required)
Your API key.

id (Required)
The numeric ID of the subscriber to update.

email (Required)
The new email address of the subscriber.

name (Optional)
The new name of the subscriber.

Example Response

<response status="200">
<resultset>
   <result>
      <subscriber>
         <id>439978</id>
         <name>Jon Livingston</name>
         <email>jon.livingston@example.com</email>
         <hashkey>tustippflshy2</hashkey>
         <list_id>1234</list_id>
         <list_name>My List</list_name>
         <list_description>This is the main mailing list</list_description>
      </subscriber>
   </result>
</resultset>
</response>

Error Code & Messages


Error code Default error message Description
1101 A valid API key is missing. API key was not provided, or the provided API key was not a valid key.
2204 Subscriber does not exist. The subscriber cannot be found in your mailing lists.
2903 The required numeric subscriber ID is missing. The required numeric subscriber ID was not provided.
2904 The provided subscriber ID is not a numeric ID. The subscriber ID provided was not in numeric format.
2905 The required subscriber email address is missing. The required subscriber email address was not provided.
2906 The provided subscriber email address is not a valid email address. The subscriber email address provided was not in a valid email address format.

Back To Top

deleteSubscriber

Deletes a specific subscriber from all the lists in the user’s account.

Parameters

api_key (Required)
Your API key.

id (Required, if email is not specified)
The numeric ID of the subscriber to delete.

email (Required, if id is not specified)
The full email address of the subscriber to delete.

Example Response

<response status="200">
<resultset>
   <result>
      <success>
         <message>1</message>
      </success>
   </result>
</resultset>
</response>

Error Code & Messages


Error code Default error message Description
1101 A valid API key is missing. API key was not provided, or the provided API key was not a valid key.
2204 Subscriber does not exist. The subscriber cannot be found in your mailing lists.
2904 The provided subscriber ID is not a numeric ID. The subscriber ID provided was not in numeric format.
2906 The provided subscriber email address is not a valid email address. The subscriber email address provided was not in a valid email address format.
2908 The parameters passed are incomplete. This method requires at least one or more of these to be provided: subscriber ID and email address.

Back To Top

unsubscribeSubscriber

Unsubscribes a specific subscriber from all the lists in the user’s account.

Parameters

api_key (Required)
Your API key.

id (Required, if email is not specified)
The numeric ID of the subscriber to unsubscribe.

email (Required, if id is not specified)
The full email address of the subscriber to unsubscribe.

Example Response

<response status="200">
<resultset>
   <result>
      <success>
         <message>1</message>
      </success>
   </result>
</resultset>
</response>

Error Code & Messages


Error code Default error message Description
1101 A valid API key is missing. API key was not provided, or the provided API key was not a valid key.
2204 Subscriber does not exist. The subscriber cannot be found in your mailing lists.
2904 The provided subscriber ID is not a numeric ID. The subscriber ID provided was not in numeric format.
2906 The provided subscriber email address is not a valid email address. The subscriber email address provided was not in a valid email address format.
2908 The parameters passed are incomplete. This method requires at least one or more of these to be provided: subscriber ID and email address.

Back To Top

  • Sign Up For eConnect Email newsletter eConnect News
    Get updated on eConnect Email, news on email marketing, tips & tricks and more, once a month.
  • eConnect Blog
    We talk about email marketing trends, design tips, best practices and eConnect Email product updates.
Follow us onVisit eConnect Email on FacebookFollow eConnect Email on Twitter
© 2010 eConnect Email