Inviting a friend feature

Can we implement invite a friend feature in a playcanvas project if we press a button a UI should appear to enter email id and if we enter friends email id it should send an mail to the mail id which will contain room id and a link?

Is there any API available to do this?