Create a user and share advertisers or sites with them
The console's 'Create user & share' in one call: creates an active account with the given 'login' (its username), e-mail and role, owned by the caller, and optionally shares advertisers and sites with it at 'shareType' (default CAN_VIEW).
https://YOUR-NETWORK-DOMAIN/rest-api/system-users/create-and-share.do The console's 'Create user & share' in one call: creates an active account with the given 'login' (its username), e-mail and role, owned by the caller, and optionally shares advertisers and sites with it at 'shareType' (default CAN_VIEW). No password is sent or returned: the new user receives the console's invitation e-mail with a single-use link to choose one — the advertiser statistics-account invitation when advertisers are shared (naming the first), the site one when only sites are, otherwise the network's account-activated e-mail. 'role' is a role id or name and must be one the caller's role may create users in; an administrator role is never accepted. A role that cannot see advertisers (or sites) cannot receive them. Each shared advertiser needs campaign SHARE (SHARED or ALL) and edit rights on it, each site inventory SHARE and edit rights on it; with SHARE at SHARED level your own share on it must be higher than 'shareType' (IS_OWNER > CAN_EDIT > CAN_VIEW). Nothing is created unless every check passes. Login and e-mail must be unused. The field is 'login' rather than 'username' because 'username' is the authentication parameter of /rest-api.
Form Params
email string required
E-mail address, unused so far; the invitation goes here
reports@northwind.example login string required
Username the new account signs in with, unused so far, up to 64 characters
northwind.reports role string required
Role id or name (case-insensitive). Must be a role your role may create users in; never an administrator role.
Statistics Account for Advertiser advertiserIds array<integer>
Advertisers to share with the new user
1001 firstName string
Optional first name
Mara lastName string
Optional last name
Whitfield shareType string
Access the shares give: CAN_VIEW (default), CAN_EDIT or IS_OWNER
CAN_VIEW siteIds array<integer>
Sites to share with the new user
2001 Responses
200
User created: {success, userId, username, email, roleId, role, active, shareType, advertiserIds, siteIds, invitationSentTo}
400
Field errors under 'errors' (login, email, role), including a login or e-mail already in use, or an unknown role (the message lists the roles you may assign)
401
Authentication error
403
The role may not be assigned by the caller, or a share is not allowed
404
An advertiser or site does not exist, is deleted or is not visible to the caller