Social - Community - Member - Invite

/social/community/member/invite/{communityid}/{personid}

Attempts to invite a user to a community.  You must be the community owner to send invites.  The person will receive an email allowing a user to accept or decline your membership offer.
The person invited will respond to the invite using this API call: Request Response

Authentication

Required, see Auth - Login. The caller must either be the community moderator/owner, or an administrator.

Arguments

communityid (required)
Community ID to invite a user to, can also be a regex (community ID - regex) provided that matches only a single community.

personid (required)
Person id to invite to community - this will normally be the person's username (normally email address) but can also be their database "_id".

Can also be a comma-separated list of either "_id" or username address, in which case the same operation is applied to each user (for output format see below)

skipinvitation (optional)
Allows administrators to automatically add a user to a community without having to send an invitation to the new user. 

Example

http://infinite.ikanow.com/api/community/member/invite/4cc942489889a84938870102/user@organization.com

http://infinite.ikanow.com/api/community/member/invite/4cc942489889a84938870102/user@organization.com?skipinvitation=true

http://infinite.ikanow.com/api/community/member/invite/4cc942489889a84938870102/4de942481532a84938870204

http://infinite.ikanow.com/api/community/member/invite/*community%20name/4de942481532a84938870204

http://infinite.ikanow.com/api/community/member/invite/*community%20name/user@organization.com

http://infinite.ikanow.com/api/community/member/invite/50a7a290fbf01a3c159895c4/5233614ee4b02e1667b3b822,506c8616fbf042893dd6b3f3,50bcd83cfbf0fd0b27875a82,50bcd83cfbf0fd0b27875aaa?skipinvitation=true

Example Response
{"response":{"action":"Invite Community","success":true,"message":"Invited user to community successfully","time":868}}

The bulk operation has a slightly different format ("success" is false if any of the requests fail)

{"response": 
	{"action": "Invite Community",
	"success": false,
	"message": "succeeded=1 failed=3",
	"time": 1896
	},
"data": 
	{"succeeded": [ "5233614ee4b02e1667b3b822" ],
	"failed": 
	"50bcd83cfbf0fd0b27875aaa": "Person/User Group does not exist",
	"50bcd83cfbf0fd0b27875a82": "You are already a member of this community",
	"506c8616fbf042893dd6b3f3": "You are already a member of this community"
	}
	}
}