Invitations
Allows repository administrators to send email invitations to grant read, write, or admin privileges to a repository.
Prepare:
// @see: https://bitbucket.org/account/user/<username or team>/api
$oauth_params = array(
'client_id' => 'aaa',
'client_secret' => 'bbb'
);
$invitation = new \Bitbucket\API\Invitations();
$invitation->getClient()->addListener(
new \Bitbucket\API\Http\Listener\OAuth2Listener($oauth_params)
);
Send invitation:
$invitation->send($account_name, $repo_slug, 'user@example.com', 'read');