Updates the authenticated user's profile preferences.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/user-preference/save.do
Updates the authenticated user's profile preferences. Accepts a JSON body with any combination of profile fields: email, phone, firstName, lastName, websiteUrl, company, state and accountUIStyle. Only non-null fields in the request body are applied (partial update). If a 'password' object is included (with current, password, and confirm sub-fields), the password is changed after verifying the current password matches; that ends the user's other signed-in sessions and emails them that the password was changed, at the previous address as well when the same body changes the email. Changing the email also sends the previous address a notice that it was changed. Requires authentication. The updated preference object is returned in the response.
Body
A JSON body. An example, built from the field definitions:
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/user-preference/save.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new StringContent("{\"userId\":\"101\",\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"phone\":\"+1 (555) 123-4567\"}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());