Create User
Create a new user in Veeva SiteVault. Bulk creation of users is not supported. You must be in the organization context to add study assignments for other sites within the organization.
POST
/api/{version}/app/sitevault/useradmin/personsHeaders
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/json |
Accept | application/json |
Body Parameters
Section link for Body ParametersIn the body of the request, upload parameters as a JSON file. The following tables provide the required and most common optional parameters for creating a user.
User Creation
Section link for User CreationThe following table lists the fields required to create a user.
| Name | Description |
|---|---|
userrequired | This is an object definition of the User being created. This represents the user__sys record in the Vault. |
user.emailrequired | The user’s email. |
user.usernamerequired | The username of the user being created, with the domain name. This is always required unless security policy is VeevaID. |
user.first_namerequired | The user’s first name. |
user.last_namerequired | The user’s last name. |
user.security_policy_idrequired | The name__v value of the Security Policy for this user. The standard is VeevaID. However, Enterprise Veeva SiteVaults may utilize custom policies. When creating a Staff user who will not require an account to log in, set as noUser. |
user.person_typerequired | Defines the type of the person__sys record. Select from staff__v or external__v. |
user.languageoptional | The 2-letter system code for the user language. If omitted, defaults to en for English. |
is_investigatorrequired | Indicates if the user is an investigator. External users must be set as false. |
federated_idoptional | Federated ID for the user being created. |
Organization Assignment
Section link for Organization AssignmentThe following table lists the fields required to include an organization assignment when creating a user.
| Name | Description |
|---|---|
assignmentsrequired | This object defines the user’s permissions. |
assignments.org_assignmentrequired | This object defines the user’s organization-level permissions. Required when creating a user. Content sent in this call will overwrite any existing organization assignments with the same organization ID. |
assignments.org_assignment.org_idrequired | The ID of the organization. |
assignments.org_assignment.system_role_idrequired | The system ID of the organization-level system role for the user. Select from org_admin__v, org_full__v, or org_external__v. When creating a Staff user who will not require an account to log in, set as org_cant_login__v. |
assignments.org_assignment.addonsoptional | The system ID for the organization-level add-on permissions assigned to the user. Add-on permissions must be valid for the specified system role. Add-on permissions are not available for the Site Viewer or External User roles. Select org_patients__v. Do not include if not applicable. |
Site Assignment
Section link for Site AssignmentThe following table lists the fields required to include a site assignment when creating a user.
| Name | Description |
|---|---|
site_assignmentsrequired | This object defines the user’s site-level permissions. |
site_assignments.site_USNrequired | The Universal Site Number (USN) assigned to the Site. |
site_assignments.system_role_idrequired | The system ID for the user’s site-level system role. Select from regulatory__v, study_team__v, site_viewer__v, or external__v. When creating a Staff user who will not require an account to log in, set as `site_cant_login__v``. |
site_assignments.addonsoptional | The system ID for the site-level add-on permissions assigned to the user. Add-on permissions must be valid for the specified system role. Add-on permissions are not available for the Site Viewer or External User roles. Select from site_budgets__v, site_patients__v, and site_profiles__v. Use a comma to separate when selecting multiple add-on permissions (ex. ["site_budgets__v", "site_patients__v"]). Do not include if not applicable. |
Study Assignment
Section link for Study AssignmentThe following table lists the fields required to include a study assignment when creating a user.
| Name | Description |
|---|---|
study_assignmentsrequired | This object defines the user’s study-level permissions. |
study_assignments.idrequired | The Study ID. |
study_assignments.study_rolerequired | The study-level role for the user. Select from sponsor_cro__v or auditor_inspector__v for external users. Select from clinical_research_coordinator__v, data_coordinator__v, principal_investigator__v, regulatory_coordinator__v, research_nurse__v, subinvestigator__v, pharmacist__v, or other__v, for site staff. |
Request
Section link for Requestcurl -X POST -H "Authorization: {SESSION_ID}" \
--data-raw '[
{
"user": {
"email": "jerry.cotter@company.com",
"first_name": "Jerry",
"last_name": "Cotter",
"security_policy_id": "VeevaID",
"person_type": "staff__v",
"language":"en"
},
"person_type": "staff__v",
"is_investigator": false,
"assignments": {
"org_assignment": {
"org_id": "V42000000001001",
"system_role_id": "org_admin__v"
},
"site_assignments": [
{
"site_usn": "US-NC-0001",
"system_role_id": "regulatory__v"
}
]
}
}
]' \
https://myvault.veevavault.com/api/v26.1/app/sitevault/useradmin/personsResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": {
"response": [
{
"status": "Success",
"email": "jerry.cotter@company.com",
"person_id": "V0B000000001001",
"record_status": "active__v"
}
]
}
}