emailmanager

Home

Emailmanager API. Version 1.0 Beta!
Updated: 08/07/2016 - 16:00hs

Welcome to the emailmanager API - Version 1.0 Beta!

Take a look below and learn how the API communication works, how to create your API Keys and execute API functions.

In order to implement the desired functionality of the system all users need to be identified. Therefore, the API configuration needs to be processed via the URL.

All requests should be made in the format presented below (depending on the used version and the executed function):

http://api.emailmanager.com/1.0/?apikey=<apikey>&method=<método>& [other parameters]

The function that is used to obtain the user API key needs to be executed with the function: "authentLogin". Take a look at the example below:

http://api.emailmanager.com/1.0/?method=authentLogin&domain=<subdomínio>&username=<usuário>&password=<senha>

Take a look at the request examples below. They return some values (substitute: "suachavedaapi" for your API key, obtida You can obtain the API key with the following steps:

http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=exceptions
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=editions&status_id=1
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=editionContent&cid=1
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=reportEditionStats&cid=1
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=reportUnsubscribes&group_id=1&cancel=true
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=editionMappedLinks&cid=1

Output data types are: XML (SOAP format), PHP (serialized array) and JSON (mixed array), which can be easily obtained by adding the parameter "output". Take a look at the following examples:

http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=exceptions&output=xml
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=exceptions&output=php
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=exceptions&output=json

The available "languages" that display "Erros" are: en_US (U.S. English), pt_BR (Brazilian Portuguese) and es_ES (Spanish), and can be obtained by adding the parameter "language":

http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=exceptions&language=pt_BR
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=exceptions&language=en_US
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=exceptions&language=es_ES

By default, the system returns a maximum of 100 records per query. In order to list the obtained data in a larger quantity, you need to use the "begin" and "limit" parameters. There is an example below that returns 20 records per query:

http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=contacts&begin=0&limit=20
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=contacts&begin=20&limit=20
http://api.emailmanager.com/1.0/?apikey=suachavedaapi&method=contacts&begin=40&limit=20


"Error" related methods:
Array exceptions ( string language )

Returns codes and error messages that can be generated by the system.

[+] Parameters:

"Authentication" related methods:
String authentLogin ( string domain , string username , string password )

Responsible for user authentication in the client database. It also returns the user's API key, used to access other functions.

[+] Parameters:
Boolean authentLogout ( string apikey )

Logs out a user from client's database and returns access results.

[+] Parameters:

"Campaigns" related methods:
Array campaigns ( int parent_id , string order , int begin , int limit )

Returns a list of registered campaigns in the system.

[+] Parameters:
Int campaignCount ( int parent_id )

Returns a total number of registered campaigns in the system. It also filters the campaign in search for specific words.

[+] Parameters:
Int campaignCreate ( int parent_id , string name )

Registers a new campaign.

[+] Parameters:
Boolean campaignDelete ( int campaign_id )

Moves the active campaign to the trash together with the related campaigns.

[+] Parameters:
Boolean campaignUpdate ( int campaign_id , string name , int parent_id )

Updates a campaign record based on some data.

[+] Parameters:

"Edition" related methods
Array editions ( datetime date_creation , datetime date_modified , datetime date_modified , int status_id , int campaign_id , int account_id , int folder_id , int mining_id , boolean content , string order , int begin , int limit )

Researches and presents campaign users according to the specific parameters.

[+] Parameters:
Int editionCount ( int campaign_id )

Returns total number of registered campaigns in the system or filters them by "ID" number.

[+] Parameters:
Array editionContent ( int cid )

Returns some data of a particular campaign based on the system ID.

[+] Parameters:
Array editionMappedLinks ( int cid , boolean active , boolean analytics )

Returns registered mapped links of the campaign.

[+] Parameters:
Int editionCreate ( string name , string description , string subject , string content_html , string content_txt , datetime date_send , int campaign_id , int account_id , int folder_id , int mining_id , array send_groups , array exclusion_groups )

Registers a new campaign in the system (with status: "ready").

[+] Parameters:
Boolean editionDelete ( int cid )

Sends a campaign to the trash, preventing from submitting it.

[+] Parameters:
Boolean editionUpdate ( int cid , string name , string description , string subject , string content_html , string content_txt , datetime date_send , int campaign_id , int account_id , int folder_id , int mining_id , array send_groups , array exclusion_groups )

Changes the login data for the "ready" status.

[+] Parameters:
Array editionStatus ( boolean system )

Returns a list of statuses to which the campaign can be assigned to.

[+] Parameters:
Array editionAccounts ( int account_id , datetime date_begin , datetime date_end , boolean validated , boolean mapping , boolean analytics , boolean auto_release , string order , int begin , int limit )

Searches and presents campaign accounts based on the certain parameters.

[+] Parameters:
Int editionAccountCreate ( string name , string label , string email , string replyto , string abuse , boolean mapping , boolean analytics , boolean auto_release , string address , string city , string state , string country , string phone_country , string phone_code , string phone_number , string organization )

Create a new campaign account.

[+] Parameters:
Boolean editionAccountDelete ( int account_id )

Sends the "active" accounts to the trash.

[+] Parameters:
Boolean editionAccountUpdate ( int account_id , string name , string label , string email , string replyto , string abuse , boolean mapping , boolean analytics , boolean auto_release , string address , string city , string state , string country , string phone_country , string phone_code , string phone_number , string organization )

Update an existing account record.

[+] Parameters:
Array editionMinings ( datetime date_begin , datetime date_end , int folder_id , string order , int begin , int limit )

Searches and presents contact filters used for the campaign.

[+] Parameters:
Array editionMiningFolders ( int parent_id , string order , int begin , int limit )

Searches and presents contact folders used in the campaign.

[+] Parameters:
Boolean editionPause ( int cid )

Defines a campaign as "paused" by stopping its submittion.

[+] Parameters:
Boolean editionResume ( int cid )

Releases a previously paused campaign.

[+] Parameters:
Boolean editionSendNow ( int cid )

Releases campaign with a "ready" status (ready to send at the time).

[+] Parameters:
Boolean editionSchedule ( int cid , datetime date_send )

Releases campaign with a "ready" status (scheduled campaign).

[+] Parameters:
Boolean editionUnschedule ( int cid )

Redefines campaign from the status "released to send" to "ready".

[+] Parameters:

"Contact" related methods:
Array contacts ( datetime date_begin , datetime date_end , string email , string order , int begin , int limit )

Researches and presents contacts in the user database according to the certain parameters.

[+] Parameters:
Array contactCount ( )

Returns a total number of registered contacts within the system.

Array contactInfo ( int cid )

Returns registration data and presents information about registered contacts.

[+] Parameters:
Array contactBatchInfo ( string cids )

Returns a list of registration data present in the contact records related.

[+] Parameters:
Array contactStatus ( )

Returns a status list, to which a contact can be assigned.

Array contactGroups ( int cid , string order , int begin , int limit )

Returns a list of contacts and information about their membership status.

[+] Parameters:
Int contactCreate ( string name , string email , boolean gender , date date_birth , array groups_id , multi {extras} )

Registers a new contact in the system with the certain data, or returns the ID of the contact that already exist in the database.

[+] Parameters:
Boolean contactDelete ( int cid )

Sends the "active" contacts to the trash and avoids sending the same emails.

[+] Parameters:
Boolean contactBatchDelete ( int group_id , string cids )

Delete contacts from a particular group.

[+] Parameters:
Boolean contactUpdate ( int cid , string name , string email , boolean gender , date date_birth , array groups_id , multi {extras} )

Updates contacts (registered in the system).

[+] Parameters:
Boolean contactSubscribe ( int cid , array groups_id )

Subscribes contacts to the list.

[+] Parameters:
Boolean contactUnsubscribe ( int cid , array groups_id )

Unsubscribes contacts from the list.

[+] Parameters:
Boolean contactCancel ( int cid )

Marks contacts as "requested removal" and stops sending campaigns.

[+] Parameters:
Array contactBatchSubscribe ( int group_id , array emails )

Registers and/or links contacts into groups and returns a list of contacts with the emails that signed up.

[+] Parameters:
Array contactBatchCreate ( int group_id , array metadata , boolean check , boolean update , boolean info )

Registers and/or links contacts into groups and returns a list of registered contacts with emails.

[+] Parameters:

"Group" related methods
Array groups ( int folder_id , int parent_id , string order , int begin , int limit )

Returns a list of contact groups registered in the system.

[+] Parameters:
Array groupCount ( int parent_id , int folder_id )

Returns the total number of registered groups in the system.

[+] Parameters:
Array groupContacts ( int group_id , string order , int begin , int limit )

Returns a list of contacts affiliated with the group of related contacts.

[+] Parameters:
Int groupCreate ( int folder_id , int parent_id , string name , string description )

Registers a new contact group.

[+] Parameters:
Boolean groupDelete ( int group_id )

Sends the registered contact group to the trash, along with the related contacts.

[+] Parameters:
Boolean groupUpdate ( int group_id , string name , string description , int parent_id , int folder_id )

Updates the registered group based on some information.

[+] Parameters:
Array groupFolders ( int parent_id , string order , int begin , int limit )

Returns a list of all folders that are registered in the system.

[+] Paramaters:
Array groupFolderCount ( int parent_id )

Returns a total number of folders that are registered in the system.

[+] Parameters:
Int groupFolderCreate ( int parent_id , string name )

Creates and registers a new folder.

[+] Parameters:
Boolean groupFolderDelete ( int folder_id )

Deletes a group of folders.

[+] Parameters:
Boolean groupFolderUpdate ( string name , int parent_id , int folder_id )

Updates a group of folders registered in the system; based on some information.

[+] Parameters:

"Campaign" report related methods:
Array reportEditionStats ( int cid )

Returns a data report related to the campaign.

[+] Parameters:
Array reportEditionGeoCountry ( int cid , boolean unique )

Returns a list of data related to the number of visits made by each country.

[+] Parameters:
Array reportEditionGeoRegion ( int cid , string country , boolean unique )

Returns a list of data related to the number of visits made by a state (region).

[+] Parameters:
Array reportEditionSents ( int cid , datetime date_begin , datetime date_end , string order , int begin , int limit )

Returns a list of sent emails during the campaign.

[+] Parameters:
Array reportEditionViews ( int cid , datetime date_begin , datetime date_end , boolean unique , string order , int begin , int limit )

Returns a list of views during the campaign.

[+] Parameters:
Array reportEditionClicks ( int cid , datetime date_begin , datetime date_end , int link_id , boolean unique , string order , int begin , int limit )

Returns a list of clicks.

[+] Parameters:
Array reportEditionSoftBounces ( int cid , datetime date_begin , datetime date_end , string order , int begin , int limit )

Returns a list of temorary errors related to the campaign.

[+] Parameters:
Array reportEditionHardBounces ( int cid , datetime date_begin , datetime date_end , string order , int begin , int limit )

Returns a list of permanent payment errors.

[+] Parameters:
Array reportEditionUnsubscribes ( int cid , datetime date_begin , datetime date_end , int contact_id , boolean cancel , string order , int begin , int limit )

Returns contacts that cancelled the subscription.

[+] Parameters:
Array reportEditionAbuses ( int cid , datetime date_begin , datetime date_end , string order , int begin , int limit )

Returns a list of report abuses.

[+] Parameters:

"Contact" report related methods:
Array reportContactSents ( int cid , datetime date_begin , datetime date_end , string order , int begin , int limit )

Returns a list of emails that were sent to registered contacts.

[+] Parameters:
Array reportContactViews ( int cid , datetime date_begin , datetime date_end , int marketing_id , string order , int begin , int limit )

Returns a list of registered contact views.

[+] Parameters:
Array reportContactClicks ( int cid , datetime date_begin , datetime date_end , int marketing_id , int link_id , string order , int begin , int limit )

Returns a list of registered contact clicks.

[+] Parameters:
Array reportContactSoftBounces ( int cid , datetime date_begin , datetime date_end , string order , int begin , int limit )

Returns a list of temporary errors.

[+] Parameters:
Array reportContactHardBounces ( int cid , datetime date_begin , datetime date_end , string order , int begin , int limit )

Returns a list of permanent errors.

[+] Parameters:

"Group" report related methods:
Array reportGroupStats ( int group_id )

Contact Groups ID in the system database.

[+] Parameters:

"General report" related:
Array reportStats ( date date_begin , date date_end , int marketing_id , int begin , int limit )

Returns a general data report about all campaign interactions (grouped by date).

[+] Parameters:
Array reportSents ( datetime date_begin , datetime date_end , int marketing_id , int contact_id , string order , int begin , int limit )

Returns a list of emails that were sent to the registered contacts in the system.

[+] Parameters:
Array reportViews ( datetime date_begin , datetime date_end , int marketing_id , int contact_id , boolean unique , string order , int begin , int limit )

Returns a list of emails that were sent to the registered contacts in the system.

[+] Parameters:
Array reportClicks ( datetime date_begin , datetime date_end , int marketing_id , int link_id , int contact_id , boolean unique , string order , int begin , int limit )

Returns a list that allows viewing sent campaigns.

[+] Parameters:
Array reportBounces ( datetime date_begin , datetime date_end , int marketing_id , int contact_id , boolean temporary , string order , int begin , int limit )

Returns a list of errors that occurred during sending the campaign.

[+] Parameters:
Array reportUnsubscribes ( datetime date_begin , datetime date_end , int marketing_id , int contact_id , boolean cancel , string order , int begin , int limit )

Returns a list of contacts that unsubscribed from receiving campaigns.

[+] Parameters:
Array reportAbuses ( int cid , datetime date_begin , datetime date_end , int marketing_id , string order , int begin , int limit )

Returns a list of reported abuses.

[+] Parameters:
Array reportBlacklist ( date date_begin , date date_end , string order , int begin , int limit )

Returns a data report with blacklisted emails in customer's account.

[+] Parameters:
Array reportNotifyMessages ( boolean displayed , date date_begin , date date_end , string order , int begin , int limit )

Returns a list of messagees that are stored in the cuctomer's database.

[+] Parameters:
Array reportNotifyCount ( boolean displayed )

Returns the total number of message notification stored in the customer's database.

[+] Parameters:

Métodos de "Usuarios"
Array users ( string order , int begin , int limit )

Return a list of users registered on the system.

[+] Parameters:
Int userCreate ( string name , string email , int permission_id , array departaments_id , string password , boolean active )

Register a new user on the system with the given data, or return the existent user's ID.

[+] Parameters:
Int userUpdate ( int uid , string name , int permission_id , array departaments_id , boolean active )

Update the user's data existent on the systema, with the given data.

[+] Parameters:
Boolean userDelete ( int uid )

Erase an user from the system, revoking his access.

[+] Parameters:
Array userPermissions ( string order , int begin , int limit )

Return a list of permission groups related to the users.

[+] Parameters:
Array userDepartaments ( string order , int begin , int limit )

Return a list of departaments wich the users could be associated.

[+] Parameters: