Creates authors - only for Elucidat resellers
The following options are available for roles:
- 'administrator' - can access everything in your account - including creating and administering Editors and managing Billing.
- 'author' - Can add, edit, publish and delete any Projects in your account, but cannot administer your account.
- 'reviewer' - Can view any Projects in your account, and leave comments, but cannot make changes.
- 'designer' - Behaves like an Editor, but it also able to create their own layouts.
- 'designer-with-analytics' - Behaves like an Designer, but also has access to the analytics feature.
- 'analytics' - Grants access to the analytics feature.
The scope of interaction a user can have with projects can also be limited. The following scopes can be used:
- 'account' - Grants access to all projects in your account.
- 'department' - Grants access to projects assigned to any departments the user is in.
- 'individual' - The user must be shared into projects on an individual basis.
Before using this call, you'll need to authenticate against the API as detailed in Making your first call to the Project API.
All of these examples have simulation mode turned on. Once you are ready to use in a production environment, you can remove the simulation parameter. Any changes will then affect your account.
PHP
$nonce = get_nonce('https://api.elucidat.com/v2/authors/create', 'PUBLIC_KEY', 'PRIVATE_KEY');
$headers = auth_headers('PUBLIC_KEY', $nonce);
$fields = array(
'first_name' => $arg1,
'last_name' => $arg2,
'email' => $arg3,
'role' => $arg4,
'scope' => $arg5,
'simulation_mode' => 'simulation'
);
$result = call_elucidat($headers, $fields, 'POST', 'https://api.elucidat.com/v2/authors/create', 'PRIVATE_KEY');
echo ("HTTP status code: " . $result['status'] . "\n");
print_r($result['response']);
Python 3.9
endpoint = '/v2/authors/create'
method = 'POST'
params = {}
data = {'first_name': 'arg1',
'last_name': 'arg2',
'email': 'arg3',
'role': 'arg4',
'scope': 'arg5',
'simulation_mode': 'simulation'}
api = Api(api_root, endpoint, method, params, data, private_key, public_key)
api.call_elucidat()
Response
HTTP status code: 200
Array
(
[message] => Author created
[num_editors_used] => 3
)