Many times, we would want to track virality or post comments for a particular action, listing some of them below:
- When we have sent out an announcement and we want to track the virality of the announcement daily through API, meaning how many people have liked/commented on the post and what are the comments.
- When someone has given a Kudos and we want to programmatically comment on the post.
All these can be achieved by the content query and content creation APIs that Kaizala provides. We are going to discuss about them below.
Content Query APIs for monitoring reactions
Below is the API for getting the likes and comments summary for an action instance sent to a group:
However, instead of a summary, we might need to dig deeper to understand who liked our posts or commented on our post. Below are the REST APIs for the same.
For drilling down on likes on a post:
For drilling down on comments on a post:
Content Creation APIs for posting reactions
Sometimes, there might be a need to post a comment on a particular post programmatically. For achieving this, Kaizala provides a POST API as described below:
In all the API definitions above, elements in curly / squiggly brackets need to be replaced as follows:
- endpoint-url is present in the response to generate accessToken call.
- Test-group-id is the id of the Group on which you want to send the reminder.
- reference-id is the id of the action (survey / poll / custom action, etc.) that you have sent. While sending an action, you get an actionId and referenceId (screenshot shows the one to pick)
- access-token is required for authentication. If you are not familiar, please refer Getting started with Kaizala APIs.
Thank you for reading, hope it was helpful. If you have any comments / feedback, please let us know by commenting on this post. If you have any new REST API requirement, please reach out to firstname.lastname@example.org with your scenario.