Appearance
Feeds
About 13924 wordsAbout 46 min
Typescript SDK - Feeds API
Table of Contents
- addActivity
- upsertActivities
- deleteActivities
- queryActivities
- addBookmark
- updateBookmark
- deleteBookmark
- activityFeedback
- castPollVote
- deletePollVote
- addActivityReaction
- queryActivityReactions
- deleteActivityReaction
- getActivity
- updateActivity
- updateActivityPartial
- deleteActivity
- restoreActivity
- queryBookmarkFolders
- updateBookmarkFolder
- deleteBookmarkFolder
- queryBookmarks
- readCollections
- createCollections
- updateCollections
- deleteCollections
- getComments
- addComment
- addCommentsBatch
- queryComments
- getComment
- updateComment
- deleteComment
- addCommentReaction
- queryCommentReactions
- deleteCommentReaction
- getCommentReplies
- getOrCreateFeed
- updateFeed
- deleteFeed
- markActivity
- pinActivity
- unpinActivity
- updateFeedMembers
- acceptFeedMemberInvite
- queryFeedMembers
- rejectFeedMemberInvite
- stopWatchingFeed
- getFollowSuggestions
- createFeedsBatch
- ownBatch
- queryFeeds
- follow
- updateFollow
- acceptFollow
- followBatch
- getOrCreateFollows
- queryFollows
- rejectFollow
- unfollow
- getOrCreateUnfollows
- Types Reference
addActivity
Add a single activity
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add a single activity
const response = await client.addActivity({
feeds: ['user:john', 'timeline:global'],
type: 'like',
id: 'activity-123',
text: 'Hello, world!',
});
console.log(response);Example: with skip_push and visibility
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add a single activity
const response = await client.addActivity({
feeds: ['user:john', 'timeline:global'],
type: 'like',
skip_push: false,
visibility: 'public',
});
console.log(response);Example: with custom and expires_at
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add a single activity
const response = await client.addActivity({
feeds: ['user:john', 'timeline:global'],
type: 'like',
custom: {},
expires_at: 'value',
});
console.log(response);Example: with filter_tags and attachments
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add a single activity
const response = await client.addActivity({
feeds: ['user:john', 'timeline:global'],
type: 'like',
filter_tags: ['tag1', 'tag2'],
attachments: [],
});
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 |
| 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 | ActivityLocation | 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 |
| 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 |
| visibility | string | No | Visibility setting for the activity |
| visibility_tag | string | No | If visibility is 'tag', this is the tag name and is required |
upsertActivities
Upsert multiple activities
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Upsert multiple activities
const response = await client.upsertActivities({
activities: [],
});
console.log(response);Response: UpsertActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activities | []ActivityRequest | Yes | List of activities to create or update |
deleteActivities
Remove multiple activities
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Remove multiple activities
const response = await client.deleteActivities({
ids: ['activity-1', 'activity-2'],
hard_delete: false,
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 |
queryActivities
Query activities
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query activities
const response = await client.queryActivities({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query activities
const response = await client.queryActivities({
prev: null,
next: null,
});
console.log(response);Response: QueryActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | No | Filters to apply to the query. Supports location-based queries with 'near' and 'within_bounds' op... |
| limit | number | No | - |
| next | string | No | - |
| prev | string | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
addBookmark
Add bookmark
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add bookmark
const response = await client.addBookmark({
activity_id: 'activity-123',
custom: {},
folder_id: 'folder-123',
});
console.log(response);Example: with new_folder
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add bookmark
const response = await client.addBookmark({
activity_id: 'activity-123',
new_folder: { name: 'My Feed', 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 |
updateBookmark
Update bookmark
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update bookmark
const response = await client.updateBookmark({
activity_id: 'activity-123',
custom: {},
folder_id: 'folder-123',
});
console.log(response);Example: with new_folder and new_folder_id
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update bookmark
const response = await client.updateBookmark({
activity_id: 'activity-123',
new_folder: { name: 'My Feed', custom: {} },
new_folder_id: 'value',
});
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 to move the bookmark to |
| new_folder | AddFolderRequest | No | - |
| new_folder_id | string | No | - |
deleteBookmark
Delete a bookmark
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Delete a bookmark
const response = await client.deleteBookmark({
activity_id: 'activity-123',
folder_id: 'folder-123',
});
console.log(response);Response: DeleteBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | string | Yes | - |
| folder_id | string | No | - |
activityFeedback
Provide feedback on an activity
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Provide feedback on an activity
const response = await client.activityFeedback({
activity_id: 'activity-123',
hide: false,
show_less: false,
});
console.log(response);Example: with show_more
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Provide feedback on an activity
const response = await client.activityFeedback({
activity_id: 'activity-123',
show_more: 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 |
castPollVote
Cast vote
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Cast vote
const response = await client.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 | - |
| vote | VoteData | No | Vote data |
deletePollVote
Delete vote
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Delete vote
const response = await client.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 reaction
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add reaction
const response = await client.addActivityReaction({
activity_id: 'activity-123',
type: 'like',
skip_push: false,
create_notification_activity: false,
});
console.log(response);Example: with custom and enforce_unique
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add reaction
const response = await client.addActivityReaction({
activity_id: 'activity-123',
type: 'like',
custom: {},
enforce_unique: true,
});
console.log(response);Example: with copy_custom_to_notification
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add reaction
const response = await client.addActivityReaction({
activity_id: 'activity-123',
type: 'like',
copy_custom_to_notification: 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 | - |
queryActivityReactions
Query activity reactions
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query activity reactions
const response = await client.queryActivityReactions({
activity_id: 'activity-123',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and prev
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query activity reactions
const response = await client.queryActivityReactions({
activity_id: 'activity-123',
sort: [],
prev: null,
});
console.log(response);Example: with next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query activity reactions
const response = await client.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 reaction
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Remove reaction
const response = await client.deleteActivityReaction({
activity_id: 'activity-123',
type: 'like',
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 | - |
getActivity
Get activity
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get activity
const response = await client.getActivity({
id: 'activity-123',
});
console.log(response);Response: GetActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
updateActivity
Full activity update
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Full activity update
const response = await client.updateActivity({
id: 'activity-123',
text: 'Hello, world!',
feeds: ['user:john', 'timeline:global'],
});
console.log(response);Example: with visibility and custom
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Full activity update
const response = await client.updateActivity({
id: 'activity-123',
visibility: 'public',
custom: {},
});
console.log(response);Example: with expires_at and attachments
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Full activity update
const response = await client.updateActivity({
id: 'activity-123',
expires_at: 10,
attachments: [],
});
console.log(response);Example: with filter_tags and handle_mention_notifications
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Full activity update
const response = await client.updateActivity({
id: 'activity-123',
filter_tags: ['tag1', 'tag2'],
handle_mention_notifications: false,
});
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 |
| 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 |
| 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 | ActivityLocation | 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 |
| 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 |
| 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
Partial activity update
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Partial activity update
const response = await client.updateActivityPartial({
id: 'activity-123',
copy_custom_to_notification: false,
handle_mention_notifications: false,
});
console.log(response);Example: with run_activity_processors and set
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Partial activity update
const response = await client.updateActivityPartial({
id: 'activity-123',
run_activity_processors: false,
set: {},
});
console.log(response);Example: with unset
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Partial activity update
const response = await client.updateActivityPartial({
id: 'activity-123',
unset: [],
});
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... |
| 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... |
deleteActivity
Delete a single activity
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Delete a single activity
const response = await client.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 soft-deleted activity
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Restore a soft-deleted activity
const response = await client.restoreActivity({
id: 'activity-123',
});
console.log(response);Response: RestoreActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
queryBookmarkFolders
Query bookmark folders
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query bookmark folders
const response = await client.queryBookmarkFolders({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query bookmark folders
const response = await client.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
Update a bookmark folder
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update a bookmark folder
const response = await client.updateBookmarkFolder({
folder_id: 'folder-123',
name: 'My Feed',
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 |
deleteBookmarkFolder
Delete a bookmark folder
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Delete a bookmark folder
const response = await client.deleteBookmarkFolder({
folder_id: 'folder-123',
});
console.log(response);Response: DeleteBookmarkFolderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| folder_id | string | Yes | - |
queryBookmarks
Query bookmarks
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query bookmarks
const response = await client.queryBookmarks({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query bookmarks
const response = await client.queryBookmarks({
prev: null,
next: null,
});
console.log(response);Response: QueryBookmarksResponse
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 |
readCollections
Read collections
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Read collections
const response = await client.readCollections({
collection_refs: ['food:pizza-123'],
});
console.log(response);Response: ReadCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collection_refs | []string | Yes | - |
createCollections
Create multiple collections
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Create multiple collections
const response = await client.createCollections({
collections: [],
});
console.log(response);Response: CreateCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collections | []CollectionRequest | Yes | List of collections to create |
updateCollections
Update multiple collections
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update multiple collections
const response = await client.updateCollections({
collections: [],
});
console.log(response);Response: UpdateCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collections | []UpdateCollectionRequest | Yes | List of collections to update (only custom data is updatable) |
deleteCollections
Delete multiple collections
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Delete multiple collections
const response = await client.deleteCollections({
collection_refs: ['food:pizza-123'],
});
console.log(response);Response: DeleteCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collection_refs | []string | Yes | - |
getComments
Get comments for an object
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get comments for an object
const response = await client.getComments({
object_id: 'activity-123',
object_type: 'activity',
limit: 25,
sort: [{ field: "created_at", direction: -1 }],
});
console.log(response);Example: with replies_limit and depth
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get comments for an object
const response = await client.getComments({
object_id: 'activity-123',
object_type: 'activity',
replies_limit: 10,
depth: 2,
});
console.log(response);Example: with prev and next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get comments for an object
const response = await client.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 | - |
| limit | number | No | - |
| prev | string | No | - |
| next | string | No | - |
addComment
Add a comment or reply
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add a comment or reply
const response = await client.addComment({
id: 'activity-123',
skip_push: false,
copy_custom_to_notification: false,
});
console.log(response);Example: with create_notification_activity and custom
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add a comment or reply
const response = await client.addComment({
create_notification_activity: false,
custom: {},
});
console.log(response);Example: with attachments and mentioned_user_ids
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add a comment or reply
const response = await client.addComment({
attachments: [],
mentioned_user_ids: ['user-1', 'user-2'],
});
console.log(response);Example: with object_id and object_type
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add a comment or reply
const response = await client.addComment({
object_id: 'activity-123',
object_type: 'activity',
});
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 |
| 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 | - |
addCommentsBatch
Add multiple comments in a batch
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add multiple comments in a batch
const response = await client.addCommentsBatch({
comments: [],
});
console.log(response);Response: AddCommentsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| comments | []AddCommentRequest | Yes | List of comments to add |
queryComments
Query comments
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query comments
const response = await client.queryComments({
filter: {},
limit: 25,
sort: [{ field: "created_at", direction: -1 }],
});
console.log(response);Example: with prev and next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query comments
const response = await client.queryComments({
filter: {},
prev: null,
next: null,
});
console.log(response);Response: QueryCommentsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | Record<string, any> | Yes | MongoDB-style filter for querying comments |
| limit | number | No | Maximum number of comments to return |
| next | string | No | - |
| prev | string | No | - |
| sort | string | No | first (oldest), last (newest) or top |
getComment
Get comment
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get comment
const response = await client.getComment({
id: 'activity-123',
});
console.log(response);Response: GetCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | - |
updateComment
Update a comment
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update a comment
const response = await client.updateComment({
id: 'activity-123',
skip_push: false,
comment: 'Great post!',
});
console.log(response);Example: with copy_custom_to_notification and custom
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update a comment
const response = await client.updateComment({
id: 'activity-123',
copy_custom_to_notification: false,
custom: {},
});
console.log(response);Example: with handle_mention_notifications and mentioned_user_ids
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update a comment
const response = await client.updateComment({
id: 'activity-123',
handle_mention_notifications: false,
mentioned_user_ids: ['user-1', 'user-2'],
});
console.log(response);Example: with skip_enrich_url and attachments
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update a comment
const response = await client.updateComment({
id: 'activity-123',
skip_enrich_url: false,
attachments: [],
});
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 |
| 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 | - |
deleteComment
Delete a comment
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Delete a comment
const response = await client.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 | - |
addCommentReaction
Add comment reaction
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add comment reaction
const response = await client.addCommentReaction({
id: 'activity-123',
type: 'like',
skip_push: false,
create_notification_activity: false,
});
console.log(response);Example: with custom and enforce_unique
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add comment reaction
const response = await client.addCommentReaction({
id: 'activity-123',
type: 'like',
custom: {},
enforce_unique: true,
});
console.log(response);Example: with copy_custom_to_notification
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Add comment reaction
const response = await client.addCommentReaction({
id: 'activity-123',
type: 'like',
copy_custom_to_notification: 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 | - |
queryCommentReactions
Query comment reactions
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query comment reactions
const response = await client.queryCommentReactions({
id: 'activity-123',
limit: 25,
filter: {},
});
console.log(response);Example: with sort and prev
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query comment reactions
const response = await client.queryCommentReactions({
id: 'activity-123',
sort: [],
prev: null,
});
console.log(response);Example: with next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query comment reactions
const response = await client.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
Delete comment reaction
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Delete comment reaction
const response = await client.deleteCommentReaction({
id: 'activity-123',
type: 'like',
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 | - |
getCommentReplies
Get replies for a comment
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get replies for a comment
const response = await client.getCommentReplies({
id: 'activity-123',
limit: 25,
sort: [{ field: "created_at", direction: -1 }],
});
console.log(response);Example: with replies_limit and depth
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get replies for a comment
const response = await client.getCommentReplies({
id: 'activity-123',
replies_limit: 10,
depth: 2,
});
console.log(response);Example: with prev and next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get replies for a comment
const response = await client.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 | - |
| limit | number | No | - |
| prev | string | No | - |
| next | string | No | - |
getOrCreateFeed
Create a new feed
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Create a new feed
const response = await feed.getOrCreate({
limit: 25,
filter: {},
});
console.log(response);Example: with enrichment_options and external_ranking
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Create a new feed
const response = await feed.getOrCreate({
enrichment_options: { enrich_own_followings: false },
external_ranking: {},
});
console.log(response);Example: with connection_id and followers_pagination
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Create a new feed
const response = await feed.getOrCreate({
connection_id: 'value',
followers_pagination: { limit: 25 },
});
console.log(response);Example: with following_pagination and friend_reactions_options
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Create a new feed
const response = await feed.getOrCreate({
following_pagination: { limit: 25 },
friend_reactions_options: { enabled: false },
});
console.log(response);Response: GetOrCreateFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| connection_id | string | No | - |
| 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 | - |
| view | string | No | - |
| watch | boolean | No | - |
updateFeed
Update a feed
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Update a feed
const response = await feed.update({
name: 'My Feed',
description: 'A description',
});
console.log(response);Example: with filter_tags and custom
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Update a feed
const response = await feed.update({
filter_tags: ['tag1', 'tag2'],
custom: {},
});
console.log(response);Response: UpdateFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| 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 |
| name | string | No | Name of the feed |
deleteFeed
Delete a single feed
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Delete a single feed
const response = await feed.delete({
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
Mark activities as read/seen/watched
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Mark activities as read/seen/watched
const response = await feed.markActivity({
mark_all_read: true,
mark_all_seen: true,
});
console.log(response);Example: with mark_read and mark_seen
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Mark activities as read/seen/watched
const response = await feed.markActivity({
mark_read: [],
mark_seen: [],
});
console.log(response);Example: with mark_watched
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Mark activities as read/seen/watched
const response = await feed.markActivity({
mark_watched: [],
});
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) |
pinActivity
Pin an activity to a feed
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Pin an activity to a feed
const response = await feed.pinActivity({
activity_id: 'activity-123',
});
console.log(response);Response: PinActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| activity_id | string | Yes | - |
unpinActivity
Unpin an activity from a feed
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Unpin an activity from a feed
const response = await feed.unpinActivity({
activity_id: 'activity-123',
});
console.log(response);Response: UnpinActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| activity_id | string | Yes | - |
updateFeedMembers
Update feed members
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Update feed members
const response = await feed.updateFeedMembers({
operation: 'add',
limit: 25,
members: [],
});
console.log(response);Example: with next and prev
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Update feed members
const response = await feed.updateFeedMembers({
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 |
| limit | number | No | - |
| members | []FeedMemberRequest | No | List of members to upsert, remove, or set |
| next | string | No | - |
| prev | string | No | - |
acceptFeedMemberInvite
Accept a feed member request
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Accept a feed member request
const response = await feed.acceptFeedMemberInvite({
});
console.log(response);Response: AcceptFeedMemberInviteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_id | string | Yes | - |
| feed_group_id | string | Yes | - |
queryFeedMembers
Query feed members
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Query feed members
const response = await feed.queryFeedMembers({
limit: 25,
filter: {},
});
console.log(response);Example: with sort and prev
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Query feed members
const response = await feed.queryFeedMembers({
sort: [],
prev: null,
});
console.log(response);Example: with next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Query feed members
const response = await feed.queryFeedMembers({
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
Reject an invite to become a feed member
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Reject an invite to become a feed member
const response = await feed.rejectFeedMemberInvite({
});
console.log(response);Response: RejectFeedMemberInviteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
stopWatchingFeed
Stop watching feed
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
const feed = client.feed('user', 'john');
// Stop watching feed
const response = await feed.stopWatching({
connection_id: 'value',
});
console.log(response);Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| feed_id | string | Yes | - |
| connection_id | string | No | - |
getFollowSuggestions
Get follow suggestions
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get follow suggestions
const response = await client.getFollowSuggestions({
feed_group_id: 'user',
limit: 25,
});
console.log(response);Response: GetFollowSuggestionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | string | Yes | - |
| limit | number | No | - |
createFeedsBatch
Create multiple feeds at once
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Create multiple feeds at once
const response = await client.createFeedsBatch({
feeds: ['user:john', 'timeline:global'],
});
console.log(response);Response: CreateFeedsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feeds | []FeedRequest | Yes | List of feeds to create |
ownBatch
Get own fields for multiple feeds
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Get own fields for multiple feeds
const response = await client.ownBatch({
feeds: ['user:john', 'timeline:global'],
connection_id: 'value',
fields: [],
});
console.log(response);Response: OwnBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feeds | []string | Yes | List of feed IDs to get own fields for |
| connection_id | string | No | - |
| fields | []string | No | Optional list of specific fields to return. If not specified, all fields (own_follows, own_follow... |
queryFeeds
Query feeds
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query feeds
const response = await client.queryFeeds({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with next and prev
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query feeds
const response = await client.queryFeeds({
next: null,
prev: null,
});
console.log(response);Example: with connection_id and watch
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query feeds
const response = await client.queryFeeds({
connection_id: 'value',
watch: false,
});
console.log(response);Response: QueryFeedsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| connection_id | string | 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 |
follow
Create a follow
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Create a follow
const response = await client.follow({
source: 'user:john',
target: 'timeline:jane',
skip_push: false,
create_notification_activity: false,
});
console.log(response);Example: with custom and push_preference
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Create a follow
const response = await client.follow({
source: 'user:john',
target: 'timeline:jane',
custom: {},
push_preference: 'value',
});
console.log(response);Example: with copy_custom_to_notification
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Create a follow
const response = await client.follow({
source: 'user:john',
target: 'timeline:jane',
copy_custom_to_notification: false,
});
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 |
| 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 |
| custom | Record<string, any> | No | Custom data for the follow relationship |
| push_preference | string | No | Push preference for the follow relationship |
| skip_push | boolean | No | Whether to skip push for this follow |
updateFollow
Update a follow
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update a follow
const response = await client.updateFollow({
source: 'user:john',
target: 'timeline:jane',
skip_push: false,
create_notification_activity: false,
});
console.log(response);Example: with custom and follower_role
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update a follow
const response = await client.updateFollow({
source: 'user:john',
target: 'timeline:jane',
custom: {},
follower_role: 'member',
});
console.log(response);Example: with push_preference and copy_custom_to_notification
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Update a follow
const response = await client.updateFollow({
source: 'user:john',
target: 'timeline:jane',
push_preference: 'value',
copy_custom_to_notification: false,
});
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 |
| 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 |
| custom | Record<string, any> | No | Custom data for the follow relationship |
| 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 |
acceptFollow
Accept a follow request
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Accept a follow request
const response = await client.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
Create multiple follows at once
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Create multiple follows at once
const response = await client.followBatch({
follows: [],
});
console.log(response);Response: FollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []FollowRequest | Yes | List of follow relationships to create |
getOrCreateFollows
Upsert multiple follows at once
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Upsert multiple follows at once
const response = await client.getOrCreateFollows({
follows: [],
});
console.log(response);Response: FollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []FollowRequest | Yes | List of follow relationships to create |
queryFollows
Query follows
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query follows
const response = await client.queryFollows({
limit: 25,
filter: {},
sort: [],
});
console.log(response);Example: with prev and next
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Query follows
const response = await client.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
Reject a follow request
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Reject a follow request
const response = await client.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
Unfollow a feed
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Unfollow a feed
const response = await client.unfollow({
source: 'user:john',
target: 'timeline:jane',
delete_notification_activity: false,
});
console.log(response);Response: UnfollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | string | Yes | - |
| target | string | Yes | - |
| delete_notification_activity | boolean | No | - |
getOrCreateUnfollows
Unfollow multiple feeds (idempotent)
Example
import { FeedsClient } from '@stream-io/feeds-client';
const client = new FeedsClient(apiKey);
await client.connectUser({ id: 'john' }, userToken);
// Unfollow multiple feeds (idempotent)
const response = await client.getOrCreateUnfollows({
follows: [],
delete_notification_activity: false,
});
console.log(response);Response: UnfollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []FollowPair | Yes | List of follow relationships to remove |
| delete_notification_activity | boolean | No | Whether to delete the corresponding notification activity (default: false) |
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 |
ActivityLocation
interface ActivityLocation {
lat: number;
lng: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| lat | number | Yes | Latitude coordinate |
| lng | number | Yes | Longitude coordinate |
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 |
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?: ActivityLocation;
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;
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 | ActivityLocation | 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 |
| 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_watched?: boolean;
latest_reactions: FeedsReactionResponse[];
location?: ActivityLocation;
mentioned_users: UserResponse[];
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;
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_watched | boolean | No | |
| location | ActivityLocation | No | Geographic location related to the activity |
| 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 |
| 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 |
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 |
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>;
id?: string;
mentioned_user_ids?: string[];
object_id?: string;
object_type?: string;
parent_id?: string;
skip_enrich_url?: boolean;
skip_push?: boolean;
}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 |
| 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 |
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_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_watched | boolean | No |
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;
created_at: number;
custom?: Record<string, any>;
folder?: BookmarkFolderResponse;
updated_at: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The bookmarked activity |
| created_at | number | Yes | When the bookmark was created |
| updated_at | number | Yes | When the bookmark was last updated |
| user | UserResponse | Yes | User who created the bookmark |
| 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;
}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-... |
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[];
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: string;
text?: string;
updated_at: number;
upvote_count: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| 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 | string | Yes | Status of the comment (e.g., active, deleted) |
| 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 | |
| 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 | |
| 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 |
CreateFeedsBatchResponse
interface CreateFeedsBatchResponse {
duration: string;
feeds: FeedResponse[];
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| feeds | FeedResponse[] | Yes | List of created feeds |
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 |
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 |
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 |
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;
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... |
| 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. |
FeedInput
interface FeedInput {
custom?: Record<string, any>;
description?: string;
filter_tags?: string[];
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 | |
| 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[];
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 |
| 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;
member_count: number;
name: string;
own_capabilities?: FeedOwnCapability[];
own_followings?: FollowResponse[];
own_follows?: FollowResponse[];
own_membership?: FeedMemberResponse;
pin_count: number;
updated_at: number;
visibility?: string;
}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 |
| 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 | string | No | Visibility setting for the feed |
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;
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?: string;
}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 |
| 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 | string | No | Visibility setting for the feed |
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 |
FollowPair
interface FollowPair {
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 |
FollowRequest
interface FollowRequest {
copy_custom_to_notification?: boolean;
create_notification_activity?: boolean;
custom?: Record<string, any>;
push_preference?: 'all' | 'none';
skip_push?: 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 |
| 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 |
| custom | Record<string, any> | No | Custom data for the follow relationship |
| push_preference | 'all' | 'none' | No |
| skip_push | boolean | No | Whether to skip push for this follow |
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;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | ThreadedCommentResponse[] | Yes | Threaded listing of replies to the comment |
| duration | string | Yes | |
| 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;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | ThreadedCommentResponse[] | Yes | Threaded listing for the activity |
| duration | string | Yes | |
| next | string | No | |
| prev | string | No |
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 |
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 |
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 |
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 | |
| last_seen_at | number | No | When notifications were last seen |
| read_activities | string[] | No | IDs of activities that have been read |
| seen_activities | string[] | No |
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 |
Poll
interface Poll {
Custom: Record<string, any>;
allow_answers: boolean;
allow_user_suggested_options: boolean;
answers_count: number;
created_at: number;
created_by?: User;
created_by_id: string;
description: string;
enforce_unique_vote: boolean;
id: string;
is_closed?: boolean;
latest_answers: PollVote[];
latest_votes_by_option: Record<string, any>;
max_votes_allowed?: number;
name: string;
options: PollOption[];
own_votes: PollVote[];
updated_at: number;
vote_count: number;
vote_counts_by_option: Record<string, any>;
voting_visibility?: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| Custom | Record<string, any> | Yes | |
| allow_answers | boolean | Yes | |
| allow_user_suggested_options | boolean | Yes | |
| answers_count | number | Yes | |
| created_at | number | Yes | |
| created_by_id | string | Yes | |
| description | string | Yes | |
| enforce_unique_vote | boolean | Yes | |
| id | string | Yes | |
| latest_answers | PollVote[] | Yes | |
| latest_votes_by_option | Record<string, any> | Yes | |
| name | string | Yes | |
| options | PollOption[] | Yes | |
| own_votes | PollVote[] | Yes | |
| updated_at | number | Yes | |
| vote_count | number | Yes | |
| vote_counts_by_option | Record<string, any> | Yes | |
| created_by | User | No | |
| is_closed | boolean | No | |
| max_votes_allowed | number | No | |
| voting_visibility | string | No |
PollOption
interface PollOption {
custom: Record<string, any>;
id: string;
text: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Record<string, any> | Yes | |
| id | string | Yes | |
| text | string | Yes |
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 |
PollVote
interface PollVote {
answer_text?: string;
created_at: number;
id: string;
is_answer?: boolean;
option_id: string;
poll_id: string;
updated_at: number;
user?: User;
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 | User | No | |
| user_id | string | 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 |
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 |
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 |
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 |
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 query |
| 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 |
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 |
SortParam
interface SortParam {
direction: number;
field: string;
type: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | number | Yes | |
| field | string | Yes | |
| type | string | Yes |
SortParamRequest
interface SortParamRequest {
direction?: number;
field?: string;
type?: '' | 'number' | 'boolean';
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | number | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1 |
| field | string | No | Name of field to sort by |
| type | '' | 'number' | 'boolean' |
ThreadedCommentResponse
A comment with an optional, depth‑limited slice of nested replies.
interface ThreadedCommentResponse {
attachments?: Attachment[];
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: string;
text?: string;
updated_at: number;
upvote_count: number;
user: UserResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| 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 | string | Yes | |
| 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 {
}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 |
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 |
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 |
UpdateCommentResponse
interface UpdateCommentResponse {
comment: CommentResponse;
duration: string;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The updated comment |
| duration | string | Yes |
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 |
UpdateFollowResponse
interface UpdateFollowResponse {
duration: string;
follow: FollowResponse;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | string | Yes | |
| follow | FollowResponse | Yes | Details of the updated follow relationship |
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... |
User
interface User {
avg_response_time?: number;
ban_expires?: number;
banned: boolean;
created_at?: number;
custom: Record<string, any>;
deactivated_at?: number;
deleted_at?: number;
id: string;
invisible?: boolean;
language?: string;
last_active?: number;
last_engaged_at?: number;
online: boolean;
privacy_settings?: PrivacySettings;
revoke_tokens_issued_before?: number;
role: string;
teams?: string[];
teams_role: Record<string, any>;
updated_at?: number;
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | boolean | Yes | |
| custom | Record<string, any> | Yes | |
| id | string | Yes | |
| online | boolean | Yes | |
| role | string | Yes | |
| teams_role | Record<string, any> | Yes | |
| avg_response_time | number | No | |
| ban_expires | number | No | |
| created_at | number | No | |
| deactivated_at | number | No | |
| deleted_at | number | No | |
| invisible | boolean | No | |
| language | string | No | |
| last_active | number | No | |
| last_engaged_at | number | No | |
| privacy_settings | PrivacySettings | No | |
| revoke_tokens_issued_before | number | No | |
| teams | string[] | No | |
| updated_at | number | No |
UserRequest
User request object
interface UserRequest {
custom?: Record<string, any>;
id: string;
image?: string;
invisible?: boolean;
language?: string;
name?: string;
privacy_settings?: PrivacySettingsResponse;
}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 |
UserResponse
User response object
interface UserResponse {
avg_response_time?: number;
banned: boolean;
blocked_user_ids: string[];
created_at: number;
custom: Record<string, any>;
deactivated_at?: number;
deleted_at?: number;
id: string;
image?: string;
language: string;
last_active?: number;
name?: string;
online: boolean;
revoke_tokens_issued_before?: number;
role: string;
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 |
| 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 |
| 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 | |
| deactivated_at | number | No | Date of deactivation |
| deleted_at | number | No | Date/time of deletion |
| image | string | No | |
| last_active | number | No | Date of last activity |
| name | string | No | Optional name of user |
| 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 |