Overview
The Interactions API handles user engagement with posts including likes, view tracking, and content organization through keywords and categories.View Tracking
Increment View Count
Track a post view with optional user and IP tracking.Parameters
ID of the post being viewed
ID of the viewing user (optional, for logged-in users)
IP address of the viewer (used for duplicate detection)
Response
Returnstrue if view was counted, false if it failed.
The backend implements duplicate detection to prevent inflated view counts from the same user/IP within a time window.
Like Management
Add Like
Add a like to a post from a specific user.Parameters
ID of the post to like
ID of the user liking the post
Response
Returnstrue if like was added successfully.
Users can only like a post once. Subsequent calls with the same userId will return success but won’t increment the counter.
Remove Like
Remove a like from a post.Parameters
ID of the post to unlike
ID of the user removing their like
Response
Returnstrue if like was removed successfully.
Keyword Management
Keywords are tags that help organize and discover content. They can be managed independently or attached to posts.Get Post Keywords
Retrieve all keywords associated with a post.Parameters
ID of the post
Response
Add Existing Keywords
Attach existing keywords to a post by their IDs.Parameters
ID of the post
Array of keyword IDs to attach
Create and Add New Keywords
Create new keywords and attach them to a post in one operation.Parameters
ID of the post
Array of keyword strings to create and attach
If a keyword already exists in the system, it will be reused instead of creating a duplicate.
Remove Keywords
Remove keywords from a post.Parameters
ID of the post
Array of keyword IDs to remove. If omitted, removes all keywords.
Find or Create Keyword
Find an existing keyword by name or create it if it doesn’t exist.Parameters
Keyword string to find or create
Response
Get Most Used Keywords
Retrieve the most frequently used keywords across all posts.Parameters
Number of keywords to return (max 200)
Response
Category Management
Add Categories to Post
Attach one or more categories to a post.Parameters
ID of the post
Array of category IDs to attach
Posts can have multiple categories. For the primary category, use the
categoryId field when creating/updating the post.Complete Example: Interactive Post
Here’s a complete example showing how to build an interactive post experience:Best Practices
View Tracking
View Tracking
- Always track views on the client-side when post loads
- Include userId for logged-in users to prevent duplicate counting
- Include ipAddress for anonymous users to reduce bot inflation
- Don’t track views for preview/draft modes
Like System
Like System
- Check like state on page load to show correct UI
- Implement optimistic UI updates for better UX
- Handle errors gracefully (network failures)
- Consider debouncing rapid like/unlike actions
Keyword Strategy
Keyword Strategy
- Use 3-7 keywords per post for optimal discoverability
- Choose specific keywords over broad ones (“react-hooks” vs “javascript”)
- Review most-used keywords monthly to identify trending topics
- Implement keyword autocomplete using
getKeywordsMasUsadas()
Category Usage
Category Usage
- Assign 1-3 categories per post
- Use
categoryIdfor the primary category - Use
addCategoriasToPost()for additional categories - Keep category structure shallow (2-3 levels max)