Create community activities 

To create a community activity, send a POST request to the remote applications feed of the community to which you want to add the activity.

Before you begin

You cannot add activities to a community programmatically until the Activities widget has been added to the community using the Customize menu option in the product user interface. It is not until the widget is explicitly added that the service document resource for activities is available from the remote applications feed.

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

  1. Determine the URI to which to POST the activity Atom document to create the community activity by first accessing the service document for remote applications. See Retrieve a remote applications list for more details.

  2. Create an Atom document to represent the community activity. You can specify the community in the following ways:

    • To create a community activity that inherits its membership from the community to which it belongs and cannot be changed, specify the following category type:

         label="Community Activity"/>

    • To create a community activity for which you can later define the membership by adding a subset of community members to it, specify the following category type:

         label="Explicit Membership Community Activity"/>

  3. Send the Atom document using a POST request to the following URI:

      Table 1. Atom API request details
      Method Resource URI Input representation
      POST Communities remote applications feed From the entry in the Communities remote application feed that contains the <category term="Activities" scheme="" /> element, find the value of the href attribute in the <link> element that has the rel="" attribute. Atom document that contains a category element (see options above)


Provide an Atom document that contains a category element that represents the community activity.

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



Returned HTTP headers

HTTP/1.1 201 Created

Location: url

Error codes

After creating a community activity with a category of type of explicit_membership_community_activity, you can define the members of the community activity. See Create a member for more details.

Parent topic

Work with remote applications

Related concepts
Work with activities programmatically

Related reference
Activity content
Retrieve a remote applications list
Add an activity member programmatically