POST
/v1/user/{username}/membershipAdd a user to a team
Adds the specified user to a team. Provide the user's username and the team's uuid in the request. The authenticated user needs ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_UPDATE permission to make this change.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
usernamestringrequired
The valid username of the user to add to a team.
Team association details identifying the team to add the user to.
uuidstringoptional
The UUID of the team to associate with the user.
200Returns the updated user object, including the user's teams and permissions.
emailstringoptional
permissionsarray<object>optional
teamsarray<object>optional
usernamestringrequired
304Returned when the user is already a member of the specified team.
401Returned when the request is unauthorized.
404Returned when the user or team cannot be found.
Error handling
A 401 indicates an unauthorized request; the authenticated user must have ACCESS_MANAGEMENT or ACCESS_MANAGEMENT_UPDATE permission. A 404 is returned when the user or team identified by uuid cannot be found. The username path parameter must be a valid username.