- This line was added.
- This line was removed.
- Formatting was changed.
Create a sub-account.
Creating a sub-account will attach the new account to the one used to access the API, which becomes the master account.
The ability to create accounts is disabled by default. To enable this, please contact Text Marketer.
The following parameters can be used in a PUT request URL:
The username of the accessing/master account, for authentication. Not required if you use HTTP Basic Authentication instead.
The password of the accessing/master account, for authentication. Not required if you use HTTP Basic Authentication instead.
Request body parameters:
Under the REST methodology, data are sent in the request body.
Optional. Set an account password (for access to the web UI). Between 5 and 20 characters, inclusive. Alpha numeric (no accented letters), '-' and '_' characters allowed. If you don't supply one, a random password will be used.
Optional. Set an account username (for access to the web UI). Between 5 and 20 characters, inclusive. Alpha numeric (no accented letters), '-' and '_' characters allowed. If you don't supply one, a random password will be used.
Set a new company name for the account. Between 3 and 40 characters, inclusive. No special restrictions.
Optional (required if notifcationnotification_mobile is not set). Sets the email address to which notifcations notifications and alerts are sent. Must be a valid email address.
Optional (required if notifcationnotification_email is not set). Sets the mobile number to which notifcations notifications and alerts are sent. Must be a valid UK mobile number.
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.
|promo_code||Use a promotional code to put extra credits on the account.|
although you cannot set the API username/password here (they are set to the same values as the account username/password you specify), you can modify them afterwards using the POST method.
Either the email address or mobile number must be supplied.
The company name must be supplied.
The email address you specified is invalid.
The mobile number you specified is not a valid UK mobile number.
A value you tried to set is either too long or too short. See specific error text.
|5||A value you tried to set does not match the required pattern. See specific error text.|
A parameter was missing (see specific error text).
|7||The username you specified is already in use. Please choose another.|
You have reached your limit for the number of accounts you can create.
Please contact Text Marketer to increase this.
that a 404 status code is returned if the account ID specified does not exist, and 403 if you do not have permission to access the account you specified.
Example successful response body XML:
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE response PUBLIC "-//textmarketer.co.uk//DTD Web Services REST 1.6//EN" "http://api.textmarketer.co.uk/services/rest/DTD/groups_get.dtd"> <response processed_date="2012-04-11T11:23:14+02:00"> <account> <account_id>abcdefghijklmnopqrstuvwx</account_id> <api_password>my_api_password</api_password> <api_username>my_api_username</api_username> <company_name>Bill's Bakery</company_name> <create_date>20012-02-12T01:00:00+02:00</create_date> <credits>833</credits> <notification_email>firstname.lastname@example.org</notification_email> <notification_mobile>447777777777</notification_mobile> <password>my_UI_password</password> <username>my_UI_username</username> </account> </response>
<?xml version="1.0" encoding="UTF-8"?> <!-- PUBLIC ID : -//textmarketer.co.uk//DTD Web Services REST 1.6//EN SYSTEM ID : http://api.textmarketer.co.uk/services/rest/DTD/groups_get.dtd --> <!ELEMENT response (account)> <!ATTLIST response processed_date CDATA #REQUIRED > <!ELEMENT account (account_id, api_password, api_username, company_name?, create_date, credits, notification_email?, notification_mobile?, password, username)> <!ELEMENT account_id (#PCDATA)> <!ELEMENT api_password (#PCDATA)> <!ELEMENT api_username (#PCDATA)> <!ELEMENT company_name (#PCDATA)> <!ELEMENT create_date (#PCDATA)> <!ELEMENT credits (#PCDATA)> <!ELEMENT notification_email (#PCDATA)> <!ELEMENT notification_mobile (#PCDATA)> <!ELEMENT password (#PCDATA)> <!ELEMENT username (#PCDATA)>