The Clientbill API is an interface for easily viewing and managing your Clientbill data using SOAP. This API guide will provide step by step helping using the Clientbill API to perform any task. All examples in this guide use the NuSOAP SOAP Toolkit
Your API URL is unique to your account and is derived from your URL:
All staff members have access to the API using their email address and password. Staff member's access to the Clientbill API is limited by their group permissions.
In this example we are logging in with the account 'firstname.lastname@example.org'. In the case of this example the response from the SOAP server is an array with two values. The first value is a boolean that is used to determine if an API call was successful or not. The second value contains the response from the Clientbill API. In this example, the response will be the authentication hash, used to identify yourself in subsequent API calls. See the API Responses for more information regarding this.
$client = new nusoap_client("http://myaccount.clientbill.com/soapserver.php", false);
$params = array(
'email' => 'email@example.com',
'password' => md5('my_password'),
$response = $client->call('cb_setAuthCredentials', $params);
if( $response !== true)
echo "Error:" . $response;
$auth_string = $response;
Any call to a valid API function will result in an array with two values being returned.
The first value is a boolean flag that is set to true when the API call was successful and false when one or more errors that prevented the request from completed occurs.
Success response example
An example response from the cb_setAuthCredentials API function:
 => true,
 => 922f903f3f69933643aa08f3df1959a7
Failed response example
An example response from an API function call you do not have permission to access:
 => false,
 => <ul><li style="color:red;">Insufficient permissions to perform the requested operation.</li></ul>
The second value holds the response from the API function called. If an error occurred, this response will be a list of the errors that prevented the request from being completed. If no errors occurred, the response will hold the data that was requested via the API function call.