Skip to end of metadata
Go to start of metadata

 

Create a new account, linked to your main account (requires additional permissions on your account, please contact Text Marketer to apply).

Example

Arguments:

 

String companyName: 

the company name for the new account. Between 3 and 40 characters, inclusive. No special restrictions.

String notificationMobile:

(optional*) a mobile number to which notifications and alerts are sent. Must be a valid UK mobile number. *Required if notificationEmail is not set.

String notificationEmail:

(optional*) an email address to which notifications and alerts are sent. *Required if notificationMobile is not set.

String username:

(optional) the username you wish to set on the new account - the API username will be the same. Between 5 and 20 characters, inclusive. Alpha-numeric (no accented letters), '-' and '_' characters allowed. If this is not set, one will be set for you.

String password: 

(optional) the password you wish to set on the new account - the API password will be the same. Between 5 and 20 characters, inclusive. Alpha-numeric (no accented letters), '-' and '_' characters allowed. If this is not set, one will be set for you.

String promoCode:

(optional) a promotional code entitling the new account to extra credits.

boolean overrideRates:

if set to true, use the credits rates set on your main account (the account used to access the API), rather than the Text Marketer defaults.

Returns:

an Hashtable<String, String> with 10 keys: 'api_password', 'api_username', 'company_name', 'create_date', 'credits', 'password' and 'username', 'notification_email', 'notification_mobile', 'account_id'

Hashtable keyValue
api_password 

String. The new account API password

api_username

String. The new account API username

company_name String. The new account company name
create_date 

String. The creation date of the account in ISO 8601 format

credit 

Integer. The number of credits on the new acccount.

password

String. The new account web interface password.

usernameString. The new account web interface username.
notification_email 

String. The new account email address used for notifications.

notification_mobile

String. The new account UK mobile number used for notifications.

account_id 

String. The ID of the account used for identification in other functions.

Specific error codes:

CodeMeaning
0Either the email address or mobile number must be supplied.
1The company name must be supplied.
2The email address you specified is invalid.
3

The mobile number you specified is not a valid UK mobile number.

4

A value you tried to set is either too long or too short. See specific error text.

5A value you tried to set does not match the required pattern. See specific error text.
6A parameter was missing (see specific error text).
7The username you specified is already in use. Please choose another.
8

You have reached your limit for the number of accounts you can create. Please contact Text Marketer to increase this.