CreateAddressBook

Creates an address book

This method creates a new address book in your account. The name can't be that of an existing address book, or of the reserved books such as 'Test' or 'All contacts'.

Address book names have a limit of 128 characters.

SOAP action: http://apiconnector.com/v2/ApiService/CreateAddressBook

📘

Input and output parameters

The input and output parameters for this method are:

Input parameters

  • Address Book
    • Name - required; string
    • Visibility - optional; string with restriction ('Private', 'Public')

Output parameters

  • CreateAddressBookResult
    • Id - integer
    • Name - string
    • Visibility - string ('Private', 'Public')
    • Contacts - integer

Example

using (var client = new ApiServiceClient())
{
	client.ClientCredentials.UserName.UserName = "username";
	client.ClientCredentials.UserName.Password = "password";

	var addressBook = new ApiAddressBook {
		Name = "My Address Book",
		Visibility = ApiAddressBookVisibility.Public
	};
	var createdAddressBook = client.CreateAddressBook(addressBook);
}
$username = ‘[email protected]’;
$password = ‘dummypassword’;

$parameters = array(
  'username' => $username,
  'password' => $password,
  ‘book’ => array(
    'name' => 'My Address Book',
    'visibility' => 'Public'
));
$client = new SoapClient('http://apiconnector.com/api.asmx?WSDL');

$result = $client-> CreateAddressBook($parameters);