Create an account

This method allows you to create an account or a sub-account. For a sub-account creation, just insert the isChild param with the value 1.



Body Parameters

The email of the account
The password must be at least 6 characters long (25 max)
required if main account
The country code associated to the account (ISO 3166-1 alpha-2)
firstname The firstname associated to the account
lastname The lastname associated to the account
city The city associated to the account
phone The phone number associated to the account
address1 The address associated to the account
address2 Further information about the address
zip The zip code
company The company associated to the account
type Select one between : company, association, administration, private
sender The default sender that will be used for your sendings
isChild integer 0 for a main account, 1 for a sub-account
required if isChild
Is the account unlimited ? If unlimited, the sub-account uses the parent's credits. If not, the main account has to give a certain amount of credits to its sub-account.


POST /account HTTP/1.1
Authorization: Bearer your.token
Accept: application/json

    "email" : "",
    "password" : "Y0UH4V37H3r16H77083H4PPY",
    "firstname" : "Jean",
    "lastname": "d'Ormesson",
    "city" : "Paris",
    "phone": "33612345678",
    "address1": "Neuilly-sur-Seine",
    "zip": "92200",
    "country_code" : "fr",
    "isChild" : 1,
    "unlimited" : 0

POST /account HTTP/1.1
Authorization: Bearer your.token
Accept: application/xml

<?xml version="1.0" encoding="UTF-8"?>

$response = \SMSFactor\Account::create([
  'account' => [
    "firstname" => "Stanislav",
    "lastname" => "Petrov",
    "city" => "Vladivostok",
    "phone" => "33612345678",
    "address1" => "Unknown soldier street",
    "zip" => "56330",
    "country_code" => "RU",
    "isChild" => 0, //Is the account a subaccount ?
    "unlimited" => 0, //If isChild, should the subaccount use the parent's credits
    'email' => '',
    'password' => 'av0id_nuc3ar_war'

Result Format

  "status": 1,
  "message": "OK",
  "id": "11689",
  "active": "1"

<?xml version="1.0" encoding="UTF-8"?>