Appearance
Feeds
About 24160 wordsAbout 81 min
Typescript SDK - Feeds API
Table of Contents
- addActivity
- upsertActivities
- updateActivitiesPartialBatch
- deleteActivities
- trackActivityMetrics
- queryActivities
- addBookmark
- updateBookmark
- deleteBookmark
- activityFeedback
- castPollVote
- deletePollVote
- addActivityReaction
- queryActivityReactions
- deleteActivityReaction
- getActivity
- updateActivity
- updateActivityPartial
- deleteActivity
- restoreActivity
- queryBookmarkFolders
- updateBookmarkFolder
- deleteBookmarkFolder
- queryBookmarks
- readCollections
- createCollections
- upsertCollections
- updateCollections
- deleteCollections
- queryCollections
- getComments
- addComment
- addCommentsBatch
- queryComments
- addCommentBookmark
- updateCommentBookmark
- deleteCommentBookmark
- getComment
- updateComment
- deleteComment
- updateCommentPartial
- addCommentReaction
- queryCommentReactions
- deleteCommentReaction
- getCommentReplies
- restoreComment
- listFeedGroups
- createFeedGroup
- getOrCreateFeed
- updateFeed
- deleteFeed
- markActivity
- pinActivity
- unpinActivity
- updateFeedMembers
- acceptFeedMemberInvite
- queryFeedMembers
- rejectFeedMemberInvite
- queryPinnedActivities
- getFollowSuggestions
- restoreFeedGroup
- getFeedGroup
- getOrCreateFeedGroup
- updateFeedGroup
- deleteFeedGroup
- listFeedViews
- createFeedView
- getFeedView
- getOrCreateFeedView
- updateFeedView
- deleteFeedView
- listFeedVisibilities
- getFeedVisibility
- updateFeedVisibility
- createFeedsBatch
- deleteFeedsBatch
- ownBatch
- queryFeeds
- getFeedsRateLimits
- follow
- updateFollow
- acceptFollow
- followBatch
- getOrCreateFollows
- queryFollows
- rejectFollow
- unfollow
- createMembershipLevel
- queryMembershipLevels
- updateMembershipLevel
- deleteMembershipLevel
- queryFeedsUsageStats
- unfollowBatch
- getOrCreateUnfollows
- deleteFeedUserData
- exportFeedUserData
- Types Reference
addActivity
Add a single activity to a feed, allowing users to share updates or events. Use this when you want to introduce new content to a feed.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add a single activity
const response = await client.feeds.addActivity({
feeds: ['user:john', 'timeline:global'],
type: 'like',
user_id: 'john',
id: 'activity-123',
});
console.log(response);Example: with text and skip_push
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add a single activity
const response = await client.feeds.addActivity({
feeds: ['user:john', 'timeline:global'],
type: 'like',
text: 'Hello, world!',
skip_push: false,
});
console.log(response);Example: with visibility and enrich_own_fields
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add a single activity
const response = await client.feeds.addActivity({
feeds: ['user:john', 'timeline:global'],
type: 'like',
visibility: 'public',
enrich_own_fields: false,
});
console.log(response);Example: with expires_at and filter_tags
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add a single activity
const response = await client.feeds.addActivity({
feeds: ['user:john', 'timeline:global'],
type: 'like',
expires_at: 'value',
filter_tags: ['tag1', 'tag2'],
});
console.log(response);Response: AddActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feeds | []string | Yes | List of feeds to add the activity to with a default max limit of 25 feeds |
| type | string | Yes | Type of activity |
| attachments | []Attachment | No | List of attachments for the activity |
| collection_refs | []string | No | Collections that this activity references |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | boolean | No | Whether to create notification activities for mentioned users |
| custom | Record<string, any> | No | Custom data for the activity |
| enrich_own_fields | boolean | No | - |
| expires_at | string | No | Expiration time for the activity |
| filter_tags | []string | No | Tags for filtering activities |
| force_moderation | boolean | No | - |
| id | string | No | Optional ID for the activity |
| interest_tags | []string | No | Tags for indicating user interests |
| location | Location | No | Geographic location related to the activity |
| mentioned_user_ids | []string | No | List of users mentioned in the activity |
| parent_id | string | No | ID of parent activity for replies/comments |
| poll_id | string | No | ID of a poll to attach to activity |
| restrict_replies | string | No | Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody |
| search_data | Record<string, any> | No | Additional data for search indexing |
| skip_enrich_url | boolean | No | Whether to skip URL enrichment for the activity |
| skip_push | boolean | No | Whether to skip push notifications |
| text | string | No | Text content of the activity |
| user_id | string | No | ID of the user creating the activity |
| visibility | string | No | Visibility setting for the activity. One of: public, private, tag |
| visibility_tag | string | No | If visibility is 'tag', this is the tag name and is required |
upsertActivities
Add or update multiple activities in a batch, optimizing feed management by ensuring activities are current and efficiently handled. Use this for bulk operations where activities might need to be created or modified.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert multiple activities
const response = await client.feeds.upsertActivities({
activities: [],
enrich_own_fields: false,
force_moderation: false,
});
console.log(response);Response: UpsertActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activities | []ActivityRequest | Yes | List of activities to create or update |
| enrich_own_fields | boolean | No | If true, enriches the activities' current_feed with own_* fields (own_follows, own_followings, ow... |
| force_moderation | boolean | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
updateActivitiesPartialBatch
Use this method to update specific fields of multiple activities in bulk without overwriting the entire activity data, ideal for making incremental changes efficiently.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Batch partial activity update
const response = await client.feeds.updateActivitiesPartialBatch({
changes: [],
force_moderation: false,
});
console.log(response);Response: UpdateActivitiesPartialBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| changes | []UpdateActivityPartialChangeRequest | Yes | List of activity changes to apply. Each change specifies an activity ID and the fields to set/unset |
| force_moderation | boolean | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
deleteActivities
Remove multiple activities from a feed to keep it relevant and tidy. Use this when you need to clear outdated or unwanted content from a feed.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Remove multiple activities
const response = await client.feeds.deleteActivities({
ids: ['activity-1', 'activity-2'],
user_id: 'john',
hard_delete: false,
});
console.log(response);Example: with user and delete_notification_activity
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Remove multiple activities
const response = await client.feeds.deleteActivities({
ids: ['activity-1', 'activity-2'],
user: { id: 'activity-123', custom: {} },
delete_notification_activity: false,
});
console.log(response);Response: DeleteActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ids | []string | Yes | List of activity IDs to delete |
| delete_notification_activity | boolean | No | Whether to also delete any notification activities created from mentions in these activities |
| hard_delete | boolean | No | Whether to permanently delete the activities |
| user | UserRequest | No | - |
| user_id | string | No | - |
trackActivityMetrics
Monitors and records user interactions with activities, providing insights into user engagement and behavior. Use this to analyze activity trends and optimize content strategy.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Track activity metrics
const response = await client.feeds.trackActivityMetrics({
events: [],
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: TrackActivityMetricsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| events | []TrackActivityMetricsEvent | Yes | List of metric events to track (max 100 per request) |
| user | UserRequest | No | - |
| user_id | string | No | - |
queryActivities
Retrieve a list of activities based on specific criteria, enabling users to access relevant content quickly. Use this to filter and display activities that match certain conditions.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query activities
const response = await client.feeds.queryActivities({
user_id: 'john',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and include_soft_deleted_activities
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query activities
const response = await client.feeds.queryActivities({
sort: [],
include_soft_deleted_activities: false,
});
console.log(response);Example: with enrich_own_fields and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query activities
const response = await client.feeds.queryActivities({
enrich_own_fields: false,
next: null,
});
console.log(response);Example: with prev and include_expired_activities
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query activities
const response = await client.feeds.queryActivities({
prev: null,
include_expired_activities: false,
});
console.log(response);Response: QueryActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| enrich_own_fields | boolean | No | - |
| filter | Record<string, any> | No | Filters to apply to the query. Supports location-based queries with 'near' and 'within_bounds' op... |
| include_expired_activities | boolean | No | When true, include both expired and non-expired activities in the result. |
| include_private_activities | boolean | No | - |
| include_soft_deleted_activities | boolean | No | When true, include soft-deleted activities in the result. |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
| user | UserRequest | No | - |
| user_id | string | No | - |
addBookmark
Save a specific item or activity for easy retrieval later, enhancing user experience by allowing quick access to important content. Use this to enable users to mark favorites or important items.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add bookmark
const response = await client.feeds.addBookmark({
activity_id: 'activity-123',
user_id: 'john',
folder_id: 'folder-123',
});
console.log(response);Example: with new_folder and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add bookmark
const response = await client.feeds.addBookmark({
activity_id: 'activity-123',
new_folder: { name: 'My Feed', custom: {} },
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add bookmark
const response = await client.feeds.addBookmark({
activity_id: 'activity-123',
custom: {},
});
console.log(response);Response: AddBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | - |
| custom | Record<string, any> | No | Custom data for the bookmark |
| folder_id | string | No | ID of the folder to add the bookmark to |
| new_folder | AddFolderRequest | No | Create a new folder for this bookmark |
| user | UserRequest | No | - |
| user_id | string | No | - |
updateBookmark
Modify the details of an existing bookmark to keep saved content accurate and useful. Use this when there is a need to change the information associated with a bookmark.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update bookmark
const response = await client.feeds.updateBookmark({
activity_id: 'activity-123',
user_id: 'john',
folder_id: 'folder-123',
});
console.log(response);Example: with new_folder and new_folder_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update bookmark
const response = await client.feeds.updateBookmark({
activity_id: 'activity-123',
new_folder: { name: 'My Feed', custom: {} },
new_folder_id: 'value',
});
console.log(response);Example: with user and custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update bookmark
const response = await client.feeds.updateBookmark({
activity_id: 'activity-123',
user: { id: 'activity-123', custom: {} },
custom: {},
});
console.log(response);Response: UpdateBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | - |
| custom | Record<string, any> | No | Custom data for the bookmark |
| folder_id | string | No | ID of the folder containing the bookmark |
| new_folder | AddFolderRequest | No | Create a new folder and move the bookmark into it |
| new_folder_id | string | No | Move the bookmark to this folder (empty string removes the folder) |
| user | UserRequest | No | - |
| user_id | string | No | - |
deleteBookmark
Remove a bookmark from the saved list to declutter a user's stored items. Use this when a bookmarked item is no longer needed or relevant.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a bookmark
const response = await client.feeds.deleteBookmark({
activity_id: 'activity-123',
user_id: 'john',
folder_id: 'folder-123',
});
console.log(response);Response: DeleteBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | - |
| folder_id | string | No | - |
| user_id | string | No | - |
activityFeedback
Submit user feedback on an activity to enhance personalization and content relevance. Use this to gather user preferences and improve content recommendations.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Provide feedback on an activity
const response = await client.feeds.activityFeedback({
activity_id: 'activity-123',
user_id: 'john',
show_less: false,
});
console.log(response);Example: with show_more and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Provide feedback on an activity
const response = await client.feeds.activityFeedback({
activity_id: 'activity-123',
show_more: false,
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with hide
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Provide feedback on an activity
const response = await client.feeds.activityFeedback({
activity_id: 'activity-123',
hide: false,
});
console.log(response);Response: ActivityFeedbackResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | - |
| hide | boolean | No | Whether to hide this activity |
| show_less | boolean | No | Whether to show less content like this |
| show_more | boolean | No | Whether to show more content like this |
| user | UserRequest | No | - |
| user_id | string | No | - |
castPollVote
Register a user’s vote in a poll, contributing to collective decision-making or opinion-sharing. Use this to capture user opinions in polls.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Cast vote
const response = await client.feeds.castPollVote({
activity_id: 'activity-123',
poll_id: 'poll-123',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with vote
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Cast vote
const response = await client.feeds.castPollVote({
activity_id: 'activity-123',
poll_id: 'poll-123',
vote: { answer_text: 'value' },
});
console.log(response);Response: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | - |
| poll_id | string | Yes | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
| vote | VoteData | No | Vote data |
deletePollVote
Remove a user's vote from a poll, allowing for changes in decision or corrections. Use this when a user needs to retract or alter their vote in a poll.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete vote
const response = await client.feeds.deletePollVote({
activity_id: 'activity-123',
poll_id: 'poll-123',
vote_id: 'vote-123',
user_id: 'john',
});
console.log(response);Response: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | - |
| poll_id | string | Yes | - |
| vote_id | string | Yes | - |
| user_id | string | No | - |
addActivityReaction
Add a reaction to a specified activity to engage users and track interactions. Use this method to express preferences or sentiments towards an activity.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add reaction
const response = await client.feeds.addActivityReaction({
activity_id: 'activity-123',
type: 'like',
user_id: 'john',
skip_push: false,
});
console.log(response);Example: with custom and enforce_unique
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add reaction
const response = await client.feeds.addActivityReaction({
activity_id: 'activity-123',
type: 'like',
custom: {},
enforce_unique: true,
});
console.log(response);Example: with copy_custom_to_notification and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add reaction
const response = await client.feeds.addActivityReaction({
activity_id: 'activity-123',
type: 'like',
copy_custom_to_notification: false,
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with create_notification_activity
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add reaction
const response = await client.feeds.addActivityReaction({
activity_id: 'activity-123',
type: 'like',
create_notification_activity: false,
});
console.log(response);Response: AddReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | - |
| type | string | Yes | Type of reaction |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | boolean | No | Whether to create a notification activity for this reaction |
| custom | Record<string, any> | No | Custom data for the reaction |
| enforce_unique | boolean | No | Whether to enforce unique reactions per user (remove other reaction types from the user when addi... |
| skip_push | boolean | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
queryActivityReactions
Retrieve a list of reactions associated with a specific activity to analyze user engagement and response patterns. Use this to gain insights into activity interactions.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query activity reactions
const response = await client.feeds.queryActivityReactions({
activity_id: 'activity-123',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query activity reactions
const response = await client.feeds.queryActivityReactions({
activity_id: 'activity-123',
sort: [],
prev: null,
});
console.log(response);Example: with next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query activity reactions
const response = await client.feeds.queryActivityReactions({
activity_id: 'activity-123',
next: null,
});
console.log(response);Response: QueryActivityReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | - |
| filter | Record<string, any> | No | - |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | - |
deleteActivityReaction
Remove a reaction from an activity to update user feedback or correct erroneous inputs. Use this when a reaction needs to be retracted or modified.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Remove reaction
const response = await client.feeds.deleteActivityReaction({
activity_id: 'activity-123',
type: 'like',
user_id: 'john',
delete_notification_activity: false,
});
console.log(response);Response: DeleteActivityReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | - |
| type | string | Yes | - |
| delete_notification_activity | boolean | No | - |
| user_id | string | No | - |
getActivity
Fetch details of a specific activity to view or display the current state and content. Use this to retrieve complete information about an activity for further processing or display.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get activity
const response = await client.feeds.getActivity({
id: 'activity-123',
user_id: 'john',
comment_limit: 10,
});
console.log(response);Example: with comment_sort
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get activity
const response = await client.feeds.getActivity({
id: 'activity-123',
comment_sort: 'value',
});
console.log(response);Response: GetActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| comment_sort | string | No | - |
| comment_limit | number | No | - |
| user_id | string | No | - |
updateActivity
Replace all information of a specific activity to reflect new content or corrections. Use this when a full update of the activity's data is necessary.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Full activity update
const response = await client.feeds.updateActivity({
id: 'activity-123',
user_id: 'john',
text: 'Hello, world!',
});
console.log(response);Example: with feeds and visibility
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Full activity update
const response = await client.feeds.updateActivity({
id: 'activity-123',
feeds: ['user:john', 'timeline:global'],
visibility: 'public',
});
console.log(response);Example: with enrich_own_fields and expires_at
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Full activity update
const response = await client.feeds.updateActivity({
id: 'activity-123',
enrich_own_fields: false,
expires_at: 10,
});
console.log(response);Example: with attachments and filter_tags
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Full activity update
const response = await client.feeds.updateActivity({
id: 'activity-123',
attachments: [],
filter_tags: ['tag1', 'tag2'],
});
console.log(response);Response: UpdateActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| attachments | []Attachment | No | List of attachments for the activity |
| collection_refs | []string | No | Collections that this activity references |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when handle_mention_notifi... |
| custom | Record<string, any> | No | Custom data for the activity |
| enrich_own_fields | boolean | No | If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own... |
| expires_at | float | No | Time when the activity will expire |
| feeds | []string | No | List of feeds the activity is present in |
| filter_tags | []string | No | Tags used for filtering the activity |
| force_moderation | boolean | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| handle_mention_notifications | boolean | No | If true, creates notification activities for newly mentioned users and deletes notifications for ... |
| interest_tags | []string | No | Tags indicating interest categories |
| location | Location | No | Geographic location for the activity |
| mentioned_user_ids | []string | No | List of user IDs mentioned in the activity |
| poll_id | string | No | Poll ID |
| restrict_replies | string | No | Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody |
| run_activity_processors | boolean | No | If true, runs activity processors on the updated activity. Processors will only run if the activi... |
| search_data | Record<string, any> | No | Additional data for search indexing |
| skip_enrich_url | boolean | No | Whether to skip URL enrichment for the activity |
| text | string | No | The text content of the activity |
| user | UserRequest | No | - |
| user_id | string | No | - |
| visibility | string | No | Visibility setting for the activity |
| visibility_tag | string | No | If visibility is 'tag', this is the tag name and is required |
updateActivityPartial
Modify selected fields of an activity to make incremental changes without altering the entire activity. Use this for efficient updates when only specific attributes need adjustment.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partial activity update
const response = await client.feeds.updateActivityPartial({
id: 'activity-123',
user_id: 'john',
enrich_own_fields: false,
});
console.log(response);Example: with force_moderation and handle_mention_notifications
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partial activity update
const response = await client.feeds.updateActivityPartial({
id: 'activity-123',
force_moderation: false,
handle_mention_notifications: false,
});
console.log(response);Example: with run_activity_processors and set
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partial activity update
const response = await client.feeds.updateActivityPartial({
id: 'activity-123',
run_activity_processors: false,
set: {},
});
console.log(response);Example: with unset and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partial activity update
const response = await client.feeds.updateActivityPartial({
id: 'activity-123',
unset: [],
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: UpdateActivityPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when handle_mention_notifi... |
| enrich_own_fields | boolean | No | If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own... |
| force_moderation | boolean | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| handle_mention_notifications | boolean | No | If true, creates notification activities for newly mentioned users and deletes notifications for ... |
| run_activity_processors | boolean | No | If true, runs activity processors on the updated activity. Processors will only run if the activi... |
| set | Record<string, any> | No | Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility'... |
| unset | []string | No | List of field names to remove. Supported fields: 'custom', 'visibility_tag', 'location', 'expires... |
| user | UserRequest | No | - |
| user_id | string | No | - |
deleteActivity
Remove a specific activity from the feed to maintain relevance or manage content lifecycle. Use this when an activity is no longer needed or should not be displayed.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a single activity
const response = await client.feeds.deleteActivity({
id: 'activity-123',
hard_delete: false,
delete_notification_activity: false,
});
console.log(response);Response: DeleteActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| hard_delete | boolean | No | - |
| delete_notification_activity | boolean | No | - |
restoreActivity
Restore a previously soft-deleted activity to make it active again, useful for recovering activities that were unintentionally removed or need to be reinstated.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Restore a soft-deleted activity
const response = await client.feeds.restoreActivity({
id: 'activity-123',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with enrich_own_fields
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Restore a soft-deleted activity
const response = await client.feeds.restoreActivity({
id: 'activity-123',
enrich_own_fields: false,
});
console.log(response);Response: RestoreActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| enrich_own_fields | boolean | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
queryBookmarkFolders
Retrieve a list of bookmark folders to organize and access saved activities quickly. Use this to manage user bookmarks and improve content retrieval efficiency.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query bookmark folders
const response = await client.feeds.queryBookmarkFolders({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query bookmark folders
const response = await client.feeds.queryBookmarkFolders({
prev: null,
next: null,
});
console.log(response);Response: QueryBookmarkFoldersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | Filters to apply to the query |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
updateBookmarkFolder
Modify the details of a bookmark folder to reorganize or rename it for better management. Use this when you need to update folder attributes for improved user experience.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a bookmark folder
const response = await client.feeds.updateBookmarkFolder({
folder_id: 'folder-123',
user_id: 'john',
name: 'My Feed',
});
console.log(response);Example: with user and custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a bookmark folder
const response = await client.feeds.updateBookmarkFolder({
folder_id: 'folder-123',
user: { id: 'activity-123', custom: {} },
custom: {},
});
console.log(response);Response: UpdateBookmarkFolderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| folder_id | string | Yes | - |
| custom | Record<string, any> | No | Custom data for the folder |
| name | string | No | Name of the folder |
| user | UserRequest | No | - |
| user_id | string | No | - |
deleteBookmarkFolder
Remove a bookmark folder to declutter or reorganize saved content. Use this when a folder is no longer needed or should be consolidated with others.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a bookmark folder
const response = await client.feeds.deleteBookmarkFolder({
folder_id: 'folder-123',
});
console.log(response);Response: DeleteBookmarkFolderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| folder_id | string | Yes | - |
queryBookmarks
Retrieve a list of bookmarks based on specified criteria, useful for accessing saved or frequently accessed items quickly.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query bookmarks
const response = await client.feeds.queryBookmarks({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with next and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query bookmarks
const response = await client.feeds.queryBookmarks({
next: null,
prev: null,
});
console.log(response);Example: with enrich_own_fields
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query bookmarks
const response = await client.feeds.queryBookmarks({
enrich_own_fields: false,
});
console.log(response);Response: QueryBookmarksResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| enrich_own_fields | boolean | No | - |
| filter | Record<string, any> | No | Filters to apply to the query |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
readCollections
Fetch details of existing collections, enabling users to view and manage grouped data easily.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Read collections
const response = await client.feeds.readCollections({
user_id: 'john',
collection_refs: ['food:pizza-123'],
});
console.log(response);Response: ReadCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collection_refs | []string | No | - |
| user_id | string | No | - |
createCollections
Create new collections in bulk, ideal for organizing large sets of data into manageable groups at once.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create multiple collections
const response = await client.feeds.createCollections({
collections: [],
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: CreateCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collections | []CollectionRequest | Yes | List of collections to create |
| user | UserRequest | No | - |
| user_id | string | No | - |
upsertCollections
Insert new collections or update existing ones in a single operation, ensuring your data is current without multiple requests.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert multiple collections
const response = await client.feeds.upsertCollections({
collections: [],
});
console.log(response);Response: UpsertCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collections | []CollectionRequest | Yes | List of collections to upsert (insert if new, update if existing) |
updateCollections
Modify existing collections by changing their attributes, facilitating the maintenance and customization of grouped data.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update multiple collections
const response = await client.feeds.updateCollections({
collections: [],
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: UpdateCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collections | []UpdateCollectionRequest | Yes | List of collections to update (only custom data is updatable) |
| user | UserRequest | No | - |
| user_id | string | No | - |
deleteCollections
Remove multiple collections at once, useful for cleaning up and organizing data by eliminating unneeded sets.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete multiple collections
const response = await client.feeds.deleteCollections({
collection_refs: ['food:pizza-123'],
});
console.log(response);Response: DeleteCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collection_refs | []string | Yes | - |
queryCollections
Retrieves data from specified collections, allowing you to access and filter stored information efficiently. Use this when you need to extract specific data from your collections for analysis or display.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query collections
const response = await client.feeds.queryCollections({
user_id: 'john',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query collections
const response = await client.feeds.queryCollections({
sort: [],
next: null,
});
console.log(response);Example: with user and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query collections
const response = await client.feeds.queryCollections({
user: { id: 'activity-123', custom: {} },
prev: null,
});
console.log(response);Response: QueryCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | Filters to apply to the query |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
| user | UserRequest | No | - |
| user_id | string | No | - |
getComments
Retrieve comments related to a specific object, providing insights and feedback from users or collaborators.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get comments for an object
const response = await client.feeds.getComments({
object_id: 'activity-123',
object_type: 'activity',
user_id: 'john',
limit: 25,
});
console.log(response);Example: with sort and id_around
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get comments for an object
const response = await client.feeds.getComments({
object_id: 'activity-123',
object_type: 'activity',
sort: [{ field: "created_at", direction: -1 }],
id_around: 'value',
});
console.log(response);Example: with depth and replies_limit
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get comments for an object
const response = await client.feeds.getComments({
object_id: 'activity-123',
object_type: 'activity',
depth: 2,
replies_limit: 10,
});
console.log(response);Example: with prev and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get comments for an object
const response = await client.feeds.getComments({
object_id: 'activity-123',
object_type: 'activity',
prev: null,
next: null,
});
console.log(response);Response: GetCommentsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| object_id | string | Yes | - |
| object_type | string | Yes | - |
| depth | number | No | - |
| sort | string | No | - |
| replies_limit | number | No | - |
| id_around | string | No | - |
| user_id | string | No | - |
| limit | number | No | - |
| prev | string | No | - |
| next | string | No | - |
addComment
Post a new comment or reply to an existing one, fostering interaction and discussion around a particular object.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add a comment or reply
const response = await client.feeds.addComment({
user_id: 'john',
id: 'activity-123',
skip_push: false,
});
console.log(response);Example: with create_notification_activity and custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add a comment or reply
const response = await client.feeds.addComment({
create_notification_activity: false,
custom: {},
});
console.log(response);Example: with force_moderation and attachments
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add a comment or reply
const response = await client.feeds.addComment({
force_moderation: false,
attachments: [],
});
console.log(response);Example: with mentioned_user_ids and object_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add a comment or reply
const response = await client.feeds.addComment({
mentioned_user_ids: ['user-1', 'user-2'],
object_id: 'activity-123',
});
console.log(response);Response: AddCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| attachments | []Attachment | No | Media attachments for the reply |
| comment | string | No | Text content of the comment |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | boolean | No | Whether to create a notification activity for this comment |
| custom | Record<string, any> | No | Custom data for the comment |
| force_moderation | boolean | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| id | string | No | Optional custom ID for the comment (max 255 characters). If not provided, a UUID will be generated. |
| mentioned_user_ids | []string | No | List of users mentioned in the reply |
| object_id | string | No | ID of the object to comment on. Required for root comments |
| object_type | string | No | Type of the object to comment on. Required for root comments |
| parent_id | string | No | ID of parent comment for replies. When provided, object_id and object_type are automatically inhe... |
| skip_enrich_url | boolean | No | Whether to skip URL enrichment for this comment |
| skip_push | boolean | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
addCommentsBatch
Submit multiple comments in a single request, streamlining processes where multiple inputs are needed simultaneously.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add multiple comments in a batch
const response = await client.feeds.addCommentsBatch({
comments: [],
});
console.log(response);Response: AddCommentsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| comments | []AddCommentRequest | Yes | List of comments to add |
queryComments
Search for comments based on defined parameters, allowing users to filter and locate specific discussions efficiently.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query comments
const response = await client.feeds.queryComments({
filter: {},
user_id: 'john',
limit: 25,
});
console.log(response);Example: with sort and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query comments
const response = await client.feeds.queryComments({
filter: {},
sort: [{ field: "created_at", direction: -1 }],
prev: null,
});
console.log(response);Example: with id_around and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query comments
const response = await client.feeds.queryComments({
filter: {},
id_around: 'value',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query comments
const response = await client.feeds.queryComments({
filter: {},
next: null,
});
console.log(response);Response: QueryCommentsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | Yes | Filter to apply to the query |
| id_around | string | No | Returns the comment with the specified ID along with surrounding comments for context |
| limit | number | No | Maximum number of comments to return |
| next | string | No | - |
| prev | string | No | - |
| sort | string | No | Array of sort parameters |
| user | UserRequest | No | - |
| user_id | string | No | - |
addCommentBookmark
Allows users to bookmark a comment for easy future reference. Use this to enable users to save important comments for quick access later.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add comment bookmark
const response = await client.feeds.addCommentBookmark({
comment_id: 'comment-123',
user_id: 'john',
folder_id: 'folder-123',
});
console.log(response);Example: with new_folder and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add comment bookmark
const response = await client.feeds.addCommentBookmark({
comment_id: 'comment-123',
new_folder: { name: 'My Feed', custom: {} },
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add comment bookmark
const response = await client.feeds.addCommentBookmark({
comment_id: 'comment-123',
custom: {},
});
console.log(response);Response: AddCommentBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| comment_id | string | Yes | - |
| custom | Record<string, any> | No | Custom data for the bookmark |
| folder_id | string | No | ID of the folder to add the bookmark to |
| new_folder | AddFolderRequest | No | Create a new folder for this bookmark |
| user | UserRequest | No | - |
| user_id | string | No | - |
updateCommentBookmark
Modifies an existing comment bookmark to reflect changes or updates. Use this to ensure that user bookmarks remain relevant and up-to-date.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update comment bookmark
const response = await client.feeds.updateCommentBookmark({
comment_id: 'comment-123',
user_id: 'john',
folder_id: 'folder-123',
});
console.log(response);Example: with new_folder and new_folder_id
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update comment bookmark
const response = await client.feeds.updateCommentBookmark({
comment_id: 'comment-123',
new_folder: { name: 'My Feed', custom: {} },
new_folder_id: 'value',
});
console.log(response);Example: with user and custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update comment bookmark
const response = await client.feeds.updateCommentBookmark({
comment_id: 'comment-123',
user: { id: 'activity-123', custom: {} },
custom: {},
});
console.log(response);Response: UpdateCommentBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| comment_id | string | Yes | - |
| custom | Record<string, any> | No | Custom data for the bookmark |
| folder_id | string | No | ID of the folder containing the bookmark |
| new_folder | AddFolderRequest | No | Create a new folder and move the bookmark into it |
| new_folder_id | string | No | Move the bookmark to this folder (empty string removes the folder) |
| user | UserRequest | No | - |
| user_id | string | No | - |
deleteCommentBookmark
Removes a bookmarked comment, freeing up space and reducing clutter. Use this when a bookmarked comment is no longer needed by the user.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a comment bookmark
const response = await client.feeds.deleteCommentBookmark({
comment_id: 'comment-123',
user_id: 'john',
folder_id: 'folder-123',
});
console.log(response);Response: DeleteCommentBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| comment_id | string | Yes | - |
| folder_id | string | No | - |
| user_id | string | No | - |
getComment
Retrieve a specific comment by its ID to view details or perform further operations. Use this method when you need to access the content or metadata of a particular comment.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get comment
const response = await client.feeds.getComment({
id: 'activity-123',
user_id: 'john',
});
console.log(response);Response: GetCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| user_id | string | No | - |
updateComment
Modify the content or metadata of an existing comment. Use this method when you want to edit a comment's text or update its properties.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a comment
const response = await client.feeds.updateComment({
id: 'activity-123',
user_id: 'john',
skip_push: false,
});
console.log(response);Example: with copy_custom_to_notification and custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a comment
const response = await client.feeds.updateComment({
id: 'activity-123',
copy_custom_to_notification: false,
custom: {},
});
console.log(response);Example: with force_moderation and handle_mention_notifications
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a comment
const response = await client.feeds.updateComment({
id: 'activity-123',
force_moderation: false,
handle_mention_notifications: false,
});
console.log(response);Example: with mentioned_user_ids and skip_enrich_url
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a comment
const response = await client.feeds.updateComment({
id: 'activity-123',
mentioned_user_ids: ['user-1', 'user-2'],
skip_enrich_url: false,
});
console.log(response);Response: UpdateCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| attachments | []Attachment | No | Updated media attachments for the comment. Providing this field will replace all existing attachm... |
| comment | string | No | Updated text content of the comment |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when handle_mention_notifi... |
| custom | Record<string, any> | No | Updated custom data for the comment |
| force_moderation | boolean | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| handle_mention_notifications | boolean | No | If true, creates notification activities for newly mentioned users and deletes notifications for ... |
| mentioned_user_ids | []string | No | List of user IDs mentioned in the comment |
| skip_enrich_url | boolean | No | Whether to skip URL enrichment for this comment |
| skip_push | boolean | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
deleteComment
Remove a comment from a feed. Use this method to permanently delete a comment when it is no longer needed.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a comment
const response = await client.feeds.deleteComment({
id: 'activity-123',
hard_delete: false,
delete_notification_activity: false,
});
console.log(response);Response: DeleteCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| hard_delete | boolean | No | - |
| delete_notification_activity | boolean | No | - |
updateCommentPartial
Applies partial updates to a comment, allowing for specific fields to be modified without altering the entire comment. Use this to efficiently update comment content or metadata.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partial comment update
const response = await client.feeds.updateCommentPartial({
id: 'activity-123',
user_id: 'john',
skip_push: false,
});
console.log(response);Example: with handle_mention_notifications and set
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partial comment update
const response = await client.feeds.updateCommentPartial({
id: 'activity-123',
handle_mention_notifications: false,
set: {},
});
console.log(response);Example: with skip_enrich_url and copy_custom_to_notification
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partial comment update
const response = await client.feeds.updateCommentPartial({
id: 'activity-123',
skip_enrich_url: false,
copy_custom_to_notification: false,
});
console.log(response);Example: with unset and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Partial comment update
const response = await client.feeds.updateCommentPartial({
id: 'activity-123',
unset: [],
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: UpdateCommentPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to notification activities Deprecated: use notification_context.trigg... |
| force_moderation | boolean | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| handle_mention_notifications | boolean | No | Whether to handle mention notification changes |
| set | Record<string, any> | No | Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'mentioned_u... |
| skip_enrich_url | boolean | No | Whether to skip URL enrichment |
| skip_push | boolean | No | Whether to skip push notifications |
| unset | []string | No | List of field names to remove. Supported fields: 'custom', 'attachments', 'mentioned_user_ids', '... |
| user | UserRequest | No | - |
| user_id | string | No | - |
addCommentReaction
Attach a reaction, such as a like or emoji, to a comment. Use this method to allow users to express their sentiments about a comment.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add comment reaction
const response = await client.feeds.addCommentReaction({
id: 'activity-123',
type: 'like',
user_id: 'john',
skip_push: false,
});
console.log(response);Example: with custom and enforce_unique
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add comment reaction
const response = await client.feeds.addCommentReaction({
id: 'activity-123',
type: 'like',
custom: {},
enforce_unique: true,
});
console.log(response);Example: with copy_custom_to_notification and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add comment reaction
const response = await client.feeds.addCommentReaction({
id: 'activity-123',
type: 'like',
copy_custom_to_notification: false,
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with create_notification_activity
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Add comment reaction
const response = await client.feeds.addCommentReaction({
id: 'activity-123',
type: 'like',
create_notification_activity: false,
});
console.log(response);Response: AddCommentReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| type | string | Yes | The type of reaction, eg upvote, like, ... |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | boolean | No | Whether to create a notification activity for this reaction |
| custom | Record<string, any> | No | Optional custom data to add to the reaction |
| enforce_unique | boolean | No | Whether to enforce unique reactions per user (remove other reaction types from the user when addi... |
| skip_push | boolean | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
queryCommentReactions
Retrieve all reactions associated with a specific comment. Use this method to view how users have interacted with a comment through various reactions.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query comment reactions
const response = await client.feeds.queryCommentReactions({
id: 'activity-123',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query comment reactions
const response = await client.feeds.queryCommentReactions({
id: 'activity-123',
sort: [],
prev: null,
});
console.log(response);Example: with next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query comment reactions
const response = await client.feeds.queryCommentReactions({
id: 'activity-123',
next: null,
});
console.log(response);Response: QueryCommentReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| filter | Record<string, any> | No | - |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | - |
deleteCommentReaction
Remove a specific reaction from a comment. Use this method when you need to retract or correct a reaction added to a comment.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete comment reaction
const response = await client.feeds.deleteCommentReaction({
id: 'activity-123',
type: 'like',
user_id: 'john',
delete_notification_activity: false,
});
console.log(response);Response: DeleteCommentReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| type | string | Yes | - |
| delete_notification_activity | boolean | No | - |
| user_id | string | No | - |
getCommentReplies
Fetch all replies associated with a specific comment. Use this method to view or manage the conversation thread stemming from a comment.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get replies for a comment
const response = await client.feeds.getCommentReplies({
id: 'activity-123',
user_id: 'john',
limit: 25,
});
console.log(response);Example: with sort and id_around
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get replies for a comment
const response = await client.feeds.getCommentReplies({
id: 'activity-123',
sort: [{ field: "created_at", direction: -1 }],
id_around: 'value',
});
console.log(response);Example: with depth and replies_limit
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get replies for a comment
const response = await client.feeds.getCommentReplies({
id: 'activity-123',
depth: 2,
replies_limit: 10,
});
console.log(response);Example: with prev and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get replies for a comment
const response = await client.feeds.getCommentReplies({
id: 'activity-123',
prev: null,
next: null,
});
console.log(response);Response: GetCommentRepliesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| depth | number | No | - |
| sort | string | No | - |
| replies_limit | number | No | - |
| id_around | string | No | - |
| user_id | string | No | - |
| limit | number | No | - |
| prev | string | No | - |
| next | string | No | - |
restoreComment
Reactivates a comment that was previously soft-deleted, making it visible again. Use this to recover comments that were mistakenly deleted or need to be reinstated.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Restore a soft-deleted comment
const response = await client.feeds.restoreComment({
id: 'activity-123',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: RestoreCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
listFeedGroups
Retrieve a list of all available feed groups within the application. Use this method to explore or manage different categories of feeds.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List all feed groups
const response = await client.feeds.listFeedGroups({
include_soft_deleted: false,
});
console.log(response);Response: ListFeedGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| include_soft_deleted | boolean | No | - |
createFeedGroup
Establish a new feed group to categorize and organize related feeds. Use this method when you need to create a new grouping for feeds based on specific criteria or topics.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a new feed group
const response = await client.feeds.createFeedGroup({
id: 'activity-123',
activity_processors: [],
activity_selectors: [],
});
console.log(response);Example: with aggregation and custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a new feed group
const response = await client.feeds.createFeedGroup({
id: 'activity-123',
aggregation: { activities_sort: 'value' },
custom: {},
});
console.log(response);Example: with default_visibility and notification
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a new feed group
const response = await client.feeds.createFeedGroup({
id: 'activity-123',
default_visibility: 'value',
notification: { deduplication_window: 'value' },
});
console.log(response);Example: with push_notification and ranking
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a new feed group
const response = await client.feeds.createFeedGroup({
id: 'activity-123',
push_notification: { enable_push: false },
ranking: { type: 'like', defaults: {} },
});
console.log(response);Response: CreateFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique identifier for the feed group |
| activity_processors | []ActivityProcessorConfig | No | Configuration for activity processors |
| activity_selectors | []ActivitySelectorConfig | No | Configuration for activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| custom | Record<string, any> | No | Custom data for the feed group |
| default_visibility | string | No | Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'pr... |
| notification | NotificationConfig | No | Configuration for notifications |
| push_notification | PushNotificationConfig | No | - |
| ranking | RankingConfig | No | Configuration for activity ranking |
| stories | StoriesConfig | No | Configuration for stories functionality |
getOrCreateFeed
Retrieve an existing feed or create a new one if it doesn't exist. Use this method to ensure a feed is available for content posting or interaction.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a new feed
const response = await client.feeds.getOrCreateFeed({
feed_group_id: 'user',
feed_id: 'john',
user_id: 'john',
limit: 25,
});
console.log(response);Example: with filter and data
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a new feed
const response = await client.feeds.getOrCreateFeed({
feed_group_id: 'user',
feed_id: 'john',
filter: {},
data: { custom: {} },
});
console.log(response);Example: with followers_pagination and following_pagination
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a new feed
const response = await client.feeds.getOrCreateFeed({
feed_group_id: 'user',
feed_id: 'john',
followers_pagination: { limit: 25 },
following_pagination: { limit: 25 },
});
console.log(response);Example: with friend_reactions_options and id_around
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a new feed
const response = await client.feeds.getOrCreateFeed({
feed_group_id: 'user',
feed_id: 'john',
friend_reactions_options: { enabled: false },
id_around: 'value',
});
console.log(response);Response: GetOrCreateFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| data | FeedInput | No | - |
| enrichment_options | EnrichmentOptions | No | - |
| external_ranking | Record<string, any> | No | - |
| filter | Record<string, any> | No | - |
| followers_pagination | PagerRequest | No | - |
| following_pagination | PagerRequest | No | - |
| friend_reactions_options | FriendReactionsOptions | No | - |
| id_around | string | No | - |
| interest_weights | Record<string, any> | No | - |
| limit | number | No | - |
| member_pagination | PagerRequest | No | - |
| next | string | No | - |
| prev | string | No | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
| view | string | No | - |
| watch | boolean | No | - |
updateFeed
Modify the details or settings of an existing feed to keep it current and relevant. Use this method when you want to change aspects like feed name, description, or settings.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a feed
const response = await client.feeds.updateFeed({
feed_group_id: 'user',
feed_id: 'john',
name: 'My Feed',
created_by_id: 'value',
});
console.log(response);Example: with custom and description
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a feed
const response = await client.feeds.updateFeed({
feed_group_id: 'user',
feed_id: 'john',
custom: {},
description: 'A description',
});
console.log(response);Example: with enrich_own_fields and filter_tags
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a feed
const response = await client.feeds.updateFeed({
feed_group_id: 'user',
feed_id: 'john',
enrich_own_fields: false,
filter_tags: ['tag1', 'tag2'],
});
console.log(response);Example: with location and clear_location
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a feed
const response = await client.feeds.updateFeed({
feed_group_id: 'user',
feed_id: 'john',
location: { lat: 10, lng: 10 },
clear_location: false,
});
console.log(response);Response: UpdateFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| clear_location | boolean | No | If true, removes the geographic location from the feed |
| created_by_id | string | No | ID of the new feed creator (owner) |
| custom | Record<string, any> | No | Custom data for the feed |
| description | string | No | Description of the feed |
| enrich_own_fields | boolean | No | If true, enriches the feed with own_* fields (own_follows, own_followings, own_capabilities, own_... |
| filter_tags | []string | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| name | string | No | Name of the feed |
deleteFeed
Remove a specific feed permanently to clean up unused or obsolete data. This is useful when a feed is no longer needed and should be completely erased from your system.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a single feed
const response = await client.feeds.deleteFeed({
feed_group_id: 'user',
feed_id: 'john',
hard_delete: false,
});
console.log(response);Response: DeleteFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| hard_delete | boolean | No | - |
markActivity
Designate specific activities as read, seen, or watched to help users track their interactions and stay informed about new content. Use it to manage activity notifications and ensure users only see what is relevant to them.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Mark activities as read/seen/watched
const response = await client.feeds.markActivity({
feed_group_id: 'user',
feed_id: 'john',
user_id: 'john',
mark_all_seen: true,
});
console.log(response);Example: with mark_read and mark_seen
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Mark activities as read/seen/watched
const response = await client.feeds.markActivity({
feed_group_id: 'user',
feed_id: 'john',
mark_read: [],
mark_seen: [],
});
console.log(response);Example: with mark_watched and user
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Mark activities as read/seen/watched
const response = await client.feeds.markActivity({
feed_group_id: 'user',
feed_id: 'john',
mark_watched: [],
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with mark_all_read
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Mark activities as read/seen/watched
const response = await client.feeds.markActivity({
feed_group_id: 'user',
feed_id: 'john',
mark_all_read: true,
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| mark_all_read | boolean | No | Whether to mark all activities as read |
| mark_all_seen | boolean | No | Whether to mark all activities as seen |
| mark_read | []string | No | List of activity IDs to mark as read |
| mark_seen | []string | No | List of activity IDs to mark as seen |
| mark_watched | []string | No | List of activity IDs to mark as watched (for stories) |
| user | UserRequest | No | - |
| user_id | string | No | - |
pinActivity
Highlight or prioritize an activity by pinning it to the top of a feed, ensuring it remains visible and easily accessible. This is useful for emphasizing important updates or content.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Pin an activity to a feed
const response = await client.feeds.pinActivity({
feed_group_id: 'user',
feed_id: 'john',
activity_id: 'activity-123',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with enrich_own_fields
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Pin an activity to a feed
const response = await client.feeds.pinActivity({
feed_group_id: 'user',
feed_id: 'john',
activity_id: 'activity-123',
enrich_own_fields: false,
});
console.log(response);Response: PinActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| activity_id | string | Yes | - |
| enrich_own_fields | boolean | No | If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own... |
| user | UserRequest | No | - |
| user_id | string | No | - |
unpinActivity
Remove a pinned activity from its prioritized position, allowing it to move naturally within the feed. Use this method when the activity no longer needs special emphasis.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Unpin an activity from a feed
const response = await client.feeds.unpinActivity({
feed_group_id: 'user',
feed_id: 'john',
activity_id: 'activity-123',
user_id: 'john',
enrich_own_fields: false,
});
console.log(response);Response: UnpinActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| activity_id | string | Yes | - |
| enrich_own_fields | boolean | No | - |
| user_id | string | No | - |
updateFeedMembers
Modify the list of members associated with a feed, adding or removing individuals as necessary. This method is beneficial for managing access and collaboration within a feed.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update feed members
const response = await client.feeds.updateFeedMembers({
feed_group_id: 'user',
feed_id: 'john',
operation: 'add',
limit: 25,
members: [],
});
console.log(response);Example: with next and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update feed members
const response = await client.feeds.updateFeedMembers({
feed_group_id: 'user',
feed_id: 'john',
operation: 'add',
next: null,
prev: null,
});
console.log(response);Response: UpdateFeedMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| operation | string | Yes | Type of update operation to perform. One of: upsert, remove, set |
| limit | number | No | - |
| members | []FeedMemberRequest | No | List of members to upsert, remove, or set |
| next | string | No | - |
| prev | string | No | - |
acceptFeedMemberInvite
Confirm and accept an invitation to join a feed as a member, facilitating collaboration and shared access. Use this method when you wish to join a feed you have been invited to.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Accept a feed member request
const response = await client.feeds.acceptFeedMemberInvite({
feed_id: 'john',
feed_group_id: 'user',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: AcceptFeedMemberInviteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_id | string | Yes | - |
| feed_group_id | string | Yes | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
queryFeedMembers
Retrieve a list of all members associated with a specific feed to understand who has access and manage member interactions. This is useful for auditing and managing feed membership.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query feed members
const response = await client.feeds.queryFeedMembers({
feed_group_id: 'user',
feed_id: 'john',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query feed members
const response = await client.feeds.queryFeedMembers({
feed_group_id: 'user',
feed_id: 'john',
sort: [],
prev: null,
});
console.log(response);Example: with next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query feed members
const response = await client.feeds.queryFeedMembers({
feed_group_id: 'user',
feed_id: 'john',
next: null,
});
console.log(response);Response: QueryFeedMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| filter | Record<string, any> | No | Filter parameters for the query |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sort parameters for the query |
rejectFeedMemberInvite
Decline an invitation to join a feed, preventing unwanted participation or access. Use this when you do not wish to be part of a feed you have been invited to.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Reject an invite to become a feed member
const response = await client.feeds.rejectFeedMemberInvite({
feed_group_id: 'user',
feed_id: 'john',
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Response: RejectFeedMemberInviteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| user | UserRequest | No | - |
| user_id | string | No | - |
queryPinnedActivities
Retrieves a list of activities that have been pinned for prominence in a feed. Use this to highlight important or popular activities to your users.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query pinned activities
const response = await client.feeds.queryPinnedActivities({
feed_group_id: 'user',
feed_id: 'john',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query pinned activities
const response = await client.feeds.queryPinnedActivities({
feed_group_id: 'user',
feed_id: 'john',
sort: [],
next: null,
});
console.log(response);Example: with prev and enrich_own_fields
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query pinned activities
const response = await client.feeds.queryPinnedActivities({
feed_group_id: 'user',
feed_id: 'john',
prev: null,
enrich_own_fields: false,
});
console.log(response);Response: QueryPinnedActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| enrich_own_fields | boolean | No | - |
| filter | Record<string, any> | No | Filters to apply to the query |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
getFollowSuggestions
Receive personalized recommendations on which feeds or users to follow, enhancing user engagement and discovery of relevant content. This method is helpful for users looking to expand their network or interests.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get follow suggestions
const response = await client.feeds.getFollowSuggestions({
feed_group_id: 'user',
user_id: 'john',
limit: 25,
});
console.log(response);Response: GetFollowSuggestionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| limit | number | No | - |
| user_id | string | No | - |
restoreFeedGroup
Restores a previously deleted feed group, reinstating its activities and user interactions. Use this to recover a feed group that needs to be active again after deletion.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Restore a feed group
const response = await client.feeds.restoreFeedGroup({
feed_group_id: 'user',
});
console.log(response);Response: RestoreFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
getFeedGroup
Retrieve details of an existing feed group to manage or display its contents effectively.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get a feed group
const response = await client.feeds.getFeedGroup({
id: 'activity-123',
include_soft_deleted: false,
});
console.log(response);Response: GetFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| include_soft_deleted | boolean | No | - |
getOrCreateFeedGroup
Obtain an existing feed group or create a new one if it doesn't exist, ensuring your application can seamlessly manage feed group resources.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get or create a feed group
const response = await client.feeds.getOrCreateFeedGroup({
id: 'activity-123',
activity_processors: [],
activity_selectors: [],
});
console.log(response);Example: with aggregation and custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get or create a feed group
const response = await client.feeds.getOrCreateFeedGroup({
id: 'activity-123',
aggregation: { activities_sort: 'value' },
custom: {},
});
console.log(response);Example: with default_visibility and notification
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get or create a feed group
const response = await client.feeds.getOrCreateFeedGroup({
id: 'activity-123',
default_visibility: 'value',
notification: { deduplication_window: 'value' },
});
console.log(response);Example: with push_notification and ranking
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get or create a feed group
const response = await client.feeds.getOrCreateFeedGroup({
id: 'activity-123',
push_notification: { enable_push: false },
ranking: { type: 'like', defaults: {} },
});
console.log(response);Response: GetOrCreateFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| activity_processors | []ActivityProcessorConfig | No | Configuration for activity processors |
| activity_selectors | []ActivitySelectorConfig | No | Configuration for activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| custom | Record<string, any> | No | Custom data for the feed group |
| default_visibility | string | No | Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'pr... |
| notification | NotificationConfig | No | Configuration for notifications |
| push_notification | PushNotificationConfig | No | - |
| ranking | RankingConfig | No | Configuration for activity ranking |
| stories | StoriesConfig | No | Configuration for stories functionality |
updateFeedGroup
Modify the properties of an existing feed group to keep its information up-to-date and relevant to your application's needs.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a feed group
const response = await client.feeds.updateFeedGroup({
id: 'activity-123',
activity_processors: [],
activity_selectors: [],
});
console.log(response);Example: with aggregation and custom
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a feed group
const response = await client.feeds.updateFeedGroup({
id: 'activity-123',
aggregation: { activities_sort: 'value' },
custom: {},
});
console.log(response);Example: with default_visibility and notification
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a feed group
const response = await client.feeds.updateFeedGroup({
id: 'activity-123',
default_visibility: 'value',
notification: { deduplication_window: 'value' },
});
console.log(response);Example: with push_notification and ranking
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a feed group
const response = await client.feeds.updateFeedGroup({
id: 'activity-123',
push_notification: { enable_push: false },
ranking: { type: 'like', defaults: {} },
});
console.log(response);Response: UpdateFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| activity_processors | []ActivityProcessorConfig | No | Configuration for activity processors |
| activity_selectors | []ActivitySelectorConfig | No | Configuration for activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| custom | Record<string, any> | No | Custom data for the feed group |
| default_visibility | string | No | - |
| notification | NotificationConfig | No | Configuration for notifications |
| push_notification | PushNotificationConfig | No | - |
| ranking | RankingConfig | No | Configuration for activity ranking |
| stories | StoriesConfig | No | Configuration for stories functionality |
deleteFeedGroup
Remove an existing feed group to free up resources or when the feed group is no longer needed in your application.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a feed group
const response = await client.feeds.deleteFeedGroup({
id: 'activity-123',
hard_delete: false,
});
console.log(response);Response: DeleteFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| hard_delete | boolean | No | - |
listFeedViews
Retrieve a list of all feed views to easily navigate and manage the available views in an application.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List all feed views
const response = await client.feeds.listFeedViews();
console.log(response);Response: ListFeedViewsResponse
createFeedView
Generate a new feed view to organize and present feed data in a customized manner for users.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a new feed view
const response = await client.feeds.createFeedView({
id: 'activity-123',
activity_selectors: [],
aggregation: { activities_sort: 'value' },
});
console.log(response);Example: with ranking
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a new feed view
const response = await client.feeds.createFeedView({
id: 'activity-123',
ranking: { type: 'like', defaults: {} },
});
console.log(response);Response: CreateFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique identifier for the feed view |
| activity_selectors | []ActivitySelectorConfig | No | Configuration for selecting activities |
| aggregation | AggregationConfig | No | Configuration for aggregating activities |
| ranking | RankingConfig | No | Configuration for ranking activities |
getFeedView
Access specific details of an existing feed view to analyze or display its configuration and content.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get a feed view
const response = await client.feeds.getFeedView({
id: 'activity-123',
});
console.log(response);Response: GetFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
getOrCreateFeedView
Retrieve an existing feed view or create a new one if it doesn't exist, ensuring your application can always access the necessary view configurations.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get or create a feed view
const response = await client.feeds.getOrCreateFeedView({
id: 'activity-123',
activity_selectors: [],
aggregation: { activities_sort: 'value' },
});
console.log(response);Example: with ranking
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get or create a feed view
const response = await client.feeds.getOrCreateFeedView({
id: 'activity-123',
ranking: { type: 'like', defaults: {} },
});
console.log(response);Response: GetOrCreateFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| activity_selectors | []ActivitySelectorConfig | No | Configuration for selecting activities |
| aggregation | AggregationConfig | No | Configuration for aggregating activities |
| ranking | RankingConfig | No | Configuration for ranking activities |
updateFeedView
Alter the settings or content of an existing feed view to reflect changes in data presentation or user requirements.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a feed view
const response = await client.feeds.updateFeedView({
id: 'activity-123',
activity_selectors: [],
aggregation: { activities_sort: 'value' },
});
console.log(response);Example: with ranking
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a feed view
const response = await client.feeds.updateFeedView({
id: 'activity-123',
ranking: { type: 'like', defaults: {} },
});
console.log(response);Response: UpdateFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| activity_selectors | []ActivitySelectorConfig | No | Updated configuration for selecting activities |
| aggregation | AggregationConfig | No | Updated configuration for aggregating activities |
| ranking | RankingConfig | No | Updated configuration for ranking activities |
deleteFeedView
Remove an existing feed view when it is no longer required, helping to maintain an organized and efficient feed view collection.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete a feed view
const response = await client.feeds.deleteFeedView({
id: 'activity-123',
});
console.log(response);Response: DeleteFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
listFeedVisibilities
Retrieve a list of visibility settings for multiple feeds. Use this method to gain insights into which feeds are public, private, or have custom visibility rules.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// List feed visibilities
const response = await client.feeds.listFeedVisibilities();
console.log(response);Response: ListFeedVisibilitiesResponse
getFeedVisibility
Obtain the visibility status of a specific feed. This method is useful for checking whether a feed is accessible to certain users or groups.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get feed visibility
const response = await client.feeds.getFeedVisibility({
name: 'My Feed',
});
console.log(response);Response: GetFeedVisibilityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
updateFeedVisibility
Modify the visibility settings of a feed. Use this to change who can view or interact with a feed, enhancing content privacy or accessibility as needed.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update Feed Visibility
const response = await client.feeds.updateFeedVisibility({
name: 'My Feed',
grants: {},
});
console.log(response);Response: UpdateFeedVisibilityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | - |
| grants | Record<string, any> | No | Updated permission grants for each role |
createFeedsBatch
Simultaneously create multiple feeds with a single request. This method is ideal for initializing multiple content streams efficiently.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create multiple feeds at once
const response = await client.feeds.createFeedsBatch({
feeds: ['user:john', 'timeline:global'],
enrich_own_fields: false,
});
console.log(response);Response: CreateFeedsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feeds | []FeedRequest | Yes | List of feeds to create |
| enrich_own_fields | boolean | No | If true, enriches the created feeds with own_* fields (own_follows, own_followings, own_capabilit... |
deleteFeedsBatch
Remove multiple feeds in one operation. Use this method to streamline the cleanup process by deleting several feeds at once.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete multiple feeds
const response = await client.feeds.deleteFeedsBatch({
feeds: ['user:john', 'timeline:global'],
hard_delete: false,
});
console.log(response);Response: DeleteFeedsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feeds | []string | Yes | List of fully qualified feed IDs (format: group_id:feed_id) to delete |
| hard_delete | boolean | No | Whether to permanently delete the feeds instead of soft delete |
ownBatch
Retrieve ownership details for multiple feeds. This is useful for managing or auditing which feeds you or your organization control.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get own fields for multiple feeds
const response = await client.feeds.ownBatch({
feeds: ['user:john', 'timeline:global'],
user_id: 'john',
user: { id: 'activity-123', custom: {} },
});
console.log(response);Example: with fields
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get own fields for multiple feeds
const response = await client.feeds.ownBatch({
feeds: ['user:john', 'timeline:global'],
fields: [],
});
console.log(response);Response: OwnBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feeds | []string | Yes | List of feed IDs to get own fields for |
| fields | []string | No | Optional list of specific fields to return. If not specified, all fields (own_follows, own_follow... |
| user | UserRequest | No | - |
| user_id | string | No | - |
queryFeeds
Search and filter feeds based on specific criteria. Use this method to efficiently locate feeds that match your interests or requirements.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query feeds
const response = await client.feeds.queryFeeds({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with next and prev
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query feeds
const response = await client.feeds.queryFeeds({
next: null,
prev: null,
});
console.log(response);Example: with enrich_own_fields and watch
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query feeds
const response = await client.feeds.queryFeeds({
enrich_own_fields: false,
watch: false,
});
console.log(response);Response: QueryFeedsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| enrich_own_fields | boolean | No | - |
| filter | Record<string, any> | No | Filters to apply to the query |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
| watch | boolean | No | Whether to subscribe to realtime updates |
getFeedsRateLimits
Check the rate limits associated with feed operations. This method helps you understand the frequency restrictions on feed interactions to avoid exceeding usage quotas.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get Feeds Rate Limits
const response = await client.feeds.getFeedsRateLimits({
endpoints: 'value',
android: false,
ios: false,
});
console.log(response);Example: with web and server_side
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Get Feeds Rate Limits
const response = await client.feeds.getFeedsRateLimits({
web: false,
server_side: false,
});
console.log(response);Response: GetFeedsRateLimitsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoints | string | No | - |
| android | boolean | No | - |
| ios | boolean | No | - |
| web | boolean | No | - |
| server_side | boolean | No | - |
follow
Establish a follow relationship with a feed, allowing you to receive updates or notifications about its content. Use this to stay informed about specific topics or creators.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a follow
const response = await client.feeds.follow({
source: 'user:john',
target: 'timeline:jane',
skip_push: false,
copy_custom_to_notification: false,
});
console.log(response);Example: with create_notification_activity and create_users
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a follow
const response = await client.feeds.follow({
source: 'user:john',
target: 'timeline:jane',
create_notification_activity: false,
create_users: false,
});
console.log(response);Example: with custom and enrich_own_fields
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a follow
const response = await client.feeds.follow({
source: 'user:john',
target: 'timeline:jane',
custom: {},
enrich_own_fields: false,
});
console.log(response);Example: with push_preference and activity_copy_limit
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create a follow
const response = await client.feeds.follow({
source: 'user:john',
target: 'timeline:jane',
push_preference: 'value',
activity_copy_limit: 10,
});
console.log(response);Response: SingleFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | Fully qualified ID of the source feed |
| target | string | Yes | Fully qualified ID of the target feed |
| activity_copy_limit | number | No | Maximum number of historical activities to copy from the target feed when the follow is first mat... |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | boolean | No | Whether to create a notification activity for this follow |
| create_users | boolean | No | If true, auto-creates users referenced by the source and target FIDs when they don't already exis... |
| custom | Record<string, any> | No | Custom data for the follow relationship |
| enrich_own_fields | boolean | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
| push_preference | string | No | Push preference for the follow relationship |
| skip_push | boolean | No | Whether to skip push for this follow |
| status | string | No | Status of the follow relationship. One of: accepted, pending, rejected |
updateFollow
Modify an existing follow relationship. This method can be used to change your notification preferences or unfollow a feed when it is no longer relevant.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a follow
const response = await client.feeds.updateFollow({
source: 'user:john',
target: 'timeline:jane',
skip_push: false,
copy_custom_to_notification: false,
});
console.log(response);Example: with create_notification_activity and create_users
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a follow
const response = await client.feeds.updateFollow({
source: 'user:john',
target: 'timeline:jane',
create_notification_activity: false,
create_users: false,
});
console.log(response);Example: with custom and enrich_own_fields
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a follow
const response = await client.feeds.updateFollow({
source: 'user:john',
target: 'timeline:jane',
custom: {},
enrich_own_fields: false,
});
console.log(response);Example: with follower_role and push_preference
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update a follow
const response = await client.feeds.updateFollow({
source: 'user:john',
target: 'timeline:jane',
follower_role: 'member',
push_preference: 'value',
});
console.log(response);Response: UpdateFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | Fully qualified ID of the source feed |
| target | string | Yes | Fully qualified ID of the target feed |
| activity_copy_limit | number | No | Maximum number of historical activities to copy from the target feed when the follow is first mat... |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | boolean | No | Whether to create a notification activity for this follow |
| create_users | boolean | No | If true, auto-creates users referenced by the source and target FIDs when they don't already exis... |
| custom | Record<string, any> | No | Custom data for the follow relationship |
| enrich_own_fields | boolean | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
| follower_role | string | No | - |
| push_preference | string | No | Push preference for the follow relationship |
| skip_push | boolean | No | Whether to skip push for this follow |
| status | string | No | Status of the follow relationship. One of: accepted, pending, rejected |
acceptFollow
Approve a pending follow request to allow a user to follow your feed, useful for managing access in private or protected feeds.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Accept a follow request
const response = await client.feeds.acceptFollow({
source: 'user:john',
target: 'timeline:jane',
follower_role: 'member',
});
console.log(response);Response: AcceptFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | Fully qualified ID of the source feed |
| target | string | Yes | Fully qualified ID of the target feed |
| follower_role | string | No | Optional role for the follower in the follow relationship |
followBatch
Add multiple followers to a feed simultaneously, ideal for quickly expanding your feed's audience.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create multiple follows at once
const response = await client.feeds.followBatch({
follows: [],
create_users: false,
enrich_own_fields: false,
});
console.log(response);Response: FollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []FollowRequest | Yes | List of follow relationships to create |
| create_users | boolean | No | If true, auto-creates users referenced by source/target FIDs in the batch when they don't already... |
| enrich_own_fields | boolean | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
getOrCreateFollows
Ensure specified follows exist by either retrieving existing ones or creating them as needed, simplifying follow management.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Upsert multiple follows at once
const response = await client.feeds.getOrCreateFollows({
follows: [],
create_users: false,
enrich_own_fields: false,
});
console.log(response);Response: FollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []FollowRequest | Yes | List of follow relationships to create |
| create_users | boolean | No | If true, auto-creates users referenced by source/target FIDs in the batch when they don't already... |
| enrich_own_fields | boolean | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
queryFollows
Retrieve a list of users who are following a specific feed, helping you analyze and manage your audience.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query follows
const response = await client.feeds.queryFollows({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query follows
const response = await client.feeds.queryFollows({
prev: null,
next: null,
});
console.log(response);Response: QueryFollowsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | Filters to apply to the query |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
rejectFollow
Deny a follow request to prevent a user from following your feed, useful for maintaining privacy or exclusivity.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Reject a follow request
const response = await client.feeds.rejectFollow({
source: 'user:john',
target: 'timeline:jane',
});
console.log(response);Response: RejectFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | Fully qualified ID of the source feed |
| target | string | Yes | Fully qualified ID of the target feed |
unfollow
Remove a user from following a feed, helpful for managing your feed's audience or curating content access.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Unfollow a feed
const response = await client.feeds.unfollow({
source: 'user:john',
target: 'timeline:jane',
delete_notification_activity: false,
keep_history: false,
});
console.log(response);Example: with enrich_own_fields
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Unfollow a feed
const response = await client.feeds.unfollow({
source: 'user:john',
target: 'timeline:jane',
enrich_own_fields: false,
});
console.log(response);Response: UnfollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | - |
| target | string | Yes | - |
| delete_notification_activity | boolean | No | - |
| keep_history | boolean | No | - |
| enrich_own_fields | boolean | No | - |
createMembershipLevel
Establish a new membership tier with specific benefits or access rights, allowing for tailored user engagement strategies.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create membership level
const response = await client.feeds.createMembershipLevel({
id: 'activity-123',
name: 'My Feed',
custom: {},
description: 'A description',
});
console.log(response);Example: with priority and tags
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Create membership level
const response = await client.feeds.createMembershipLevel({
id: 'activity-123',
name: 'My Feed',
priority: 1,
tags: ['tag1', 'tag2'],
});
console.log(response);Response: CreateMembershipLevelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique identifier for the membership level |
| name | string | Yes | Display name for the membership level |
| custom | Record<string, any> | No | Custom data for the membership level |
| description | string | No | Optional description of the membership level |
| priority | number | No | Priority level (higher numbers = higher priority) |
| tags | []string | No | Activity tags this membership level gives access to |
queryMembershipLevels
Retrieve existing membership levels to review or assess the tiers available for users, aiding in membership management.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query membership levels
const response = await client.feeds.queryMembershipLevels({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query membership levels
const response = await client.feeds.queryMembershipLevels({
prev: null,
next: null,
});
console.log(response);Response: QueryMembershipLevelsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | Filters to apply to the query |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
updateMembershipLevel
Modify an existing membership tier to adjust benefits or access rights, supporting dynamic content or service offerings.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update membership level
const response = await client.feeds.updateMembershipLevel({
id: 'activity-123',
name: 'My Feed',
description: 'A description',
});
console.log(response);Example: with custom and priority
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update membership level
const response = await client.feeds.updateMembershipLevel({
id: 'activity-123',
custom: {},
priority: 1,
});
console.log(response);Example: with tags
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Update membership level
const response = await client.feeds.updateMembershipLevel({
id: 'activity-123',
tags: ['tag1', 'tag2'],
});
console.log(response);Response: UpdateMembershipLevelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
| custom | Record<string, any> | No | Custom data for the membership level |
| description | string | No | Optional description of the membership level |
| name | string | No | Display name for the membership level |
| priority | number | No | Priority level (higher numbers = higher priority) |
| tags | []string | No | Activity tags this membership level gives access to |
deleteMembershipLevel
Remove a membership level when it's no longer needed, streamlining your membership structure and offerings.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete membership level
const response = await client.feeds.deleteMembershipLevel({
id: 'activity-123',
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
queryFeedsUsageStats
Retrieve comprehensive usage statistics for a specific feed, helping you analyze engagement and performance trends over time.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Query Feed Usage Statistics
const response = await client.feeds.queryFeedsUsageStats({
from: 'value',
to: 'value',
});
console.log(response);Response: QueryFeedsUsageStatsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| from | string | No | Start date in YYYY-MM-DD format (optional, defaults to 30 days ago) |
| to | string | No | End date in YYYY-MM-DD format (optional, defaults to today) |
unfollowBatch
Efficiently unfollow multiple feeds in a single operation, ideal for streamlining feed management when you no longer wish to receive updates from several sources.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Unfollow multiple feeds at once
const response = await client.feeds.unfollowBatch({
follows: [],
delete_notification_activity: false,
enrich_own_fields: false,
});
console.log(response);Response: UnfollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []UnfollowPair | Yes | List of follow relationships to remove, each with optional keep_history |
| delete_notification_activity | boolean | No | Whether to delete the corresponding notification activity (default: false) |
| enrich_own_fields | boolean | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
getOrCreateUnfollows
Ensure feeds are unfollowed without duplication by using an idempotent operation that simplifies management when transitioning away from specific content sources.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Unfollow multiple feeds (idempotent)
const response = await client.feeds.getOrCreateUnfollows({
follows: [],
delete_notification_activity: false,
enrich_own_fields: false,
});
console.log(response);Response: UnfollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []UnfollowPair | Yes | List of follow relationships to remove, each with optional keep_history |
| delete_notification_activity | boolean | No | Whether to delete the corresponding notification activity (default: false) |
| enrich_own_fields | boolean | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
deleteFeedUserData
Permanently remove all data associated with a user's feed, useful for maintaining privacy and complying with data protection regulations when users request data deletion.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Delete all feed data for a user
const response = await client.feeds.deleteFeedUserData({
user_id: 'john',
hard_delete: false,
});
console.log(response);Response: DeleteFeedUserDataResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | - |
| hard_delete | boolean | No | Whether to perform a hard delete instead of a soft delete |
exportFeedUserData
Download a complete set of a user's feed data, allowing for backup, analysis, or migration to other systems while ensuring data portability.
Example
// Using @stream-io/node-sdk
import { StreamClient } from '@stream-io/node-sdk';
const client = new StreamClient(apiKey, apiSecret);
// Export all feed data for a user
const response = await client.feeds.exportFeedUserData({
user_id: 'john',
});
console.log(response);Response: ExportFeedUserDataResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | - |
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
AcceptFeedMemberInviteResponse
interface AcceptFeedMemberInviteResponse {
duration: string;
member: FeedMemberResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| member | FeedMemberResponse | Yes | The feed member after accepting the invite |
AcceptFollowResponse
interface AcceptFollowResponse {
duration: string;
follow: FollowResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | The accepted follow relationship |
Action
interface Action {
name: string;
style?: string;
text: string;
type: string;
value?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | |
| text | string | Yes | |
| type | string | Yes | |
| style | string | No | |
| value | string | No |
ActivityFeedbackResponse
Response for activity feedback submission
interface ActivityFeedbackResponse {
activity_id: string;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | The ID of the activity that received feedback |
| duration | string | Yes |
ActivityPinResponse
interface ActivityPinResponse {
activity: ActivityResponse;
created_at: number;
feed: string;
updated_at: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The pinned activity |
| created_at | number | Yes | When the pin was created |
| feed | string | Yes | ID of the feed where activity is pinned |
| updated_at | number | Yes | When the pin was last updated |
| user | UserResponse | Yes | User who pinned the activity |
ActivityProcessorConfig
interface ActivityProcessorConfig {
type: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Type of activity processor (required) |
ActivityRequest
interface ActivityRequest {
attachments?: Attachment[];
collection_refs?: string[];
copy_custom_to_notification?: boolean;
create_notification_activity?: boolean;
custom?: Record<string, any>;
expires_at?: string;
feeds: string[];
filter_tags?: string[];
id?: string;
interest_tags?: string[];
location?: Location;
mentioned_user_ids?: string[];
parent_id?: string;
poll_id?: string;
restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody';
search_data?: Record<string, any>;
skip_enrich_url?: boolean;
skip_push?: boolean;
text?: string;
type: string;
user_id?: string;
visibility?: 'public' | 'private' | 'tag';
visibility_tag?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| feeds | string[] | Yes | List of feeds to add the activity to with a default max limit of 25 feeds |
| type | string | Yes | Type of activity |
| attachments | Attachment[] | No | List of attachments for the activity |
| collection_refs | string[] | No | Collections that this activity references |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | boolean | No | Whether to create notification activities for mentioned users |
| custom | Record<string, any> | No | Custom data for the activity |
| expires_at | string | No | Expiration time for the activity |
| filter_tags | string[] | No | Tags for filtering activities |
| id | string | No | Optional ID for the activity |
| interest_tags | string[] | No | Tags for indicating user interests |
| location | Location | No | Geographic location related to the activity |
| mentioned_user_ids | string[] | No | List of users mentioned in the activity |
| parent_id | string | No | ID of parent activity for replies/comments |
| poll_id | string | No | ID of a poll to attach to activity |
| restrict_replies | 'everyone' | 'people_i_follow' | 'nobody' |
| search_data | Record<string, any> | No | Additional data for search indexing |
| skip_enrich_url | boolean | No | Whether to skip URL enrichment for the activity |
| skip_push | boolean | No | Whether to skip push notifications |
| text | string | No | Text content of the activity |
| user_id | string | No | ID of the user creating the activity |
| visibility | 'public' | 'private' | 'tag' |
| visibility_tag | string | No | If visibility is 'tag', this is the tag name and is required |
ActivityResponse
interface ActivityResponse {
attachments: Attachment[];
bookmark_count: number;
collections: Record<string, any>;
comment_count: number;
comments: CommentResponse[];
created_at: number;
current_feed?: FeedResponse;
custom: Record<string, any>;
deleted_at?: number;
edited_at?: number;
expires_at?: number;
feeds: string[];
filter_tags: string[];
friend_reaction_count?: number;
friend_reactions?: FeedsReactionResponse[];
hidden: boolean;
id: string;
interest_tags: string[];
is_read?: boolean;
is_seen?: boolean;
is_watched?: boolean;
latest_reactions: FeedsReactionResponse[];
location?: Location;
mentioned_users: UserResponse[];
metrics?: Record<string, any>;
moderation?: ModerationV2Response;
moderation_action?: string;
notification_context?: NotificationContext;
own_bookmarks: BookmarkResponse[];
own_reactions: FeedsReactionResponse[];
parent?: ActivityResponse;
poll?: PollResponseData;
popularity: number;
preview: boolean;
reaction_count: number;
reaction_groups: Record<string, any>;
restrict_replies: 'everyone' | 'people_i_follow' | 'nobody';
score: number;
score_vars?: Record<string, any>;
search_data: Record<string, any>;
selector_source?: string;
share_count: number;
text?: string;
type: string;
updated_at: number;
user: UserResponse;
visibility: 'public' | 'private' | 'tag';
visibility_tag?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Attachment[] | Yes | Media attachments for the activity |
| bookmark_count | number | Yes | Number of bookmarks on the activity |
| collections | Record<string, any> | Yes | Enriched collection data referenced by this activity |
| comment_count | number | Yes | Number of comments on the activity |
| comments | CommentResponse[] | Yes | Latest 5 comments of this activity (comment replies excluded) |
| created_at | number | Yes | When the activity was created |
| custom | Record<string, any> | Yes | Custom data for the activity |
| feeds | string[] | Yes | List of feed IDs containing this activity |
| filter_tags | string[] | Yes | Tags for filtering |
| hidden | boolean | Yes | If this activity is hidden by this user (using activity feedback) |
| id | string | Yes | Unique identifier for the activity |
| interest_tags | string[] | Yes | Tags for user interests |
| latest_reactions | FeedsReactionResponse[] | Yes | Recent reactions to the activity |
| mentioned_users | UserResponse[] | Yes | Users mentioned in the activity |
| own_bookmarks | BookmarkResponse[] | Yes | Current user's bookmarks for this activity |
| own_reactions | FeedsReactionResponse[] | Yes | Current user's reactions to this activity |
| popularity | number | Yes | Popularity score of the activity |
| preview | boolean | Yes | If this activity is obfuscated for this user. For premium content where you w... |
| reaction_count | number | Yes | Number of reactions to the activity |
| reaction_groups | Record<string, any> | Yes | Grouped reactions by type |
| restrict_replies | 'everyone' | 'people_i_follow' | 'nobody' |
| score | number | Yes | Ranking score for this activity |
| search_data | Record<string, any> | Yes | Data for search indexing |
| share_count | number | Yes | Number of times the activity was shared |
| type | string | Yes | Type of activity |
| updated_at | number | Yes | When the activity was last updated |
| user | UserResponse | Yes | User who created the activity |
| visibility | 'public' | 'private' | 'tag' |
| current_feed | FeedResponse | No | Feed context for this activity view. If an activity is added only to one feed... |
| deleted_at | number | No | When the activity was deleted |
| edited_at | number | No | When the activity was last edited |
| expires_at | number | No | When the activity will expire |
| friend_reaction_count | number | No | Total count of reactions from friends on this activity |
| friend_reactions | FeedsReactionResponse[] | No | Reactions from users the current user follows or has mutual follows with |
| is_read | boolean | No | Whether this activity has been read. Only set for feed groups with notificati... |
| is_seen | boolean | No | Whether this activity has been seen. Only set for feed groups with notificati... |
| is_watched | boolean | No | |
| location | Location | No | Geographic location related to the activity |
| metrics | Record<string, any> | No | |
| moderation | ModerationV2Response | No | Moderation information |
| moderation_action | string | No | |
| notification_context | NotificationContext | No | Notification context data for the activity (if this is a reaction, comment, f... |
| parent | ActivityResponse | No | Parent activity (if this is a reply/comment) |
| poll | PollResponseData | No | Poll attached to this activity |
| score_vars | Record<string, any> | No | Variable values used at ranking time. Only included when include_score_vars i... |
| selector_source | string | No | Which activity selector provided this activity (e.g., 'following', 'popular',... |
| text | string | No | Text content of the activity |
| visibility_tag | string | No | If visibility is 'tag', this is the tag name |
ActivitySelectorConfig
interface ActivitySelectorConfig {
cutoff_time?: string;
cutoff_window?: string;
filter?: Record<string, any>;
min_popularity?: number;
params?: Record<string, any>;
sort?: SortParamRequest[];
type: 'popular' | 'proximity' | 'following' | 'current_feed' | 'query' | 'interest' | 'follow_suggestion';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | 'popular' | 'proximity' | 'following' |
| cutoff_time | string | No | Time threshold for activity selection (string). Expected RFC3339 format (e.g.... |
| cutoff_window | string | No | Flexible relative time window for activity selection (e.g., '1h', '3d', '1y')... |
| filter | Record<string, any> | No | Filter for activity selection |
| min_popularity | number | No | Minimum popularity threshold |
| params | Record<string, any> | No | |
| sort | SortParamRequest[] | No | Sort parameters for activity selection |
AddActivityResponse
interface AddActivityResponse {
activity: ActivityResponse;
duration: string;
mention_notifications_created?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The created activity |
| duration | string | Yes | |
| mention_notifications_created | number | No | Number of mention notification activities created for mentioned users |
AddBookmarkResponse
interface AddBookmarkResponse {
bookmark: BookmarkResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The created bookmark |
| duration | string | Yes |
AddCommentBookmarkResponse
interface AddCommentBookmarkResponse {
bookmark: BookmarkResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The created comment bookmark |
| duration | string | Yes |
AddCommentReactionResponse
interface AddCommentReactionResponse {
comment: CommentResponse;
duration: string;
notification_created?: boolean;
reaction: FeedsReactionResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The comment the reaction was added to |
| duration | string | Yes | Duration of the request |
| reaction | FeedsReactionResponse | Yes | The created or updated reaction |
| notification_created | boolean | No | Whether a notification activity was successfully created |
AddCommentRequest
interface AddCommentRequest {
attachments?: Attachment[];
comment?: string;
copy_custom_to_notification?: boolean;
create_notification_activity?: boolean;
custom?: Record<string, any>;
force_moderation?: boolean;
id?: string;
mentioned_user_ids?: string[];
object_id?: string;
object_type?: string;
parent_id?: string;
skip_enrich_url?: boolean;
skip_push?: boolean;
user?: UserRequest;
user_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | Attachment[] | No | Media attachments for the reply |
| comment | string | No | Text content of the comment |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | boolean | No | Whether to create a notification activity for this comment |
| custom | Record<string, any> | No | Custom data for the comment |
| force_moderation | boolean | No | If true, forces moderation to run for server-side requests. By default, serve... |
| id | string | No | Optional custom ID for the comment (max 255 characters). If not provided, a U... |
| mentioned_user_ids | string[] | No | List of users mentioned in the reply |
| object_id | string | No | ID of the object to comment on. Required for root comments |
| object_type | string | No | Type of the object to comment on. Required for root comments |
| parent_id | string | No | ID of parent comment for replies. When provided, object_id and object_type ar... |
| skip_enrich_url | boolean | No | Whether to skip URL enrichment for this comment |
| skip_push | boolean | No | |
| user | UserRequest | No | |
| user_id | string | No |
AddCommentResponse
interface AddCommentResponse {
comment: CommentResponse;
duration: string;
mention_notifications_created?: number;
notification_created?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The created comment |
| duration | string | Yes | |
| mention_notifications_created | number | No | Number of mention notification activities created for mentioned users |
| notification_created | boolean | No | Whether a notification activity was successfully created |
AddCommentsBatchResponse
interface AddCommentsBatchResponse {
comments: CommentResponse[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | CommentResponse[] | Yes | List of comments added |
| duration | string | Yes |
AddFolderRequest
interface AddFolderRequest {
custom?: Record<string, any>;
name: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Name of the folder |
| custom | Record<string, any> | No | Custom data for the folder |
AddReactionResponse
interface AddReactionResponse {
activity: ActivityResponse;
duration: string;
notification_created?: boolean;
reaction: FeedsReactionResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | |
| duration | string | Yes | |
| reaction | FeedsReactionResponse | Yes | The created reaction |
| notification_created | boolean | No | Whether a notification activity was successfully created |
AggregatedActivityResponse
interface AggregatedActivityResponse {
activities: ActivityResponse[];
activity_count: number;
created_at: number;
group: string;
is_read?: boolean;
is_seen?: boolean;
is_watched?: boolean;
score: number;
updated_at: number;
user_count: number;
user_count_truncated: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | ActivityResponse[] | Yes | List of activities in this aggregation |
| activity_count | number | Yes | Number of activities in this aggregation |
| created_at | number | Yes | When the aggregation was created |
| group | string | Yes | Grouping identifier |
| score | number | Yes | Ranking score for this aggregation |
| updated_at | number | Yes | When the aggregation was last updated |
| user_count | number | Yes | Number of unique users in this aggregation |
| user_count_truncated | boolean | Yes | Whether this activity group has been truncated due to exceeding the group siz... |
| is_read | boolean | No | Whether this aggregated group has been read. Only set for feed groups with no... |
| is_seen | boolean | No | Whether this aggregated group has been seen. Only set for feed groups with no... |
| is_watched | boolean | No |
AggregationConfig
interface AggregationConfig {
activities_sort?: 'created_at_asc' | 'created_at_desc';
format?: string;
score_strategy?: 'sum' | 'max' | 'avg';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities_sort | 'created_at_asc' | 'created_at_desc' | No |
| format | string | No | Format for activity aggregation |
| score_strategy | 'sum' | 'max' | 'avg' |
Attachment
An attachment is a message object that represents a file uploaded by a user.
interface Attachment {
actions?: Action[];
asset_url?: string;
author_icon?: string;
author_link?: string;
author_name?: string;
color?: string;
custom: Record<string, any>;
fallback?: string;
fields?: Field[];
footer?: string;
footer_icon?: string;
giphy?: Images;
image_url?: string;
og_scrape_url?: string;
original_height?: number;
original_width?: number;
pretext?: string;
text?: string;
thumb_url?: string;
title?: string;
title_link?: string;
type?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | Yes | |
| actions | Action[] | No | |
| asset_url | string | No | |
| author_icon | string | No | |
| author_link | string | No | |
| author_name | string | No | |
| color | string | No | |
| fallback | string | No | |
| fields | Field[] | No | |
| footer | string | No | |
| footer_icon | string | No | |
| giphy | Images | No | |
| image_url | string | No | |
| og_scrape_url | string | No | |
| original_height | number | No | |
| original_width | number | No | |
| pretext | string | No | |
| text | string | No | |
| thumb_url | string | No | |
| title | string | No | |
| title_link | string | No | |
| type | string | No | Attachment type (e.g. image, video, url) |
BookmarkFolderResponse
interface BookmarkFolderResponse {
created_at: number;
custom?: Record<string, any>;
id: string;
name: string;
updated_at: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | When the folder was created |
| id | string | Yes | Unique identifier for the folder |
| name | string | Yes | Name of the folder |
| updated_at | number | Yes | When the folder was last updated |
| user | UserResponse | Yes | User who created the folder |
| custom | Record<string, any> | No | Custom data for the folder |
BookmarkResponse
interface BookmarkResponse {
activity: ActivityResponse;
activity_id?: string;
comment?: CommentResponse;
created_at: number;
custom?: Record<string, any>;
folder?: BookmarkFolderResponse;
object_id: string;
object_type: string;
updated_at: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The bookmarked activity (set when object_type is activity) |
| created_at | number | Yes | When the bookmark was created |
| object_id | string | Yes | ID of the bookmarked object |
| object_type | string | Yes | Type of the bookmarked object (activity or comment) |
| updated_at | number | Yes | When the bookmark was last updated |
| user | UserResponse | Yes | User who created the bookmark |
| activity_id | string | No | |
| comment | CommentResponse | No | The bookmarked comment (set when object_type is comment) |
| custom | Record<string, any> | No | Custom data for the bookmark |
| folder | BookmarkFolderResponse | No | Folder containing this bookmark |
CollectionRequest
interface CollectionRequest {
custom: Record<string, any>;
id?: string;
name: string;
user_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | Yes | Custom data for the collection (required, must contain at least one key) |
| name | string | Yes | Name/type of the collection |
| id | string | No | Unique identifier for the collection within its name (optional, will be auto-... |
| user_id | string | No | ID of the user who owns this collection |
CollectionResponse
interface CollectionResponse {
created_at?: number;
custom?: Record<string, any>;
id: string;
name: string;
updated_at?: number;
user_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique identifier for the collection within its name |
| name | string | Yes | Name/type of the collection |
| created_at | number | No | When the collection was created |
| custom | Record<string, any> | No | Custom data for the collection |
| updated_at | number | No | When the collection was last updated |
| user_id | string | No | ID of the user who owns this collection |
CommentResponse
interface CommentResponse {
attachments?: Attachment[];
bookmark_count: number;
confidence_score: number;
controversy_score?: number;
created_at: number;
custom?: Record<string, any>;
deleted_at?: number;
downvote_count: number;
edited_at?: number;
id: string;
latest_reactions?: FeedsReactionResponse[];
mentioned_users: UserResponse[];
moderation?: ModerationV2Response;
object_id: string;
object_type: string;
own_reactions: FeedsReactionResponse[];
parent_id?: string;
reaction_count: number;
reaction_groups?: Record<string, any>;
reply_count: number;
score: number;
status: 'active' | 'deleted' | 'removed' | 'hidden' | 'shadow_blocked';
text?: string;
updated_at: number;
upvote_count: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_count | number | Yes | |
| confidence_score | number | Yes | Confidence score of the comment |
| created_at | number | Yes | When the comment was created |
| downvote_count | number | Yes | Number of downvotes for this comment |
| id | string | Yes | Unique identifier for the comment |
| mentioned_users | UserResponse[] | Yes | Users mentioned in the comment |
| object_id | string | Yes | ID of the object this comment is associated with |
| object_type | string | Yes | Type of the object this comment is associated with |
| own_reactions | FeedsReactionResponse[] | Yes | Current user's reactions to this activity |
| reaction_count | number | Yes | Number of reactions to this comment |
| reply_count | number | Yes | Number of replies to this comment |
| score | number | Yes | Score of the comment based on reactions |
| status | 'active' | 'deleted' | 'removed' |
| updated_at | number | Yes | When the comment was last updated |
| upvote_count | number | Yes | Number of upvotes for this comment |
| user | UserResponse | Yes | User who created the comment |
| attachments | Attachment[] | No | Attachments associated with the comment |
| controversy_score | number | No | Controversy score of the comment |
| custom | Record<string, any> | No | Custom data for the comment |
| deleted_at | number | No | When the comment was deleted |
| edited_at | number | No | When the comment was last edited |
| latest_reactions | FeedsReactionResponse[] | No | Recent reactions to the comment |
| moderation | ModerationV2Response | No | Moderation details for the comment |
| parent_id | string | No | ID of parent comment for nested replies |
| reaction_groups | Record<string, any> | No | Grouped reactions by type |
| text | string | No | Text content of the comment |
CreateCollectionsResponse
interface CreateCollectionsResponse {
collections: CollectionResponse[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | CollectionResponse[] | Yes | List of created collections |
| duration | string | Yes |
CreateFeedGroupResponse
interface CreateFeedGroupResponse {
duration: string;
feed_group: FeedGroupResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_group | FeedGroupResponse | Yes | The upserted feed group |
CreateFeedViewResponse
interface CreateFeedViewResponse {
duration: string;
feed_view: FeedViewResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_view | FeedViewResponse | Yes | The created feed view |
CreateFeedsBatchResponse
interface CreateFeedsBatchResponse {
duration: string;
feeds: FeedResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feeds | FeedResponse[] | Yes | List of created feeds |
CreateMembershipLevelResponse
interface CreateMembershipLevelResponse {
duration: string;
membership_level: MembershipLevelResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| membership_level | MembershipLevelResponse | Yes | The created membership level |
DailyMetricStatsResponse
interface DailyMetricStatsResponse {
daily: DailyMetricResponse[];
total: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| daily | DailyMetricResponse[] | Yes | Array of daily metric values |
| total | number | Yes | Total value across all days in the date range |
Data
interface Data {
id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes |
DeleteActivitiesResponse
interface DeleteActivitiesResponse {
deleted_ids: string[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| deleted_ids | string[] | Yes | List of activity IDs that were successfully deleted |
| duration | string | Yes |
DeleteActivityReactionResponse
interface DeleteActivityReactionResponse {
activity: ActivityResponse;
duration: string;
reaction: FeedsReactionResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | |
| duration | string | Yes | |
| reaction | FeedsReactionResponse | Yes |
DeleteActivityResponse
interface DeleteActivityResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteBookmarkFolderResponse
interface DeleteBookmarkFolderResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteBookmarkResponse
interface DeleteBookmarkResponse {
bookmark: BookmarkResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The deleted bookmark |
| duration | string | Yes |
DeleteCollectionsResponse
interface DeleteCollectionsResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteCommentBookmarkResponse
interface DeleteCommentBookmarkResponse {
bookmark: BookmarkResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The deleted comment bookmark |
| duration | string | Yes |
DeleteCommentReactionResponse
interface DeleteCommentReactionResponse {
comment: CommentResponse;
duration: string;
reaction: FeedsReactionResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The comment after reaction removal |
| duration | string | Yes | |
| reaction | FeedsReactionResponse | Yes | The removed reaction |
DeleteCommentResponse
interface DeleteCommentResponse {
activity: ActivityResponse;
comment: CommentResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The parent activity |
| comment | CommentResponse | Yes | The deleted comment |
| duration | string | Yes |
DeleteFeedGroupResponse
Basic response information
interface DeleteFeedGroupResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
DeleteFeedResponse
interface DeleteFeedResponse {
duration: string;
task_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | The ID of the async task that will handle feed cleanup and hard deletion |
DeleteFeedUserDataResponse
Response for deleting feed user data
interface DeleteFeedUserDataResponse {
duration: string;
task_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | The task ID for the deletion task |
DeleteFeedViewResponse
interface DeleteFeedViewResponse {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes |
DeleteFeedsBatchResponse
interface DeleteFeedsBatchResponse {
duration: string;
task_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | The ID of the async task that will handle feed cleanup and hard deletion |
EMAUStatsResponse
interface EMAUStatsResponse {
daily: DailyMetricResponse[];
last_30_days: DailyMetricResponse[];
month_to_date: DailyMetricResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| daily | DailyMetricResponse[] | Yes | Per-day unique engaged user counts |
| last_30_days | DailyMetricResponse[] | Yes | Rolling 30-day engaged user count snapshots |
| month_to_date | DailyMetricResponse[] | Yes | Calendar month-to-date engaged user count snapshots |
EnrichmentOptions
Options to skip specific enrichments to improve performance. Default is false (enrichments are included). Setting a field to true skips that enrichment.
interface EnrichmentOptions {
enrich_own_followings?: boolean;
include_score_vars?: boolean;
skip_activity?: boolean;
skip_activity_collections?: boolean;
skip_activity_comments?: boolean;
skip_activity_current_feed?: boolean;
skip_activity_mentioned_users?: boolean;
skip_activity_own_bookmarks?: boolean;
skip_activity_parents?: boolean;
skip_activity_poll?: boolean;
skip_activity_reactions?: boolean;
skip_activity_refresh_image_urls?: boolean;
skip_all?: boolean;
skip_feed_member_user?: boolean;
skip_followers?: boolean;
skip_following?: boolean;
skip_own_capabilities?: boolean;
skip_own_follows?: boolean;
skip_pins?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enrich_own_followings | boolean | No | Default: false. When true, includes fetching and enriching own_followings (fo... |
| include_score_vars | boolean | No | Default: false. When true, includes score_vars in activity responses containi... |
| skip_activity | boolean | No | Default: false. When true, skips all activity enrichments. |
| skip_activity_collections | boolean | No | Default: false. When true, skips enriching collections on activities. |
| skip_activity_comments | boolean | No | Default: false. When true, skips enriching comments on activities. |
| skip_activity_current_feed | boolean | No | Default: false. When true, skips enriching current_feed on activities. Note: ... |
| skip_activity_mentioned_users | boolean | No | Default: false. When true, skips enriching mentioned users on activities. |
| skip_activity_own_bookmarks | boolean | No | Default: false. When true, skips enriching own bookmarks on activities. |
| skip_activity_parents | boolean | No | Default: false. When true, skips enriching parent activities. |
| skip_activity_poll | boolean | No | Default: false. When true, skips enriching poll data on activities. |
| skip_activity_reactions | boolean | No | Default: false. When true, skips fetching and enriching latest and own reacti... |
| skip_activity_refresh_image_urls | boolean | No | Default: false. When true, skips refreshing image URLs on activities. |
| skip_all | boolean | No | Default: false. When true, skips all enrichments. |
| skip_feed_member_user | boolean | No | Default: false. When true, skips enriching user data on feed members. |
| skip_followers | boolean | No | Default: false. When true, skips fetching and enriching followers. Note: If f... |
| skip_following | boolean | No | Default: false. When true, skips fetching and enriching following. Note: If f... |
| skip_own_capabilities | boolean | No | Default: false. When true, skips computing and including capabilities for feeds. |
| skip_own_follows | boolean | No | Default: false. When true, skips fetching and enriching own_follows (follows ... |
| skip_pins | boolean | No | Default: false. When true, skips enriching pinned activities. |
ExportFeedUserDataResponse
Response for exporting feed user data
interface ExportFeedUserDataResponse {
duration: string;
task_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| task_id | string | Yes | The task ID for the export task |
FeedGroupResponse
interface FeedGroupResponse {
activity_processors?: ActivityProcessorConfig[];
activity_selectors?: ActivitySelectorConfigResponse[];
aggregation?: AggregationConfig;
created_at: number;
custom?: Record<string, any>;
default_visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private';
deleted_at?: number;
id: string;
notification?: NotificationConfig;
push_notification?: PushNotificationConfig;
ranking?: RankingConfig;
stories?: StoriesConfig;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | When the feed group was created |
| id | string | Yes | Identifier within the group |
| updated_at | number | Yes | When the feed group was last updated |
| activity_processors | ActivityProcessorConfig[] | No | Configuration for activity processors |
| activity_selectors | ActivitySelectorConfigResponse[] | No | Configuration for activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| custom | Record<string, any> | No | Custom data for the feed group |
| default_visibility | 'public' | 'visible' | 'followers' |
| deleted_at | number | No | |
| notification | NotificationConfig | No | Configuration for notifications |
| push_notification | PushNotificationConfig | No | Configuration for push notifications |
| ranking | RankingConfig | No | Configuration for activity ranking |
| stories | StoriesConfig | No | Configuration for stories feature |
FeedInput
interface FeedInput {
custom?: Record<string, any>;
description?: string;
filter_tags?: string[];
location?: Location;
members?: FeedMemberRequest[];
name?: string;
visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | No | |
| description | string | No | |
| filter_tags | string[] | No | |
| location | Location | No | |
| members | FeedMemberRequest[] | No | |
| name | string | No | |
| visibility | 'public' | 'visible' | 'followers' |
FeedMemberRequest
interface FeedMemberRequest {
custom?: Record<string, any>;
invite?: boolean;
membership_level?: string;
role?: string;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| user_id | string | Yes | ID of the user to add as a member |
| custom | Record<string, any> | No | Custom data for the member |
| invite | boolean | No | Whether this is an invite to become a member |
| membership_level | string | No | ID of the membership level to assign to the member |
| role | string | No | Role of the member in the feed |
FeedMemberResponse
interface FeedMemberResponse {
created_at: number;
custom?: Record<string, any>;
invite_accepted_at?: number;
invite_rejected_at?: number;
membership_level?: MembershipLevelResponse;
role: string;
status: 'member' | 'pending' | 'rejected';
updated_at: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | When the membership was created |
| role | string | Yes | Role of the member in the feed |
| status | 'member' | 'pending' | 'rejected' |
| updated_at | number | Yes | When the membership was last updated |
| user | UserResponse | Yes | User who is a member |
| custom | Record<string, any> | No | Custom data for the membership |
| invite_accepted_at | number | No | When the invite was accepted |
| invite_rejected_at | number | No | When the invite was rejected |
| membership_level | MembershipLevelResponse | No | Membership level assigned to the member |
FeedRequest
interface FeedRequest {
created_by_id?: string;
custom?: Record<string, any>;
description?: string;
feed_group_id: string;
feed_id: string;
filter_tags?: string[];
location?: Location;
members?: FeedMemberRequest[];
name?: string;
visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | ID of the feed group |
| feed_id | string | Yes | ID of the feed |
| created_by_id | string | No | ID of the feed creator |
| custom | Record<string, any> | No | Custom data for the feed |
| description | string | No | Description of the feed |
| filter_tags | string[] | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| members | FeedMemberRequest[] | No | Initial members for the feed |
| name | string | No | Name of the feed |
| visibility | 'public' | 'visible' | 'followers' |
FeedResponse
interface FeedResponse {
activity_count: number;
created_at: number;
created_by: UserResponse;
custom?: Record<string, any>;
deleted_at?: number;
description: string;
feed: string;
filter_tags?: string[];
follower_count: number;
following_count: number;
group_id: string;
id: string;
location?: Location;
member_count: number;
name: string;
own_capabilities?: FeedOwnCapability[];
own_followings?: FollowResponse[];
own_follows?: FollowResponse[];
own_membership?: FeedMemberResponse;
pin_count: number;
updated_at: number;
visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_count | number | Yes | |
| created_at | number | Yes | When the feed was created |
| created_by | UserResponse | Yes | User who created the feed |
| description | string | Yes | Description of the feed |
| feed | string | Yes | Fully qualified feed ID (group_id:id) |
| follower_count | number | Yes | Number of followers of this feed |
| following_count | number | Yes | Number of feeds this feed follows |
| group_id | string | Yes | Group this feed belongs to |
| id | string | Yes | Unique identifier for the feed |
| member_count | number | Yes | Number of members in this feed |
| name | string | Yes | Name of the feed |
| pin_count | number | Yes | Number of pinned activities in this feed |
| updated_at | number | Yes | When the feed was last updated |
| custom | Record<string, any> | No | Custom data for the feed |
| deleted_at | number | No | When the feed was deleted |
| filter_tags | string[] | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| own_capabilities | FeedOwnCapability[] | No | Capabilities the current user has for this feed |
| own_followings | FollowResponse[] | No | Follow relationships where the feed owner’s feeds are following the current... |
| own_follows | FollowResponse[] | No | Follow relationships where the current user's feeds are following this feed |
| own_membership | FeedMemberResponse | No | Membership information for the current user in this feed |
| visibility | 'public' | 'visible' | 'followers' |
FeedSuggestionResponse
interface FeedSuggestionResponse {
activity_count: number;
algorithm_scores?: Record<string, any>;
created_at: number;
created_by: UserResponse;
custom?: Record<string, any>;
deleted_at?: number;
description: string;
feed: string;
filter_tags?: string[];
follower_count: number;
following_count: number;
group_id: string;
id: string;
location?: Location;
member_count: number;
name: string;
own_capabilities?: FeedOwnCapability[];
own_followings?: FollowResponse[];
own_follows?: FollowResponse[];
own_membership?: FeedMemberResponse;
pin_count: number;
reason?: string;
recommendation_score?: number;
updated_at: number;
visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_count | number | Yes | |
| created_at | number | Yes | When the feed was created |
| created_by | UserResponse | Yes | User who created the feed |
| description | string | Yes | Description of the feed |
| feed | string | Yes | Fully qualified feed ID (group_id:id) |
| follower_count | number | Yes | Number of followers of this feed |
| following_count | number | Yes | Number of feeds this feed follows |
| group_id | string | Yes | Group this feed belongs to |
| id | string | Yes | Unique identifier for the feed |
| member_count | number | Yes | Number of members in this feed |
| name | string | Yes | Name of the feed |
| pin_count | number | Yes | Number of pinned activities in this feed |
| updated_at | number | Yes | When the feed was last updated |
| algorithm_scores | Record<string, any> | No | |
| custom | Record<string, any> | No | Custom data for the feed |
| deleted_at | number | No | When the feed was deleted |
| filter_tags | string[] | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| own_capabilities | FeedOwnCapability[] | No | Capabilities the current user has for this feed |
| own_followings | FollowResponse[] | No | Follow relationships where the feed owner’s feeds are following the current... |
| own_follows | FollowResponse[] | No | Follow relationships where the current user's feeds are following this feed |
| own_membership | FeedMemberResponse | No | Membership information for the current user in this feed |
| reason | string | No | |
| recommendation_score | number | No | |
| visibility | 'public' | 'visible' | 'followers' |
FeedViewResponse
interface FeedViewResponse {
activity_selectors?: ActivitySelectorConfigResponse[];
aggregation?: AggregationConfig;
id: string;
last_used_at?: number;
ranking?: RankingConfig;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique identifier for the custom feed view |
| activity_selectors | ActivitySelectorConfigResponse[] | No | Configured activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| last_used_at | number | No | When the feed view was last used |
| ranking | RankingConfig | No | Configuration for activity ranking |
FeedVisibilityResponse
interface FeedVisibilityResponse {
grants: Record<string, any>;
name: string;
permissions: Permission[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| grants | Record<string, any> | Yes | Permission grants for each role |
| name | string | Yes | Name of the feed visibility level |
| permissions | Permission[] | Yes | List of permission policies |
FeedsReactionResponse
interface FeedsReactionResponse {
activity_id: string;
comment_id?: string;
created_at: number;
custom?: Record<string, any>;
type: string;
updated_at: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | ID of the activity that was reacted to |
| created_at | number | Yes | When the reaction was created |
| type | string | Yes | Type of reaction |
| updated_at | number | Yes | When the reaction was last updated |
| user | UserResponse | Yes | User who created the reaction |
| comment_id | string | No | ID of the comment that was reacted to |
| custom | Record<string, any> | No | Custom data for the reaction |
Field
interface Field {
short: boolean;
title: string;
value: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | boolean | Yes | |
| title | string | Yes | |
| value | string | Yes |
FollowBatchResponse
interface FollowBatchResponse {
created: FollowResponse[];
duration: string;
follows: FollowResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created | FollowResponse[] | Yes | List of newly created follow relationships |
| duration | string | Yes | |
| follows | FollowResponse[] | Yes | List of current follow relationships |
FollowRequest
interface FollowRequest {
activity_copy_limit?: number;
copy_custom_to_notification?: boolean;
create_notification_activity?: boolean;
create_users?: boolean;
custom?: Record<string, any>;
enrich_own_fields?: boolean;
push_preference?: 'all' | 'none';
skip_push?: boolean;
source: string;
status?: 'accepted' | 'pending' | 'rejected';
target: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | Fully qualified ID of the source feed |
| target | string | Yes | Fully qualified ID of the target feed |
| activity_copy_limit | number | No | Maximum number of historical activities to copy from the target feed when the... |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | boolean | No | Whether to create a notification activity for this follow |
| create_users | boolean | No | If true, auto-creates users referenced by the source and target FIDs when the... |
| custom | Record<string, any> | No | Custom data for the follow relationship |
| enrich_own_fields | boolean | No | If true, enriches the follow's source_feed and target_feed with own_* fields ... |
| push_preference | 'all' | 'none' | No |
| skip_push | boolean | No | Whether to skip push for this follow |
| status | 'accepted' | 'pending' | 'rejected' |
FollowResponse
interface FollowResponse {
created_at: number;
custom?: Record<string, any>;
follower_role: string;
push_preference: 'all' | 'none';
request_accepted_at?: number;
request_rejected_at?: number;
source_feed: FeedResponse;
status: 'accepted' | 'pending' | 'rejected';
target_feed: FeedResponse;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | When the follow relationship was created |
| follower_role | string | Yes | Role of the follower (source user) in the follow relationship |
| push_preference | 'all' | 'none' | Yes |
| source_feed | FeedResponse | Yes | Source feed object |
| status | 'accepted' | 'pending' | 'rejected' |
| target_feed | FeedResponse | Yes | Target feed object |
| updated_at | number | Yes | When the follow relationship was last updated |
| custom | Record<string, any> | No | Custom data for the follow relationship |
| request_accepted_at | number | No | When the follow request was accepted |
| request_rejected_at | number | No | When the follow request was rejected |
FriendReactionsOptions
Options to control fetching reactions from friends (users you follow or have mutual follows with).
interface FriendReactionsOptions {
enabled?: boolean;
limit?: number;
type?: 'following' | 'mutual';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | No | Default: false. When true, fetches friend reactions for activities. |
| limit | number | No | Default: 3, Max: 10. The maximum number of friend reactions to return per act... |
| type | 'following' | 'mutual' | No |
GetActivityResponse
interface GetActivityResponse {
activity: ActivityResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The requested activity |
| duration | string | Yes |
GetCommentRepliesResponse
interface GetCommentRepliesResponse {
comments: ThreadedCommentResponse[];
duration: string;
next?: string;
prev?: string;
sort: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | ThreadedCommentResponse[] | Yes | Threaded listing of replies to the comment |
| duration | string | Yes | |
| sort | string | Yes | Sort order used for the replies (first, last, top, best, controversial) |
| next | string | No | |
| prev | string | No |
GetCommentResponse
interface GetCommentResponse {
comment: CommentResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | Comment |
| duration | string | Yes |
GetCommentsResponse
interface GetCommentsResponse {
comments: ThreadedCommentResponse[];
duration: string;
next?: string;
prev?: string;
sort: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | ThreadedCommentResponse[] | Yes | Threaded listing for the activity |
| duration | string | Yes | |
| sort | string | Yes | Sort order used for the comments (first, last, top, best, controversial) |
| next | string | No | |
| prev | string | No |
GetFeedGroupResponse
interface GetFeedGroupResponse {
duration: string;
feed_group: FeedGroupResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_group | FeedGroupResponse | Yes | The requested feed group |
GetFeedViewResponse
interface GetFeedViewResponse {
duration: string;
feed_view: FeedViewResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_view | FeedViewResponse | Yes | The requested feed view |
GetFeedVisibilityResponse
interface GetFeedVisibilityResponse {
duration: string;
feed_visibility: FeedVisibilityResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_visibility | FeedVisibilityResponse | Yes | Feed visibility configuration and permissions |
GetFeedsRateLimitsResponse
interface GetFeedsRateLimitsResponse {
android?: Record<string, any>;
duration: string;
ios?: Record<string, any>;
server_side?: Record<string, any>;
web?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| android | Record<string, any> | No | Rate limits for Android platform (endpoint name -> limit info) |
| ios | Record<string, any> | No | Rate limits for iOS platform (endpoint name -> limit info) |
| server_side | Record<string, any> | No | Rate limits for server-side platform (endpoint name -> limit info) |
| web | Record<string, any> | No | Rate limits for Web platform (endpoint name -> limit info) |
GetFollowSuggestionsResponse
interface GetFollowSuggestionsResponse {
algorithm_used?: string;
duration: string;
suggestions: FeedSuggestionResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| suggestions | FeedSuggestionResponse[] | Yes | List of suggested feeds to follow |
| algorithm_used | string | No |
GetOrCreateFeedGroupResponse
interface GetOrCreateFeedGroupResponse {
duration: string;
feed_group: FeedGroupResponse;
was_created: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_group | FeedGroupResponse | Yes | The feed group that was retrieved or created |
| was_created | boolean | Yes | Indicates whether the feed group was created (true) or already existed (false) |
GetOrCreateFeedResponse
Basic response information
interface GetOrCreateFeedResponse {
activities: ActivityResponse[];
aggregated_activities: AggregatedActivityResponse[];
created: boolean;
duration: string;
feed: FeedResponse;
followers: FollowResponse[];
followers_pagination?: PagerResponse;
following: FollowResponse[];
following_pagination?: PagerResponse;
member_pagination?: PagerResponse;
members: FeedMemberResponse[];
next?: string;
notification_status?: NotificationStatusResponse;
pinned_activities: ActivityPinResponse[];
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | ActivityResponse[] | Yes | |
| aggregated_activities | AggregatedActivityResponse[] | Yes | |
| created | boolean | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| feed | FeedResponse | Yes | |
| followers | FollowResponse[] | Yes | |
| following | FollowResponse[] | Yes | |
| members | FeedMemberResponse[] | Yes | |
| pinned_activities | ActivityPinResponse[] | Yes | |
| followers_pagination | PagerResponse | No | |
| following_pagination | PagerResponse | No | |
| member_pagination | PagerResponse | No | |
| next | string | No | |
| notification_status | NotificationStatusResponse | No | |
| prev | string | No |
GetOrCreateFeedViewResponse
interface GetOrCreateFeedViewResponse {
duration: string;
feed_view: FeedViewResponse;
was_created: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_view | FeedViewResponse | Yes | The feed view (either existing or newly created) |
| was_created | boolean | Yes | Indicates whether the feed view was newly created (true) or already existed (... |
Images
interface Images {
fixed_height: ImageData;
fixed_height_downsampled: ImageData;
fixed_height_still: ImageData;
fixed_width: ImageData;
fixed_width_downsampled: ImageData;
fixed_width_still: ImageData;
original: ImageData;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| fixed_height | ImageData | Yes | |
| fixed_height_downsampled | ImageData | Yes | |
| fixed_height_still | ImageData | Yes | |
| fixed_width | ImageData | Yes | |
| fixed_width_downsampled | ImageData | Yes | |
| fixed_width_still | ImageData | Yes | |
| original | ImageData | Yes |
ListFeedGroupsResponse
Basic response information
interface ListFeedGroupsResponse {
duration: string;
groups: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| groups | Record<string, any> | Yes |
ListFeedViewsResponse
interface ListFeedViewsResponse {
duration: string;
views: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| views | Record<string, any> | Yes | Map of feed view ID to feed view |
ListFeedVisibilitiesResponse
interface ListFeedVisibilitiesResponse {
duration: string;
feed_visibilities: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_visibilities | Record<string, any> | Yes | Map of feed visibility configurations by name |
Location
interface Location {
lat: number;
lng: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| lat | number | Yes | Latitude coordinate |
| lng | number | Yes | Longitude coordinate |
MembershipLevelResponse
interface MembershipLevelResponse {
created_at: number;
custom?: Record<string, any>;
description?: string;
id: string;
name: string;
priority: number;
tags: string[];
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | When the membership level was created |
| id | string | Yes | Unique identifier for the membership level |
| name | string | Yes | Display name for the membership level |
| priority | number | Yes | Priority level |
| tags | string[] | Yes | Activity tags this membership level gives access to |
| updated_at | number | Yes | When the membership level was last updated |
| custom | Record<string, any> | No | Custom data for the membership level |
| description | string | No | Description of the membership level |
NotificationConfig
interface NotificationConfig {
deduplication_window?: string;
track_read?: boolean;
track_seen?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| deduplication_window | string | No | Time window for deduplicating notification activities (reactions and follows)... |
| track_read | boolean | No | Whether to track read status |
| track_seen | boolean | No | Whether to track seen status |
NotificationStatusResponse
interface NotificationStatusResponse {
last_read_at?: number;
last_seen_at?: number;
read_activities?: string[];
seen_activities?: string[];
unread: number;
unseen: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| unread | number | Yes | Number of unread notifications |
| unseen | number | Yes | Number of unseen notifications |
| last_read_at | number | No | When notifications were last read |
| last_seen_at | number | No | When notifications were last seen |
| read_activities | string[] | No | Deprecated: use is_read on each activity/group instead. IDs of activities tha... |
| seen_activities | string[] | No | Deprecated: use is_seen on each activity/group instead. IDs of activities tha... |
OwnBatchResponse
interface OwnBatchResponse {
data: Record<string, any>;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| data | Record<string, any> | Yes | Map of feed ID to own fields data |
| duration | string | Yes |
PagerRequest
interface PagerRequest {
limit?: number;
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | number | No | |
| next | string | No | |
| prev | string | No |
PagerResponse
interface PagerResponse {
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| next | string | No | |
| prev | string | No |
PinActivityResponse
interface PinActivityResponse {
activity: ActivityResponse;
created_at: number;
duration: string;
feed: string;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The pinned activity |
| created_at | number | Yes | When the activity was pinned |
| duration | string | Yes | |
| feed | string | Yes | Fully qualified ID of the feed the activity was pinned to |
| user_id | string | Yes | ID of the user who pinned the activity |
PollResponseData
interface PollResponseData {
allow_answers: boolean;
allow_user_suggested_options: boolean;
answers_count: number;
created_at: number;
created_by?: UserResponse;
created_by_id: string;
custom: Record<string, any>;
description: string;
enforce_unique_vote: boolean;
id: string;
is_closed?: boolean;
latest_answers: PollVoteResponseData[];
latest_votes_by_option: Record<string, any>;
max_votes_allowed?: number;
name: string;
options: PollOptionResponseData[];
own_votes: PollVoteResponseData[];
updated_at: number;
vote_count: number;
vote_counts_by_option: Record<string, any>;
voting_visibility: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | boolean | Yes | |
| allow_user_suggested_options | boolean | Yes | |
| answers_count | number | Yes | |
| created_at | number | Yes | |
| created_by_id | string | Yes | |
| custom | Record<string, any> | Yes | |
| description | string | Yes | |
| enforce_unique_vote | boolean | Yes | |
| id | string | Yes | |
| latest_answers | PollVoteResponseData[] | Yes | |
| latest_votes_by_option | Record<string, any> | Yes | |
| name | string | Yes | |
| options | PollOptionResponseData[] | Yes | |
| own_votes | PollVoteResponseData[] | Yes | |
| updated_at | number | Yes | |
| vote_count | number | Yes | |
| vote_counts_by_option | Record<string, any> | Yes | |
| voting_visibility | string | Yes | |
| created_by | UserResponse | No | |
| is_closed | boolean | No | |
| max_votes_allowed | number | No |
PollVoteResponse
interface PollVoteResponse {
duration: string;
poll?: PollResponseData;
vote?: PollVoteResponseData;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| poll | PollResponseData | No | Poll |
| vote | PollVoteResponseData | No | Poll vote |
PollVoteResponseData
interface PollVoteResponseData {
answer_text?: string;
created_at: number;
id: string;
is_answer?: boolean;
option_id: string;
poll_id: string;
updated_at: number;
user?: UserResponse;
user_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | number | Yes | |
| id | string | Yes | |
| option_id | string | Yes | |
| poll_id | string | Yes | |
| updated_at | number | Yes | |
| answer_text | string | No | |
| is_answer | boolean | No | |
| user | UserResponse | No | |
| user_id | string | No |
PrivacySettingsResponse
interface PrivacySettingsResponse {
delivery_receipts?: DeliveryReceiptsResponse;
read_receipts?: ReadReceiptsResponse;
typing_indicators?: TypingIndicatorsResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
PushNotificationConfig
interface PushNotificationConfig {
enable_push?: boolean;
push_types?: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enable_push | boolean | No | Whether push notifications are enabled for this feed group |
| push_types | string[] | No | List of notification types that should trigger push notifications (e.g., foll... |
QueryActivitiesResponse
interface QueryActivitiesResponse {
activities: ActivityResponse[];
duration: string;
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | ActivityResponse[] | Yes | List of activities matching the query |
| duration | string | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryActivityReactionsResponse
Basic response information
interface QueryActivityReactionsResponse {
duration: string;
next?: string;
prev?: string;
reactions: FeedsReactionResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| reactions | FeedsReactionResponse[] | Yes | |
| next | string | No | |
| prev | string | No |
QueryBookmarkFoldersResponse
interface QueryBookmarkFoldersResponse {
bookmark_folders: BookmarkFolderResponse[];
duration: string;
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_folders | BookmarkFolderResponse[] | Yes | List of bookmark folders matching the query |
| duration | string | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryBookmarksResponse
interface QueryBookmarksResponse {
bookmarks: BookmarkResponse[];
duration: string;
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmarks | BookmarkResponse[] | Yes | List of bookmarks matching the query |
| duration | string | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryCollectionsResponse
interface QueryCollectionsResponse {
collections: CollectionResponse[];
duration: string;
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | CollectionResponse[] | Yes | List of collections matching the query |
| duration | string | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryCommentReactionsResponse
Basic response information
interface QueryCommentReactionsResponse {
duration: string;
next?: string;
prev?: string;
reactions: FeedsReactionResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
| reactions | FeedsReactionResponse[] | Yes | |
| next | string | No | |
| prev | string | No |
QueryCommentsResponse
interface QueryCommentsResponse {
comments: CommentResponse[];
duration: string;
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | CommentResponse[] | Yes | List of comments matching the query |
| duration | string | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryFeedMembersResponse
interface QueryFeedMembersResponse {
duration: string;
members: FeedMemberResponse[];
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| members | FeedMemberResponse[] | Yes | List of feed members |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryFeedsResponse
interface QueryFeedsResponse {
duration: string;
feeds: FeedResponse[];
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feeds | FeedResponse[] | Yes | List of feeds matching the query |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryFeedsUsageStatsResponse
interface QueryFeedsUsageStatsResponse {
activities: DailyMetricStatsResponse;
api_requests: DailyMetricStatsResponse;
duration: string;
emau?: EMAUStatsResponse;
follows: DailyMetricStatsResponse;
openai_requests: DailyMetricStatsResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | DailyMetricStatsResponse | Yes | Activities statistics with daily breakdown and total |
| api_requests | DailyMetricStatsResponse | Yes | API requests statistics with daily breakdown and total |
| duration | string | Yes | |
| follows | DailyMetricStatsResponse | Yes | Follows statistics with daily breakdown and total |
| openai_requests | DailyMetricStatsResponse | Yes | OpenAI requests statistics with daily breakdown and total |
| emau | EMAUStatsResponse | No | Engaged Monthly Active Users snapshots within the requested date range. Omitt... |
QueryFollowsResponse
interface QueryFollowsResponse {
duration: string;
follows: FollowResponse[];
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follows | FollowResponse[] | Yes | List of follow relationships matching the query |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryMembershipLevelsResponse
interface QueryMembershipLevelsResponse {
duration: string;
membership_levels: MembershipLevelResponse[];
next?: string;
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| membership_levels | MembershipLevelResponse[] | Yes | |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
QueryPinnedActivitiesResponse
interface QueryPinnedActivitiesResponse {
duration: string;
next?: string;
pinned_activities: ActivityPinResponse[];
prev?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| pinned_activities | ActivityPinResponse[] | Yes | List of pinned activities matching the query |
| next | string | No | Cursor for next page |
| prev | string | No | Cursor for previous page |
RankingConfig
interface RankingConfig {
defaults?: Record<string, any>;
functions?: Record<string, any>;
score?: string;
type: 'expression' | 'interest';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | 'expression' | 'interest' | Yes |
| defaults | Record<string, any> | No | Default values for ranking |
| functions | Record<string, any> | No | Decay functions configuration |
| score | string | No | Scoring formula. Required when type is 'expression' or 'interest' |
Reaction
interface Reaction {
activity_id: string;
children_counts?: Record<string, any>;
created_at: number;
data?: Record<string, any>;
deleted_at?: number;
id?: string;
kind: string;
latest_children?: Record<string, any>;
moderation?: Record<string, any>;
own_children?: Record<string, any>;
parent?: string;
score?: number;
target_feeds?: string[];
target_feeds_extra_data?: Record<string, any>;
updated_at: number;
user?: User;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | |
| created_at | number | Yes | |
| kind | string | Yes | |
| updated_at | number | Yes | |
| user_id | string | Yes | |
| children_counts | Record<string, any> | No | |
| data | Record<string, any> | No | |
| deleted_at | number | No | |
| id | string | No | |
| latest_children | Record<string, any> | No | |
| moderation | Record<string, any> | No | |
| own_children | Record<string, any> | No | |
| parent | string | No | |
| score | number | No | |
| target_feeds | string[] | No | |
| target_feeds_extra_data | Record<string, any> | No | |
| user | User | No |
ReadCollectionsResponse
interface ReadCollectionsResponse {
collections: CollectionResponse[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | CollectionResponse[] | Yes | List of collections matching the references |
| duration | string | Yes |
RejectFeedMemberInviteResponse
interface RejectFeedMemberInviteResponse {
duration: string;
member: FeedMemberResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| member | FeedMemberResponse | Yes | The feed member after rejecting the invite |
RejectFollowResponse
interface RejectFollowResponse {
duration: string;
follow: FollowResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | The rejected follow relationship |
Response
Basic response information
interface Response {
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | Duration of the request in milliseconds |
RestoreActivityResponse
interface RestoreActivityResponse {
activity: ActivityResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The restored activity with full enrichment |
| duration | string | Yes |
RestoreCommentResponse
interface RestoreCommentResponse {
activity: ActivityResponse;
comment: CommentResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The parent activity with updated counts |
| comment | CommentResponse | Yes | The restored comment |
| duration | string | Yes |
RestoreFeedGroupResponse
interface RestoreFeedGroupResponse {
duration: string;
feed_group: FeedGroupResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_group | FeedGroupResponse | Yes | The restored feed group |
SingleFollowResponse
interface SingleFollowResponse {
duration: string;
follow: FollowResponse;
notification_created?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | The created follow relationship |
| notification_created | boolean | No | Whether a notification activity was successfully created |
SortParamRequest
interface SortParamRequest {
direction?: number;
field?: string;
type?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | number | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One o... |
| field | string | No | Name of field to sort by |
| type | string | No | Type of field to sort by. Empty string or omitted means string type (default)... |
StoriesConfig
interface StoriesConfig {
skip_watched?: boolean;
track_watched?: boolean;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| skip_watched | boolean | No | Whether to skip already watched stories |
| track_watched | boolean | No | Whether to track watched status for stories |
ThreadedCommentResponse
A comment with an optional, depth‑limited slice of nested replies.
interface ThreadedCommentResponse {
attachments?: Attachment[];
bookmark_count: number;
confidence_score: number;
controversy_score?: number;
created_at: number;
custom?: Record<string, any>;
deleted_at?: number;
downvote_count: number;
edited_at?: number;
id: string;
latest_reactions?: FeedsReactionResponse[];
mentioned_users: UserResponse[];
meta?: RepliesMeta;
moderation?: ModerationV2Response;
object_id: string;
object_type: string;
own_reactions: FeedsReactionResponse[];
parent_id?: string;
reaction_count: number;
reaction_groups?: Record<string, any>;
replies?: ThreadedCommentResponse[];
reply_count: number;
score: number;
status: 'active' | 'deleted' | 'removed' | 'hidden' | 'shadow_blocked';
text?: string;
updated_at: number;
upvote_count: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_count | number | Yes | |
| confidence_score | number | Yes | |
| created_at | number | Yes | |
| downvote_count | number | Yes | |
| id | string | Yes | |
| mentioned_users | UserResponse[] | Yes | |
| object_id | string | Yes | |
| object_type | string | Yes | |
| own_reactions | FeedsReactionResponse[] | Yes | |
| reaction_count | number | Yes | |
| reply_count | number | Yes | |
| score | number | Yes | |
| status | 'active' | 'deleted' | 'removed' |
| updated_at | number | Yes | |
| upvote_count | number | Yes | |
| user | UserResponse | Yes | |
| attachments | Attachment[] | No | |
| controversy_score | number | No | |
| custom | Record<string, any> | No | |
| deleted_at | number | No | |
| edited_at | number | No | |
| latest_reactions | FeedsReactionResponse[] | No | |
| meta | RepliesMeta | No | Pagination & depth info for this node's direct replies. |
| moderation | ModerationV2Response | No | |
| parent_id | string | No | |
| reaction_groups | Record<string, any> | No | |
| replies | ThreadedCommentResponse[] | No | Slice of nested comments (may be empty). |
| text | string | No |
Time
interface Time {
}TrackActivityMetricsEvent
A single metric event to track for an activity
interface TrackActivityMetricsEvent {
activity_id: string;
delta?: number;
metric: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | The ID of the activity to track the metric for |
| metric | string | Yes | The metric name (e.g. views, clicks, impressions). Alphanumeric and underscor... |
| delta | number | No | The amount to increment (positive) or decrement (negative). Defaults to 1. Th... |
TrackActivityMetricsEventResult
Result of tracking a single metric event
interface TrackActivityMetricsEventResult {
activity_id: string;
allowed: boolean;
error?: string;
metric: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | The activity ID from the request |
| allowed | boolean | Yes | Whether the metric was counted (false if rate-limited) |
| metric | string | Yes | The metric name from the request |
| error | string | No | Error message if processing failed |
TrackActivityMetricsResponse
Response containing results for each tracked metric event
interface TrackActivityMetricsResponse {
duration: string;
results: TrackActivityMetricsEventResult[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| results | TrackActivityMetricsEventResult[] | Yes | Results for each event in the request, in the same order |
UnfollowBatchResponse
interface UnfollowBatchResponse {
duration: string;
follows: FollowResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follows | FollowResponse[] | Yes | List of follow relationships that were removed |
UnfollowPair
interface UnfollowPair {
keep_history?: boolean;
source: string;
target: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | Fully qualified ID of the source feed |
| target | string | Yes | Fully qualified ID of the target feed |
| keep_history | boolean | No | When true, activities from the unfollowed feed will remain in the source feed... |
UnfollowResponse
interface UnfollowResponse {
duration: string;
follow: FollowResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | The deleted follow relationship |
UnpinActivityResponse
interface UnpinActivityResponse {
activity: ActivityResponse;
duration: string;
feed: string;
user_id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The unpinned activity |
| duration | string | Yes | |
| feed | string | Yes | Fully qualified ID of the feed the activity was unpinned from |
| user_id | string | Yes | ID of the user who unpinned the activity |
UpdateActivitiesPartialBatchResponse
interface UpdateActivitiesPartialBatchResponse {
activities: ActivityResponse[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | ActivityResponse[] | Yes | List of successfully updated activities |
| duration | string | Yes |
UpdateActivityPartialChangeRequest
interface UpdateActivityPartialChangeRequest {
activity_id: string;
copy_custom_to_notification?: boolean;
handle_mention_notifications?: boolean;
set?: Record<string, any>;
unset?: string[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | ID of the activity to update |
| copy_custom_to_notification | boolean | No | Whether to copy custom data to the notification activity (only applies when h... |
| handle_mention_notifications | boolean | No | When true and 'mentioned_user_ids' is updated, automatically creates or delet... |
| set | Record<string, any> | No | Map of field names to new values. Supported fields: 'text', 'attachments', 'c... |
| unset | string[] | No | List of field names to remove. Supported fields: 'custom', 'location', 'expir... |
UpdateActivityPartialResponse
interface UpdateActivityPartialResponse {
activity: ActivityResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The updated activity |
| duration | string | Yes |
UpdateActivityResponse
interface UpdateActivityResponse {
activity: ActivityResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The updated activity |
| duration | string | Yes |
UpdateBookmarkFolderResponse
interface UpdateBookmarkFolderResponse {
bookmark_folder: BookmarkFolderResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_folder | BookmarkFolderResponse | Yes | The updated bookmark folder |
| duration | string | Yes |
UpdateBookmarkResponse
interface UpdateBookmarkResponse {
bookmark: BookmarkResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The updated bookmark |
| duration | string | Yes |
UpdateCollectionRequest
interface UpdateCollectionRequest {
custom: Record<string, any>;
id: string;
name: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | Yes | Custom data for the collection (required, must contain at least one key) |
| id | string | Yes | Unique identifier for the collection within its name |
| name | string | Yes | Name/type of the collection |
UpdateCollectionsResponse
interface UpdateCollectionsResponse {
collections: CollectionResponse[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | CollectionResponse[] | Yes | List of updated collections |
| duration | string | Yes |
UpdateCommentBookmarkResponse
interface UpdateCommentBookmarkResponse {
bookmark: BookmarkResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The updated comment bookmark |
| duration | string | Yes |
UpdateCommentPartialResponse
interface UpdateCommentPartialResponse {
comment: CommentResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The updated comment |
| duration | string | Yes |
UpdateCommentResponse
interface UpdateCommentResponse {
comment: CommentResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The updated comment |
| duration | string | Yes |
UpdateFeedGroupResponse
interface UpdateFeedGroupResponse {
duration: string;
feed_group: FeedGroupResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_group | FeedGroupResponse | Yes | The updated feed group |
UpdateFeedMembersResponse
Basic response information
interface UpdateFeedMembersResponse {
added: FeedMemberResponse[];
duration: string;
removed_ids: string[];
updated: FeedMemberResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| added | FeedMemberResponse[] | Yes | |
| duration | string | Yes | Duration of the request in milliseconds |
| removed_ids | string[] | Yes | |
| updated | FeedMemberResponse[] | Yes |
UpdateFeedResponse
interface UpdateFeedResponse {
duration: string;
feed: FeedResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed | FeedResponse | Yes | The updated feed |
UpdateFeedViewResponse
interface UpdateFeedViewResponse {
duration: string;
feed_view: FeedViewResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_view | FeedViewResponse | Yes | The updated feed view |
UpdateFeedVisibilityResponse
interface UpdateFeedVisibilityResponse {
duration: string;
feed_visibility: FeedVisibilityResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feed_visibility | FeedVisibilityResponse | Yes | Feed visibility configuration and permissions |
UpdateFollowResponse
interface UpdateFollowResponse {
duration: string;
follow: FollowResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | Details of the updated follow relationship |
UpdateMembershipLevelResponse
interface UpdateMembershipLevelResponse {
duration: string;
membership_level: MembershipLevelResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| membership_level | MembershipLevelResponse | Yes | The updated membership level |
UpsertActivitiesResponse
interface UpsertActivitiesResponse {
activities: ActivityResponse[];
duration: string;
mention_notifications_created?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | ActivityResponse[] | Yes | List of created or updated activities |
| duration | string | Yes | |
| mention_notifications_created | number | No | Total number of mention notification activities created for mentioned users a... |
UpsertCollectionsResponse
interface UpsertCollectionsResponse {
collections: CollectionResponse[];
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | CollectionResponse[] | Yes | List of upserted collections |
| duration | string | Yes |
User
interface User {
data?: Record<string, any>;
id: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | |
| data | Record<string, any> | No |
UserRequest
User request object
interface UserRequest {
custom?: Record<string, any>;
id: string;
image?: string;
invisible?: boolean;
language?: string;
name?: string;
privacy_settings?: PrivacySettingsResponse;
role?: string;
teams?: string[];
teams_role?: Record<string, any>;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | User ID |
| custom | Record<string, any> | No | Custom user data |
| image | string | No | User's profile image URL |
| invisible | boolean | No | |
| language | string | No | |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | |
| role | string | No | User's global role |
| teams | string[] | No | List of teams the user belongs to |
| teams_role | Record<string, any> | No | Map of team-specific roles for the user |
UserResponse
User response object
interface UserResponse {
avg_response_time?: number;
ban_expires?: number;
banned: boolean;
blocked_user_ids: string[];
bypass_moderation?: boolean;
created_at: number;
custom: Record<string, any>;
deactivated_at?: number;
deleted_at?: number;
devices?: DeviceResponse[];
id: string;
image?: string;
invisible: boolean;
language: string;
last_active?: number;
name?: string;
online: boolean;
privacy_settings?: PrivacySettingsResponse;
push_notifications?: PushNotificationSettingsResponse;
revoke_tokens_issued_before?: number;
role: string;
shadow_banned: boolean;
teams: string[];
teams_role?: Record<string, any>;
updated_at: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | Whether a user is banned or not |
| blocked_user_ids | string[] | Yes | |
| created_at | number | Yes | Date/time of creation |
| custom | Record<string, any> | Yes | Custom data for this object |
| id | string | Yes | Unique user identifier |
| invisible | boolean | Yes | |
| language | string | Yes | Preferred language of a user |
| online | boolean | Yes | Whether a user online or not |
| role | string | Yes | Determines the set of user permissions |
| shadow_banned | boolean | Yes | Whether a user is shadow banned |
| teams | string[] | Yes | List of teams user is a part of |
| updated_at | number | Yes | Date/time of the last update |
| avg_response_time | number | No | |
| ban_expires | number | No | Date when ban expires |
| bypass_moderation | boolean | No | |
| deactivated_at | number | No | Date of deactivation |
| deleted_at | number | No | Date/time of deletion |
| devices | DeviceResponse[] | No | List of devices user is using |
| image | string | No | |
| last_active | number | No | Date of last activity |
| name | string | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | User privacy settings |
| push_notifications | PushNotificationSettingsResponse | No | User push notification settings |
| revoke_tokens_issued_before | number | No | Revocation date for tokens |
| teams_role | Record<string, any> | No |
VoteData
interface VoteData {
answer_text?: string;
option_id?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| answer_text | string | No | |
| option_id | string | No |