# Update User

## POST /v2/admin/user/{uid}/update

> Update an existing V2 User

```json
{"openapi":"3.1.1","info":{"title":"Pod API","version":"20.17.1"},"servers":[{"url":"http://yourpodURL.symphony.com/pod"}],"paths":{"/v2/admin/user/{uid}/update":{"post":{"summary":"Update an existing V2 User","parameters":[{"schema":{"type":"string"},"name":"sessionToken","description":"Session authentication token.","in":"header","required":true},{"schema":{"type":"integer","format":"int64"},"name":"uid","description":"User ID as a decimal integer\n","in":"path","required":true}],"tags":["User"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2UserDetail"}}}},"400":{"description":"Client error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized: Invalid session token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden: Caller lacks necessary entitlement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error, see response body for further details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2UserAttributes"}}},"required":true}}}},"components":{"schemas":{"V2UserDetail":{"description":"V2 Detailed User record.","type":"object","properties":{"userAttributes":{"$ref":"#/components/schemas/V2UserAttributes"},"userSystemInfo":{"$ref":"#/components/schemas/UserSystemInfo"},"features":{"$ref":"#/components/schemas/IntegerList"},"apps":{"$ref":"#/components/schemas/IntegerList"},"groups":{"$ref":"#/components/schemas/IntegerList"},"roles":{"$ref":"#/components/schemas/StringList"},"disclaimers":{"$ref":"#/components/schemas/IntegerList"},"avatar":{"$ref":"#/components/schemas/Avatar"}}},"V2UserAttributes":{"description":"V2 User record.","type":"object","properties":{"emailAddress":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"userName":{"type":"string"},"displayName":{"type":"string"},"companyName":{"type":"string"},"department":{"type":"string"},"division":{"type":"string"},"title":{"type":"string"},"workPhoneNumber":{"type":"string"},"mobilePhoneNumber":{"type":"string"},"twoFactorAuthPhone":{"type":"string"},"smsNumber":{"type":"string"},"accountType":{"type":"string","enum":["NORMAL","SYSTEM","SDL"]},"location":{"type":"string"},"recommendedLanguage":{"type":"string"},"jobFunction":{"type":"string"},"assetClasses":{"type":"array","items":{"type":"string"}},"industries":{"type":"array","items":{"type":"string"}},"marketCoverage":{"type":"array","items":{"type":"string"}},"responsibility":{"type":"array","items":{"type":"string"}},"function":{"type":"array","items":{"type":"string"}},"instrument":{"type":"array","items":{"type":"string"}},"currentKey":{"$ref":"#/components/schemas/V2UserKeyRequest"},"previousKey":{"$ref":"#/components/schemas/V2UserKeyRequest"},"userMetadata":{"type":"object","description":"Metadata map of key/values","additionalProperties":{"type":"object"}}}},"V2UserKeyRequest":{"description":"User RSA key information.","type":"object","properties":{"key":{"description":"User RSA public key.","type":"string"},"expirationDate":{"description":"RSA key expiration date. This value is set just for rotated keys.","type":"integer","format":"int64"},"action":{"description":"Action to be performed on the RSA key.\nThe following actions can be performed onto the user's active RSA key:\n  - SAVE\n  - REVOKE\nThe following actions can be performed onto the user's rotated RSA key:\n  - REVOKE\n  - EXTEND\n","type":"string"}}},"UserSystemInfo":{"description":"User Status Information.","type":"object","properties":{"id":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["ENABLED","DISABLED"]},"suspended":{"type":"boolean","description":"An optional attribute indicating whether the user is temporarily suspended or not. Since SBE 20.14."},"suspendedUntil":{"type":"integer","format":"int64","description":"An optional unix timestamp until which the suspension is effective. Since SBE 20.14."},"suspensionReason":{"type":"string","description":"An optional description of the suspension reason. Since SBE 20.14."},"createdDate":{"type":"integer","format":"int64"},"createdBy":{"type":"string"},"lastUpdatedDate":{"type":"integer","format":"int64"},"lastLoginDate":{"type":"integer","format":"int64"},"lastPasswordReset":{"type":"integer","format":"int64"},"deactivatedDate":{"type":"integer","format":"int64"}}},"IntegerList":{"type":"array","items":{"type":"integer","format":"int64"}},"StringList":{"type":"array","items":{"type":"string"}},"Avatar":{"type":"object","properties":{"size":{"description":"The Avatar Size","type":"string"},"url":{"description":"Url of the image","type":"string"}}},"Error":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}}}}
```

### Request Example

```bash
curl -X POST \
https://acme.symphony.com/pod/v1/admin/user/7215545078541/update \
-H "sessionToken: SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{   
    "accountType": "NORMAL",
    "firstName": "Jane",
    "lastName": "Doe",
    "username": "janedoe",
    "displayName": "Jane Doe",
    "companyName": "Symphony",
    "department": "",
    "division": "",
    "title": "Sales Manager",
    "workPhoneNumber": "",
    "mobilePhoneNumber": "",
    "twoFactorAuthPhone": "",
    "location": "San Francisco",
    "jobFunction": "Sales",
    "assetClasses": ["Commodities"],
    "industries": ["Basic Materials"],
    "marketCoverage": ["EMEA"],
    "responsibility": ["BAU"],
    "function": ["Trade Management"],
    "instrument": ["Securities"],
    "currentKey": {
        "key":"-----BEGIN PUBLIC KEY-----\nMIICIj...==\n-----END PUBLIC KEY-----",
        "action":"SAVE"
    }    
}'
```

> #### 📘 Note - Suspension
>
> Since 20.14, `userSystemInfo` from the payload includes suspension info:
>
> * if user is active, then the `suspended` attribute is set to false,
> * if user is suspended, then the `suspended` attribute is set to true and both `suspendedUntil` and `suspensionReason` are as well included in the payload.
>
> *Please note that even if the suspendedUntil date is in the past, the user will remain suspended=true until he first logs on the client after the suspension ended. The suspended info are then automatically updated.*\
> See the [Suspend User Account](/main/user-management/suspend-user-v1.md) endpoint for more information.

> #### 🚧 Required Permissions
>
> Calling this endpoint requires the ACCESS\_USER\_PROVISIONING\_API and ACCESS\_ADMIN\_API privileges.\
> See [Bot Permissions](https://docs.developers.symphony.com/building-bots-on-symphony/configuration/bot-permissions) for a list of roles and associated privileges.

> #### ❗️ Known Issues
>
> There is a known bug where the "Industries" and "Asset Classes" fields cannot be cleared once set. For example, if you set `assetClasses` on a user to \[`Conglomerates`, `Healthcare`], you can update the user and set it to \[`Conglomerates`], but you cannot update the user and clear it by setting it to \[].


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rest-api.symphony.com/main/user-management/update-user-v2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
