How do I go about adding an existing BitBucket user to a private repository using the 2.0 API? Previously, I did this something like this:
curl -u $bb_user:$bb_pass -X PUT "https://api.bitbucket.org/1.0/privileges/$bb_user/$repos/$new_user" --data write
I'm aware of the 1.0 endpoint for inviting users by e-mail, but this isn't practical, given the large number of private repositories to which I need to add the new user.