Creating a subaccount


Creating subaccounts.

URL

POST https://api.smspartner.fr/v1/subaccount/create

Parameters

Each API request supports the following parameters:

apiKey API key of your account. You get it in your SMS Partner account.
type Subaccount type: this choice is final, it will no longer be possible to modify it

    • simple:
      – The subaccount will not receive any email or SMS.
      – No phone numbers requested.
      – Purchase is not allowed.
  • advanced:
    – A valid email is required.
    – The registration process is identical to that of a standard account.
    – A mobile phone number will be required at registration.
parameters

email:

Email valide du titulaire du compte

isBuyer:

If isBuyer=1the sub-account will be able to buy these own SMS messages.

creditToAttribute (optional):

Credit in euros added to the sub-account when creating. This credit will be deducted from the main account.

firstname (optional):

First name of the sub-account holder.

lastname (optional):

Name of the sub-account holder.

email (optional):

If this field is empty, an email will be generated automatically (ex: 9875587@smspartner.fr)

creditToAttribute (optional):

Credit in euros added to the sub-account when creating. This credit will be deducted from the main account.

firstname (optional):

First name of the sub-account holder.

lastname (optional):

Name of the sub-account holder.

Optionnels_format parameter format of the response. You can choose between JSON or XML. By default, the response format is JSON.

Request

Example of requests:

Answers

Errors

Example of an error message:

Control Code

Answers
1 The API Key is required
2 You don’t have the authorization
3 isBuyer is required
4 Type is required (simple or advanced)
5 The subaccount type does not exist (simple or advanced)
6 Email is required
7 An account already exists with this em
8 creditToAttribute must be greater than 0
9 The scale must be greater than 0
200 Everything went well!