Connection Feed - Design and API Reference
Overview
The Connection Feed enables users to see posts exclusively from users they are connected to within a community. Unlike the universal or group feed, the connection feed is personalized based on mutual (two-way) or one-way user relationships.
This feature complements LikeMinds' Personalized Feed by adding a social graph layer where only posts from direct connections appear, supporting both notification-based engagement and curated content delivery.
User Connect Flow
Users Send Connection Requests
- Initiated from profile or post overflow menu.
- User A sends request to User B.
- B must accept to complete a mutual connection.
- Optional: Support one-way follows.
Accepted Connections Form Feed Graph
- Only accepted connections populate the user's connection feed.
- A user’s feed is constructed from the posts created by their connections.
Feed Update Strategy
On new post creation, the system identifies all users who are connected to the post creator.
- It then updates each of their feed buffers to include the new post, ensuring it appears in their connection feed.
- If a user’s connection list isn’t already cached, it is refreshed automatically before the feed is updated.
- Posts in the connection feed are shown in reverse chronological order based on their creation time.
On API call: Posts are fetched, filtered by authorization and freshness.
Cache Optimization
- Connection lists and feed buffers are cached.
- Time To Live applied for performance.
- Background jobs warm and update cache.
API Reference
Base URL : https://auth.likeminds.community
All the routes for the api calls will be joined to this url to complete the url path.
Prerequisites
x-api-key
: API key - Retrieve from LikeMinds Dashboard for the Projectx-member-id
: UUID - Unique string representing the userx-platform-type
: SDK platform type - dashboard or internal services.x-platform-code
: SDK platform code - Eg. an(Android), ios(iOS), fl(Flutter) etc.x-version-code
: SDK version code - Integer value representing the SDK versionx-sdk-source
: SDK Source - chat | feed
Initiating the SDK
Before executing any api flow the sdk needs to be initiated, which provides the access_token
for authorization in the response.
POST sdk/initiate
: SDK Initiate
The access_token
generated here will be used in the Authorization
field for the subsequent api calls.
Community Settings
Before using the Connection Feed feature, ensure that User Connections are enabled for the community.
This is managed using CommunitySettings
, which controls feature toggles at the community level.
- Setting:
setting_type
:"user_connection"
enabled
:true
If this is not set, all connection-related APIs (e.g., sending requests, fetching connection list) will return an error:
{
"success": false,
"error_message": "Enable User Connection Setting to use this api"
}
Endpoint
Headers
Authorization
x-platform-type
Request Body
{
"community_settings": [
{
"enabled": true,
"setting_title": "User Connection",
"setting_sub_title": "If enabled, the users will be able to send connection request to other members",
"setting_type": "user_connection"
}
]
}
Example cURL
curl --request PUT \
--url https://auth.likeminds.community/community/settings \
--header 'Accept: application/json' \
--header 'Authorization: <your-auth-token>' \
--header 'Content-Type: application/json' \
--header 'x-platform-type: <platform-type>' \
--data '{
"community_settings": [
{
"enabled": true,
"setting_title": "User Connection",
"setting_sub_title": "If enabled, the users will be able to send connection request to other members",
"setting_type": "user_connection"
}
]
}'
Replace
<your-auth-token>
with youraccess_token
.
1. Create a Connection Request
POST /community/member/<member_uuid>/connection
Headers
Authorization
x-platform-code
x-version-code
Body
{
"connection_type": "two_way" | "one_way",
"connection_request_auto_accepted": false
}
Response
{
"success": true,
"error_message": null
}
2. Accept / Reject / Disconnect Connection
PATCH /community/member/<member_uuid>/connection
Headers
Authorization
x-platform-code
x-version-code
Body
{
"action": "accept" | "reject",
"connection_type": "two_way" | "one_way"
}
- Accept: Creates two
Connection
records. - Reject: Deletes pending
ConnectionRequest
or existingConnection
.
3. Get User’s Connection List
GET /community/member/<member_uuid>/connection
Headers
Authorization
x-platform-code
x-version-code
Query Params
page=1
page_size=10
status=accepted|pending
Response
{
"success": true,
"data": {
"connections": [{ "user1_uuid": "...", "user2_uuid": "...", ... }],
"users": { "user_id": { "name": "...", "image_url": "...", ... } }
}
}
4. Get Connection Feed
GET /feed/connection
Headers
Authorization
x-platform-code
x-version-code
Query Params
page=1
page_size=10
Response
{
"success": true,
"data": {
"feed": [
{
"_id": "post_id",
"text": "Post content",
"attachments": [],
"likes_count": 5,
"comments_count": 2,
"user_id": "creator_id",
"created_at": 1720450620000
}
],
"users": {
"creator_id": {
"name": "John Doe",
"image_url": "https://...",
...
}
}
}
}
Internal Architecture
Schemas
ConnectionRequest
request_by
,request_to
,community_id
,created_at
,updated_at
Connection
user_id
,connection_id
,community_id
,created_at
ConnectionFeed
post_id
,user_id
,community_id
,rank
Cache Keys
connection_list_<user_uuid>_<community_id>
{ "<connection_uuid>": true }
connection_feed_buffer_<user_uuid>_<community_id>
{ "<post_id>": true }
Permissions & Rules
- If connection feature is disabled via
CommunitySettings
, all APIs return error. - Users cannot connect with themselves.
- Posts visible in the connection feed must be:
- Created by a connection.
- Shared with connections (not restricted).
Blocking Users
1. Block or Unblock a User
PUT /user/<uuid>/block
This API is used to block or unblock another user.
Headers
Authorization
x-platform-code
x-version-code
Request Body
{
"uuid": "string", // UUID of the user to be blocked/unblocked
"shouldBlock": true // true to block, false to unblock
}
Response
{
"success": true,
"error_message": null
}
2. Get Blocked User List
GET /user/<uuid>/block
Retrieves the list of users blocked by the requesting user.
Headers
Authorization
x-platform-code
x-version-code
Query Params
page=1
pageSize=10
Response
{
"success": true,
"data": {
"blockedUsers": [
{
"uuid": "user-uuid",
"name": "User Name",
"imageUrl": "https://..."
}
]
}
}
Profile Behavior
- If viewing your own profile, use this API to manage blocked users.
- If viewing another user’s profile:
- If not blocked: show “Block User” option.
- If blocked: show “Unblock User” option.
Future Scope
- One-way follows.
- Ranking in connection feed (currently sorted by
created_at
in reverse cronological order). - Metrics-based personalization layer (engagement score, affinity, etc).
Usage in LLM-based Code Generation
Client apps or agents consuming this document can:
- Generate requests to connect users.
- Fetch and display connection-only feeds.
Make sure to:
- Always check the
enabled
flag via CommunitySettings before calling APIs.