Overview
User URL
All HTTP POSTS sent to SMS Central’s API to create a user must go to the following URL:
https://my.smscentral.com.au/api/v3.2/user/create |
Parameters
The parameters below are POST parameters that can be provided in order to create a user.
Parameter | Required | Type | Possible Value/ Example |
USERNAME | Yes | String | |
PASSWORD | Yes | String | |
USER | Yes | JSON format | See definition below. |
HTTP Post Parameters Definitions
USERNAME
- Type: string
- Description: This is the Username for your SMS Central account
PASSWORD
- Type: string
- Description: This is the Password for your SMS Central account
USER
- Type: JSON-formatted string
- Description: This is where you will provide the details and settings, in JSON-format, of the user being created and the account(s) they are to be assigned to.
JSON Field | Required | Value Type & Possible/ Example Value(s) |
USERNAME | Yes | String containing the Username for the user being created |
PASSWORD | Yes | String containing the Password for the user being created |
FIRSTNAME | Yes | String containing the first name for the user being created |
LASTNAME | No | String containing the last name for the user being created |
EMAILADDRESS | No | String containing the email address for the user being created |
MOBILENUMBER | No | String containing the mobile number (in international format) for the user being created |
ACCOUNTS | Yes | JSON-formatted array of accounts (and user level) the user should be assigned to. See further notes. |
USER - JSON Further Notes
ACCOUNTS
In order to assign the user being created into account(s), you must provide an array of JSON-formatted account objects with the “ID” integer value of the account (refer to the Account API and the integer value of the “Userlevel”.
You must provide 1 or more accounts.
Note: Userlevel correlates with the user levels in the web portal with string values as follows:
• Administrator user, integer value 1
• Advanced user, integer value 2
• Standard user, integer value 3
This would be in the format described below.
{ account: { “ID” : [Integer value of the account ID], “Userlevel” : [integer value 1, 2 or 3] }, account: { “ID” : [Integer value of the account ID], “Userlevel” : [integer value 1, 2 or 3] }, account: { “ID” : [Integer value of the account ID], “Userlevel” : [integer value 1, 2 or 3] }, }
Response
After sending your HTTP POST with the required parameters to the User URL to create a user, SMS Central will return a “HTTP/1.1 200 OK” HTTP status code in the header of the response to your HTTP POST and JSON-formatted content, providing your details of the user created.
The JSON Response will be of the following format:
- On Success
{ “user” :
“username” : “String value containing the name of the account, as per your
USERNAME value in the JSON-formatted 'user' object”,
“ID” : [integer value containing the unique ID of this user]
}
- On Failure
{ “error” :
“errorcode” : [integer value containing an error code unique to error type],
“errordescription” : “String description of the error that has occurred”
}
Copyright © 2023 SMS Central by Sinch MessageMedia