Update a Team Member
PATCH
https://api.vercel.com/v1/teams/{teamId}/members/{uid}Update the membership of a Team Member on the Team specified by
teamId, such as changing the role of the member, or confirming a request to join the Team for an unconfirmed member. The authenticated user must be an OWNER of the Team.https://api.vercel.com/v1/teams/{teamId}/members/{uid}
const response = await fetch('https://api.vercel.com/v1/teams/teamId/members/uid', { method: 'PATCH', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "confirmed": "true", "role": "VIEWER", "teamPermissions": [], "projects": [ { "projectId": "prj_ndlgr43fadlPyCtREAqxxdyFK", "role": "ADMIN" } ], "joinedFrom": { "ssoUserId": "value" } }),});
const data = await response.json();console.log(data);Response
{ "id": "icfg_1234567890"}AuthorizationbearerToken
Default authentication mechanism
application/json
The team permissions to set for the member. Permissions must be compatible with the team roles assigned to the member.
400One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.
Cannot disconnect SSO from a Team member that does not have a SSO connection.
Cannot confirm a member that is already confirmed.
Cannot confirm a member that did not request access.
401The request is not authorized.
Team members can only be updated by an owner, or by the authenticated user if they are only disconnecting their SAML connection to the Team.
402Error
403You do not have permission to access this resource.
404The provided user is not part of this team.
A user with the specified ID does not exist.
409Error
410Error
500Error