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.

POST

/account

Body Parameters

email
required
The email of the account
password
required
The password must be at least 6 characters long (25 max)
country_code
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
unlimited
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.

Examples


POST /account HTTP/1.1
Host: api.smsup.ch
Authorization: Bearer your.token
Accept: application/json

{
  "account":{
    "email" : "jean@dormesson.com",
    "password" : "Y0UH4V37H3r16H77083H4PPY",
    "firstname" : "Jean",
    "lastname": "d'Ormesson",
    "city" : "Paris",
    "phone": "41781234567",
    "address1": "Neuilly-sur-Seine",
    "zip": "92200",
    "country_code" : "fr",
    "isChild" : 1,
    "unlimited" : 0
  }
}
          
        

POST /account HTTP/1.1
Host: api.smsup.ch
Authorization: Bearer your.token
Accept: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<account>
  <email>jean@dormesson.com</email>
  <password>Y0UH4V37H3r16H77083H4PPY</password>
  <firstname>Jean</firstname>
  <lastname>d'Ormesson</lastname>
  <city>Paris</city>
  <phone>41781234567</phone>
  <address1>Neuilly-sur-Seine</address1>
  <address2></address2>
  <zip>92200</zip>
  <country_code>fr</country_code>
  <isChild>1</isChild>
  <unlimited>0</unlimited>
</account>
        
      

Result Format


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

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>1</status>
  <message>OK</message>
  <id>11690</id>
  <active>1</active>
</response>