1-866-284-2541  |  Registered Users LOGIN 

MailChimp Home Learn More Pricing Resource Center Blog Free Trial

MailChimp API
Back to Documentation Overview

lists

public static lists(string uid)

Retrieve all of the lists defined for your user account


Section:
List Related

Parameters:
uid the id for your user account. Get by calling login($user, $pass)

Returns:
array   -  list of your Lists and their associated information (see Returned Fields for description)

Returned Fields:
string id The list id for this list. This will be used for all other list management functions.
string name The name of the list.
date date_created The date that this list was created.
integer member_count The number of active members in the given list.

Examples (1)

[1] xml-rpc_lists.php

  1. <?php
  2. /**
  3. This Example shows how to use the XML-RPC service to Retrieve all of your
  4. Lists, display some info about them, and do some basic error checking.
  5. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  6. **/
  7. require_once 'XML/RPC2/Client.php';
  8. include('inc/config.inc.php'); //contains username & password
  9.  
  10. $client = XML_RPC2_Client::create($apiUrl);
  11. $uuid = $client->login($username,$password);
  12.  
  13. try {
  14. $lists = $client->lists($uuid);
  15. echo "SUCCESS!\n";
  16. foreach ($lists as $list){
  17. echo "[".$list['id']."] -".$list['name']."\n";
  18. }
  19. var_dump($result);
  20. } catch (XML_RPC2_FaultException $e){
  21. echo "ERROR!!!!\n";
  22. echo $e->getFaultCode()." : ".$e->getFaultString()."\n";
  23. }
  24. ?>
  25.  
Add New Note User Contributed Notes
lists
No notes, yet... Will you be the first??

Email Marketing Resources  |   Free HTML Email Templates  |   Partners  |  Find an Expert  |   Add-ons  |   API  |   Plugins  |   Blog  |  Demos  |  Surveys  |   Webinars  |   Subscribe to our free Email Marketing Tips Newsletter

New Features:  RSS to Email  |   A/B Split Testing Emails  |   Google Analytics Integration  |   Segmentation

Truste Certified Privacy Click to verify BBB accreditation and to see a BBB report ESPC Members MAAWG Email Experience Council Members HACKER SAFE certified sites prevent over 99.9% of hacker crime.
WebAward Winner W3 Award Webby Award Nominee As featured on MSNBC's Your Business Program