Community articleCreating a community invitation programmatically
Added by IBM contributorIBM on March 17, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

To invite someone to a community, send an Atom entry document containing the invitation to the community invitations-list resource.
Tags: commapi



To invite someone to a community, send an Atom entry document containing the invitation to the community invitations-list resource.

See Authenticating requests for information about how to authenticate the request.

Input

Provide an invitation Atom entry document.

Note: The content type of the Atom entry document must be application/atom+xml.

Output

An Atom entry document containing the new invitation.

Input
Method URI Description
POST /communities/service/atom/community/invites Value of the href attribute of the <link> element with the rel="http://www.ibm.com/xmlns/prod/sn/invitations-list" attribute value for each community.
Content Type: application/atom+xml
Name Type Optional Description
communityUuid
string No The UUID of the community you wish to add an invitation to. This is a mandatory parameter
userid
string No id of user you wish to invite
Output
Content Type: application/atom+xml
Name Type Optional Description
Location
string No Link to edit_url of the invitation. You can use the web address specified here to subsequently retrieve and update the invitation.
Code Description
201
Created. Indicates that the invitation was successfully created. If an error occurs, this header contains one of the error codes.
403
Unauthorized.
404
Not Found
409
Conflict. Returned if the user is already a member of the community.
References