API Reference


Adds a member to a group.

This can be used by the public to add themselves to groups within the vhosts their user is in. This requires the user to be logged in. In this case both "uid" and "memberType" should be left as their defaults.

This may also be used by privileged users (those with the groups.addMember permission) to add other users within the group's vhost to a group with the specified member type.


bool groups.addMember ( int groupId, int uid = NULL, int memberType = 2 )


NameTypeRequiredDefault valueDescription
groupIdintRequirednoneThe group ID you are adding the user to.
uidintOptionalNULLThe ID of the user you are adding to a group.
memberTypeintOptional2The permissions you are giving the new member access to. The possible values are: 1 = invited, 2 = member, 9 = admin.


Will return whether or not the member has been successfully added to the desired group.

resultINTUpon success the response will be 1.

Sample Response

Sample REST Response
<?xml version="1.0" encoding="UTF-8"?>
Sample JSON Response
    "status": true,
    "result": 1

Code examples


Be the first to comment on addMember.

Add a Comment

  • captcha