Legacy Dev Forum Posts

 View Only

Sign Up

Where do get api/java SDK to update user's preferred nane

  • 1.  Where do get api/java SDK to update user's preferred nane

    Posted 06-05-2025 18:20

    richardt.li | 2021-09-23 15:29:01 UTC | #1

    We noticed that there is no api to update user's agent preferred name from any api documentation and Java SDK package, however, after seeking help from Genesys support, we noticed that there is a hidden api which can do the trick behind the scene, which is using

    put action on https://api.mypurecloud.com/api/v2/users/baddc38f-4d51-478d-90f2-4a03987776e3/profile

    and the html body could be like {"agent":{"name":[{"labelKey":"name","value":"John Doe","_id":"3OTpZJM6pZ2ZTwyQtwoy9I","tempId":"ember1504"}]},"version":31}


    anon28168572 | 2021-09-23 16:22:11 UTC | #2

    You can use the PATCH operation on the /api/v2/users/{userId} endpoint. Provide version and name in the body and you can update the name in a fully supported way.

    I haven't tried it but it looks like the java sdk supports that as well. https://developer.genesys.cloud/api/rest/client-libraries/java/UsersApi#patchUser


    Becky_Powell | 2021-09-23 16:44:50 UTC | #3

    Hi Richard, thank you for your message. I have logged a ticket with the team that owns that API to expose the PUT endpoint to the public API. Until that time, I would not recommend that you use it, as undocumented endpoints can change any time without warning. Please use instead the PATCH endpoint that Shane referenced above.

    Additionally, would you mind sharing with me the case number from your Care interaction? I would like to follow up.

    Have a great day!

    -Becky Powell, Director, Product Management


    Becky_Powell | 2021-11-16 17:42:23 UTC | #5


    richardt.li | 2021-11-16 17:48:04 UTC | #6

    there are a few case created for this manner, 0003020946 0002978762 0002990800

    but they are all talking about one same thing, we need to have a public method to update agent preferred name from Java SDK. right now, there is no way we can achieve this.


    richardt.li | 2021-11-16 20:02:52 UTC | #7

    Hello @anon28168572 , the solution you provide is not working for us, please verify from your end, please be noted, we are asking for "Agent name" update inside "Agent" section from people tab


    anon28168572 | 2021-11-17 06:28:44 UTC | #8

    Apologies, I didn't realize you were trying to update the Agent section. You can update the top level name field on the user record or event the name field within the HR section or "employerInfo" with the API. However, it doesn't appear that the agent section name can be updated with the same mechanism.


    richardt.li | 2021-11-17 12:13:15 UTC | #9

    Correct. that is all what this topic talking about, we need to have a method to update this fields inside Java SDK. Thanks for your clarification on this.


    This post was migrated from the old Developer Forum.

    ref: 12118