Add a new client.

We created a new viewing experience for our SMS API documentation. It's now all in one central location. Click here to check it out!




nameClient company nameYES
contactContact nameNO
emailClient email addressYES
passwordClient passwordYES
msisdnClient phone numberYES
timezoneA valid timezone, Australia/Sydney. Defaults to your ownNO
client_paysSet to true if the client will pay (the default) or false if you will payNO
sms_marginThe number of cents to add to the base SMS price. A decimal valueNO
number_marginThe number of cents to add to the base number price. A decimal valueNO


curl \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d name='New Client' \
  -d email='' \
  -d password=donttell \
  -d msisdn=61491570156

JSON Response

  id: 56423,
  name: "Terry's Repairs",
  contact: "Terry Richards",
  email: "",
  msisdn: "61491570156",
  currency: "AUD",
  timezone: "Australia/Sydney",
  created: "2013-02-14 13:45:22",
  client_pays: false,
  sms_margin: 3.1,
  apikey: "2e24xxxxxxxxxxxxxxxxxxxxxx4b84bf",
  apisecret: "YyYD2lad*88",
  recharge_amount: 20,
  total_lists: 34,
  total_sms: 575665,
  total_contacts: 542,
  total_spend: 450.464,
  total_revenue: 234.12,
  credits_based: false,
  balance: 43.56

XML Response

  <name>Terry&amp;#39;s Repairs</name>
  <contact>Terry Richards</contact>
  <created>2013-02-14 13:45:22</created>

PHP Example

 include '../../APIClient2.php';

 $api = new transmitsmsAPI('API_KEY', 'API_SECRET');
 $result = $api->addClient('company_name','','password','6140000000','client name');

 if ($result->error->code == 'SUCCESS') {
   echo 'Client added';

 } else {
   echo 'Error: {$result->error->description}';