This method is a reseller only method and will not work with a standard account
This method is used to add a new client to a reseller account.
Parameters:<?xml version='1.0'?> <request> <version>0.3</version> <key>API_KEY</key> <secret>API_SECRET</secret> <method>clients.add</method> <params> <name>Client</name> <email>client@email.com</email> <password>password</password> <phone>6141xxxxxxx</phone> <reseller_pays>no</reseller_pays> <reseller_markup>0</reseller_markup> </params> </request>
<?xml version='1.0'?> <xml> <method>clients.add</method> <total>1</total> <time>2009-12-14 00:30:07 GMT</time> <timestamp>1260750607 GMT</timestamp> <data> <result>CLIENT ADDED</result> <user_id>817</user_id> <default_list_id>1221</default_list_id> </data> </xml>
<?php
// change api key and secret to your own
$myAPIKey = "API_KEY";
$myAPISecret = "API_SECRET";
// include base class
require('APIclient.php');
// create new client object
$transmitsmsAPI = new transmitsmsAPI($myAPIKey, $myAPISecret);
// set parameters
$name = 'John Doe';
$email = 'client@email.com';
$password = 'password';
$mobileIntFormat = '614824xxxxxx';
// execute request
$methodResponse = $transmitsmsAPI->addClient($name, $email, $password, $mobileIntFormat);
// parse response into xml object
$xml = @simplexml_load_string($methodResponse);
echo ((string) $xml->data->result == 'CLIENT ADDED') ? "Client added" : "Client was not added: " . (string) $xml->data->result;
?>Using a URL based request system you can request this method by using the below URL - be sure to url encode all your variables!
http://burstsms.com/api-wrapper/clients.add?apikey=API_KEY&apisecret=API_SECRET&name=CLIENT_NAME&email=CLIENT_EMAIL&password=CLIENT_PASSWORD&phone=CLIENT_PHONE&reseller_pays=no&reseller_markup=1.5