{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Updating a user role","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"updating-a-user-role","__idx":0},"children":["Updating a user role"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The steps below explain how to update the role for a user."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," To learn about the types and functionalities of each role, see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/spotnana/user_profile_concepts#roles"},"children":["user role concepts"]},"."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Step"},"children":["Step"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Endpoint"},"children":["Endpoint "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Details"},"children":["Details"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/usersapi/users/listusersv3"},"children":["List users"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v3/users/list"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List users for a specific TMC or for a company."," ","Use this endpoint to obtain the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]}," of the user whose role needs to be updated. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request body requires:"]}," The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tmcId"]}," or the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["companyId"]},". Additionally, the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userStatusFilter"]}," lets you filter the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ACTIVE"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INACTIVE"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ALL"]}," users. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response will contain:"]}," List of users matching the filter condition, along with each user’s ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},", and all available information (e.g., user’s personal and business info). ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Other APIs will use:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]}," of the user whose role needs to be updated."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/usersapi/users/updateuserroles"},"children":["Update user role"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v2/users/{userId}/roles"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Update the user’s role. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL path requires:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]}," from step 1. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Request body requires:"]}," The new ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["roleType"]}," to be assigned to the user. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","If the user is assigned the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TRAVEL_ARRANGER"]}," role then the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["roles"]}," > ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["metadata"]}," field must be populated in the request."]}]}]}]}]}]},"headings":[{"value":"Updating a user role","id":"updating-a-user-role","depth":1}],"frontmatter":{"seo":{"title":"Updating a user role"}},"lastModified":"2025-09-18T19:54:33.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/spotnana/user_role_update_workflow","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}