- Update Team Members Request Payload
The request payload for updating a team's membership. admin_ids is the complete set of teammates who should be on the team once the request completes, not a list of changes to apply. Any teammate currently on the team but absent from admin_ids is removed.
The team's members and their priority levels are the only parts of a team this endpoint writes, and the request is read from the body: a parameter sent in the query string is rejected rather than applied. A team read from the API can be sent back whole, since the other fields of the representation are accepted as long as they are unchanged. Trying to change one of them returns a 400 rather than being ignored, as does any field a team does not have. admin_ids cannot be empty, so the endpoint will not empty a team, and a team with no members cannot be sent back as it reads.
admin_priority_level sets which teammates take work first. It is optional, and names only the teammates whose level the request is setting: a teammate it leaves out keeps the level they already have, and one joining the team without a level named becomes a primary member. A level named for a teammate the request removes is ignored, so a team read from the API can still be sent back whole with only admin_ids changed.
Naming an id that is on neither the team nor admin_ids returns a 400. So does naming the same id at both levels, unless the team really does hold that teammate at both: a read reports that shape, and sending it back settles them at a single level rather than being refused.
Only a team whose distribution_method is load_balanced can have secondary members, so making a teammate secondary returns a 400 on any other team. primary_admin_ids is accepted on every team, but a team that does not balance assignment does not report admin_priority_level back and does not use the levels to decide who work goes to.
The ids of every teammate who should be a member of the team. Must contain at least one id, and no more than 1000.
[ 493881, 493882 ]
The priority levels to set, naming only the teammates whose level is being set
{ "admin_ids": [ 493881, 493882 ], "admin_priority_level": { "primary_admin_ids": [ … ], "secondary_admin_ids": [ … ] } }