Contact List ManagementOur contact and list features of Elastic Email can be used directly through the Account interface we provide. Alternatively you can call our REST API and manage your contacts and lists. Below are the API calls we support for contact and list management with details on how to use each call. Create New Contacthttps://api.elasticemail.com/lists/create-contact Creates a new contact and optionally adds it to the list provided.
Mandatory Parameters:
Optional Parameters:
Example https://api.elasticemail.com/lists/create-contact?username=your_user_name&api_key=your_api_key&email=example@example.com&listname=list_name Delete Existing Contacthttps://api.elasticemail.com/lists/delete-contact Deletes an existing contact and removes it from ALL lists. Mandatory Parameters:
Example https://api.elasticemail.com/lists/delete-contact?username=your_user_name&api_key=your_api_key&email=email_address Create New Listhttps://api.elasticemail.com/lists/create-list Creates a new list. Mandatory Parameters:
Example https://api.elasticemail.com/lists/create-list?username=your_user_name&api_key=your_api_key&listname=new_list_name Delete Existing Listhttps://api.elasticemail.com/lists/delete Deletes an existing list. Note that contacts from this list will not be deleted from the system. Mandatory Parameters:
https://api.elasticemail.com/lists/delete?username=your_user_name&api_key=your_api_key&listname=list_name Add Existing Contact To Listhttps://api.elasticemail.com/lists/add-contactAdds an existing contact to an existing list. If the contact or list does not exist an error will result. Mandatory Parameters:
https://api.elasticemail.com/lists/add-contact?username=your_user_name&api_key=your_api_key&email=email_address&listname=list_name Remove Existing Contact From Listhttps://api.elasticemail.com/lists/remove-contactRemoves an existing contact from an existing list. If the contact or list does not exist an error will result. Mandatory Parameters:
https://api.elasticemail.com/lists/remove-contact?username=your_user_name&api_key=your_api_key&email=email_address&listname=list_name Create Multiple Contacts From CSV Filehttps://api.elasticemail.com/lists/upload-contacts Creates new contacts from a CSV file and optionally adds it to the list provided.
Mandatory Parameters:
Optional Parameters:
Mandatory Column Names:
Optional Column Names:
Example (C#) WebClient client = new WebClient(); NameValueCollection params = new NameValueCollection(); params.add(“username”, your_username); params.add(“api_key”, your_api_key); params.add(“listname”, "optional_list_name"); client.QueryString = params; client.UploadFile(“https://api.elasticemail.com/lists/contact/upload-contacts” ,”local_path_to_file”); Return All Listshttps://api.elasticemail.com/lists/get Returns all the lists for your account and how many users are in each list. Mandatory Parameters:
Example https://api.elasticemail.com/lists/get?username=your_user_name&api_key=your_api_key Return All Contacts From Listhttps://api.elasticemail.com/lists/get-contacts Returns email, firstname and lastname for an existing list. Mandatory Parameters:
https://api.elasticemail.com/lists/get-contacts?username=your_user_name&api_key=your_api_key&listname=list_name Download XML/CSV File Of Contactshttps://api.elasticemail.com/lists/download Download an XML or CSV file of your list contacts or all contacts. Mandatory Parameters:
Optional Parameters:
|