Update Team Member
This API endpoint allows you to update a team member’s information. You can modify the member's role and, if needed, assign them to a different team using new_team_id. If you want to keep the team member in their current team, leave new_team_id unchanged. This feature is useful for adjusting team roles and shifting members between teams to maintain proper access and organization.

Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, the system will update the team member and return a confirmation message.
  • If the request is unauthorized or invalid, the system will respond with an error message.
Path Parameters
  • id string
    The unique ID of the team. Example: 'c03b02ec-244f-4d2c-8f68-3910071ed5c8'
  • memberId string
Request Body Parameters
  • role string
    The new role of the team member (e.g., 'user', 'manager').
  • new_team_id string
JavaScript
Response codes
const axios = require('axios');

const url = "https://customer-cmd.api.pinghome.io/v1/team/c03b02ec-244f-4d2c-8f68-3910071ed5c8/member/a43b87f6-9012-4f1e-bf5f-7c2f5b6e4f29";
const data = {
  "role": "user",
  "new_team_id": "c03b02ec-244f-4d2c-8f68-3910071ed5c8"
};

axios.patch(url, data, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).