---
title: "Update team members"
method: PUT
path: "/v2/teams/{team_id}/update_members"
tags: ["members"]
---

# Update team members

`PUT /v2/teams/{team_id}/update_members`

## Request

- Base URL: `https://api.hubstaff.com`
- URL: `https://api.hubstaff.com/v2/teams/{team_id}/update_members`
- Auth: OAuth 2
  - Authorization code: `https://account.hubstaff.com/authorizations/new`
  - Token URL: `https://account.hubstaff.com/access_tokens` scopes: `hubstaff:read`, `hubstaff:write`
- TypeScript: <https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/docs/v2/teams/:team_id/update_members/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates team members.

Returns {success: true} on success.

Only pass in the members you want to change.

Available roles:
- viewer - View-only access
- user - Standard member access
- manager - Team manager access
- remove - Removes user from team

Note: A team lead must have the manager role. Only organization owners or managers can adjust the lead option.

Batch size: Up to 150 members per request. Larger requests are rejected with HTTP 400 and code "too_many_members".

## Path parameters

- `team_id` integer, required

## Request body

- PutV2TeamsTeamIdUpdateMembers: Update team members
  - `members` object[], required
    - `user_id` integer, required: User ID
    - `role` 'viewer' | 'user' | 'manager' | 'remove': Role for the user.
    - `lead` boolean: Whether to set this user as a team lead

## Response `200`

Updated successfully

## Other responses

- `400`: Invalid parameters
- `401`: Unauthorized
- `403`: API access is only for organizations on an active plan
- `404`: Could not find record
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api.md) - [All operations](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/revisions/c6b90e4e4bdc?raw)
