IBM Connections 4 API: How to Reply to a Stand-Alone Forum Using jQuery Ajax


To post a reply to a topic in a stand-alone forum, send an Atom entry document containing the forum reply to the forum replies resource. Here's one easy way to do it with an asynchronous HTTP (Ajax) request using jQuery.

IBM Connections 4 documentation link: Reply to a topic

Atom API Request Details


Content-Type : application/atom+xml




Status Code: 201 Created

Example Request

<entry xmlns:thr="" xmlns="">
    <title type="text">Reply</title>
    <content type="text">Test reply</content>
    <category scheme="" term="forum-reply"></category>

In line 7,8 must be used the same id as the one used on the URL {topic-id}

Example using jQuery

var strData = '<entry xmlns:thr="" xmlns="">';
strData += '<title type="text">Replay</title>';
strData += '<content type="text">Test reply 1</content>';
strData += '<category scheme="" term="forum-reply"></category>';
strData += '<thr:in-reply-to';
strData += ' xmlns:thr=""';
strData += ' ref=""';
strData += ' href="">';
strData += '</thr:in-reply-to></entry>';

    url : "",
    type : "POST",
    contentType: "application/atom+xml; charset=UTF-8",
    async : true,
    data: strData,
    statusCode : {
        201 : function() {
            console.log('reply posted');
    error: function(jqXHR, textStatus, errorThrown) {
        console.log(jqXHR + " - " + textStatus + ' - ' + errorThrown);

Note:  console.log can throw errors in IE, they are there for illustrative purposes only and should be changed as required.

About the author

Enterprise Web Developer
Joaquin is an Enterprise Web Developer at Base22 with over seven years of experience designing and developing web solutions for enterprise clients. He is a well rounded web developer with skills building interfaces in IBM WebSphere Portal and WCM, IBM Connections, and many others. He is an Oracle Certified Java Developer and a Microsoft Certified Visual Studio Developer. He blogs at