Moving message threads to different group using the Yammer API image 84

Moving message threads to different group using the Yammer API

At AMIS we are quite happy users of Microsoft Yammer. Days with 10 or more messages are no exception and since December 2009, we have assembled quite a history of over 8000 message threads. Because we have joined the Conclusion eco system and we will now share a Yammer Network at that level – built with our existing network at its core – , all our All Company messages would become ecosystem wide All Company messages. It seems like a better idea to create a new group AMIS-AllCompany that is intended for AMIS staff only, that will coexist next to (Conclusion) All Company. Ideally, all our existing messages are moved from group AllCompany to this new group AMIS-AllCompany.

I have been experimenting with the Yammer REST APIs over the last few days. They are documented here: . However, there is no API for moving messages. Several community conversations were conducted around that topic: where is the REST API for moving messages? See for example:

There is no officially documented API for moving messages. However, the Yammer web client supports the operation.


By inspecting the the network calls made from the web client, I could easily work out that there is a Yammer API call for moving messages.


The id at the end of the URL is the thread id, the group_id parameter is the id of the destination group.

The corresponding Postman request looks like this:


and the code in for example Node.JS:

var request = require("request");

var options = { method: 'PUT',
  url: '',
     Authorization: 'Bearer XXXX',
     'Content-Type': 'application/x-www-form-urlencoded' },
   { isMoveThreadToGroup: 'true',
     group_id: '17438976',
     undefined: undefined } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);


The message threads keep streaming in, in the destination folder. And are leaving the All Company folder at the same time.