|
Create New User
Create a new user for an account.
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_password |
|
1959caadac9b13dcb3 |
|
Required |
|
|
|
type |
|
user_new |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
user_name |
|
janeclerk |
|
Required |
|
|
|
user_new_password |
|
pa$$wo0rd |
|
Required |
|
|
|
user_first_name |
|
Jane |
|
Optional |
|
|
|
user_last_name |
|
Doe |
|
Optional |
|
|
|
user_custom1 |
|
Melbourne Office |
|
Optional |
|
|
|
user_PIN |
|
1234 |
|
Optional |
|
|
|
language_selector |
|
EN |
|
Optional |
|
|
|
timezone_selector |
|
68 |
|
Optional |
|
|
|
user_role |
|
K |
|
Required |
|
|
|
allowed_campaigns |
|
all or campaign id(s) or none |
|
Required |
|
|
|
|
|
|
|
|
|
|
|
Output Format: |
|
|
|
output |
|
JSON or XML |
|
Optional. If not provided, defaults to XML |
|
|
|
callback |
|
someFunctionName |
|
Optional: JSONP format |
|
|
|
condensed |
|
yes |
|
Optional (No white space) Applies only to JSON(P) output |
|
|
|
|
|
|
|
|
|
Notes:
- The user_name cannot be longer than 20 characters and must contain only alphanumeric characters and the underscore (" _ ")
- The user_PIN is an API-specific field made available for custom applications such as a physical terminal. It cannot be defined or edited in the web interface. It MUST be unique to each user within an account.
- You can find a list of language two-letter codes in the Available Languages reference page
- You can find a list of timezone codes in the Timezones reference page
- The allowed_campaigns consists of (see examples below) :
- A single entry "all"
- A single entry "none"
- Multiple entries of campaign IDs separated by a comma ","
- Administrator (A) users are not affected by this parameter and are always set to access all campaigns.
- The user_role is based on the roles listed in the User Permission Levels reference page.
- The user_custom1 field is shown on the Dashboard as "Location" and on XML results from the API as the <user_addtl_info> tag.
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['user_id'] = 'john1970';
- $data['user_password'] = '1959caadac9b13dcb3';
- $data['type'] = 'user_new';
- $data['account_id'] = 'greatwidgets';
- $data['user_name'] = 'janeclerk';
- $data['user_new_password'] = 'pa$$w0rd';
- $data['user_first_name'] = 'Jane';
- $data['user_last_name'] = 'Doe';
- $data['user_custom1'] = 'Melbourne Office';
- $data['language_selector'] = 'EN';
- $data['timezone_selector'] = '68';
- $data['user_role'] = 'K';
- $data['allowed_campaigns'] = '12971184024723,0239471023412';
- or
- $data['allowed_campaigns'] = 'all';
- or
- $data['allowed_campaigns'] = 'none';
Success XML Response (New / Updated User):
- <response status="success">
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|
|