The addLists function allows you to add one or more new lists to the account.


writeResult = bApi.addLists(mailListObject[] lists);


Name Type Required Description
name string Yes The internal name of the list.
label string Yes The external (customer facing) name of the list.
id string No The unique id assigned to the list. You can obtain the id for a list by calling readLists, or by looking at the footer when viewing the overview page for an individual list in the application.
activeCount long No The number of active contacts of currently on the list.
status string No The status of the list. Valid values are active, deleted, and tmp

PHP Code Example

 * This script will add a new list to Bronto.
 * @copyright  Copyright (c) 2018 Bronto Software (
$client = new SoapClient('', array(
	'trace' => 1,
try {

	$token = "ADD YOUR API TOKEN";
	print "logging in\n";
	$sessionId = $client->login(array(
		'apiToken' => $token
	$session_header = new SoapHeader("", 'sessionHeader', array(
		'sessionId' => $sessionId

	$mailListObject = array(
		'name' => 'some_list',
		"label" => 'EXAMPLE LIST'
	print "Adding the list\n";
	$write_result = $client->addLists(array(

	// Note we are accessing the results and errors arrays.
	// Both of these arrays are returned as part of
	// writeResult object.
	if ($write_result->errors) {
		print "There was a problem adding the list:\n";
	else {
		print "The list has been added.  Id: " . $write_result->results[0]->id . "\n";

catch(Exception $e) {
	print "uncaught exception\n";