You can use this API request to make a user stop following a specific space.
/services/v2/space/[spaceId]/unfollow.json
You can use the following parameters in your make a user unfollow a space request:
Specific: follower
Other options: wrap
Permissions & Notes:
You must have the Edit users and groups permission under Site Administration Roles in the Advanced Editor.
The follower parameter specifies the User that will unfollow the node.
- The follower parameter, will be the follower's userId.
If you do not use the follower parameter, the user whose credentials you included in the request, unfollows the space.
You should add the follower parameter to the query string as ?follower=[userId]
We added this request in version 1.6.3.
Sample Request
A PUT make a user unfollow a space request to make the API authenticated user (userid:31) unfollow a space (spaceId: 11) sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/answerhub) would look like this:
curl
-u answerhub:test123
-H "Accept: application/json"
-H "Content-type: application/json"
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/space/11/unfollow.json?follower=31" -v
Expected Response
Successful Response:
- HTTP Status 200 - OK