**Source URL:** https://limited.veevavault.dev/sitevault/vault-api/api-reference/24.3/veeva-sitevault/users/edit-user.md

# Edit User



Edit an existing user in Veeva SiteVault. Bulk editing is not supported. You must be in the organization context to add study assignments for other sites within the organization.

<Endpoint path="/api/{version}/app/sitevault/useradmin/persons/{personId}" method="PUT"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `application/json` |
| `Accept` | `application/json` |
</FieldTable>

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `{personid}` | The ID of the `person__sys` to edit. |
</FieldTable>

## Body Parameters {#body-parameters}

In the body of the request, upload parameters as a JSON file. The following tables provide the required and most common optional parameters for editing a user.

##### Edit Existing User {#edit-existing-user}

The following table lists the fields required to edit an existing user.

<FieldTable>
| Name | Description |
| --- | --- |
| `username` | The username associated with the existing User account. Must include the domain name. Only required when editing a person record to associate with an existing user record. |
| `is_investigator` | Indicates if the user is an investigator. External users must be noted as `false`. |
</FieldTable>

##### Organization Assignment {#organization-assignment}

The following table lists the fields required to include an organization assignment when editing a user.

<FieldTable>
| Name | Description |
| --- | --- |
| `assignments` | This object defines the user’s permissions. |
| `assignments.org_assignment` | This object defines the user’s organization-level permissions. Not required when editing if the organization assignment isn’t changing. Content sent in this call will overwrite any existing orgAssignments with the same orgID. |
| `assignments.org_id` | The ID of the organization. |
| `assignments.system_role_id` | 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 removing access to an organization, select `org_no_access__v`. |
| `assignments.addons` | 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. |
</FieldTable>

##### Site Assignment {#site-assignment}

The following table lists the fields required to include a site assignment when editing a user.

<FieldTable>
| Name | Description |
| --- | --- |
| `site_assignments` | This object defines the user’s site-level permissions. |
| `site_assignments.site_USN` | The Universal Site Number (USN) assigned to the Site. |
| `site_assignments.system_role_id` | The system ID for the site-level system role for the user. Select from `regulatory__v`, `study_team__v`, `site_viewer__v`, or `external__v`. When removing access to a site, set to `no_access__v`. |
| `site_assignments.addons` | 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. |
</FieldTable>

##### Study Assignment {#study-assignment}

The following table lists the fields required to include a study assignment when editing a user.

## Request {#request}

<CodeExample title="">
```
curl -X PUT -H "Authorization: {SESSION_ID}" \
--data-binary @"users_edit.json" \
https://myvault.veevavault.com/api/v24.2/app/sitevault/useradmin/persons/V0B000000001001

```
</CodeExample>

## Example JSON Request Body {#example-json-request-body}

<CodeExample title="">
```
{
    "is_investigator": false,
    "assignments": {
        "org_assignment": {
            "org_id": "V42000000001001",
            "system_role_id": "org_no_access__v"
        },
        "site_assignments": [
            {
                "site_usn": "US-NC-0002",
                "system_role_id": "no_access__v"
            }
        ]
    }
}

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
    "responseStatus": "SUCCESS",
    "data": {
        "response": {
            "status": "Success",
            "email": "jerry.cotter@company.com",
            "username": "jerry.cotter@company.com",
            "person_id": "V0B000000001001",
            "record_status": "active__v"
        }
    }
}

```
</CodeExample>

---

**Previous:** [Create User](/sitevault/vault-api/api-reference/24.3/veeva-sitevault/users/create-user)  
**Next:** [Veeva eConsent](/sitevault/vault-api/api-reference/24.3/veeva-sitevault/veeva-econsent)