Appearance
Feeds
About 15391 wordsAbout 51 min
Swift SDK - Feeds API
Table of Contents
- addActivity
- upsertActivities
- deleteActivities
- trackActivityMetrics
- queryActivities
- addBookmark
- updateBookmark
- deleteBookmark
- activityFeedback
- castPollVote
- deletePollVote
- addActivityReaction
- queryActivityReactions
- deleteActivityReaction
- getActivity
- updateActivity
- updateActivityPartial
- deleteActivity
- restoreActivity
- queryBookmarkFolders
- updateBookmarkFolder
- deleteBookmarkFolder
- queryBookmarks
- readCollections
- createCollections
- updateCollections
- deleteCollections
- queryCollections
- getComments
- addComment
- addCommentsBatch
- queryComments
- addCommentBookmark
- updateCommentBookmark
- deleteCommentBookmark
- getComment
- updateComment
- deleteComment
- updateCommentPartial
- addCommentReaction
- queryCommentReactions
- deleteCommentReaction
- getCommentReplies
- restoreComment
- getOrCreateFeed
- updateFeed
- deleteFeed
- markActivity
- pinActivity
- unpinActivity
- updateFeedMembers
- acceptFeedMemberInvite
- queryFeedMembers
- rejectFeedMemberInvite
- queryPinnedActivities
- stopWatchingFeed
- getFollowSuggestions
- createFeedsBatch
- ownBatch
- queryFeeds
- follow
- updateFollow
- acceptFollow
- followBatch
- getOrCreateFollows
- queryFollows
- rejectFollow
- unfollow
- getOrCreateUnfollows
- Types Reference
addActivity
Add a single activity to a feed, allowing users to share updates or events. Use this when you want to introduce new content to a feed.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.addActivity(
request: .init(
feeds: ["user:john", "timeline:global"],
type: "post",
attachments: [],
collectionRefs: ["value1", "value2"]
)
)
print(response)Response: AddActivityResponse
Parameters
Request Body:
attachments([Attachment]): List of attachments for the activitycollectionRefs([String]): Collections that this activity referencescopyCustomToNotification(Bool): Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom insteadcreateNotificationActivity(Bool): Whether to create notification activities for mentioned userscustom([String: Any]): Custom data for the activityenrichOwnFields(Bool)expiresAt(String): Expiration time for the activityfeeds([String]) (required): List of feeds to add the activity to with a default max limit of 25 feedsfilterTags([String]): Tags for filtering activitiesid(String): Optional ID for the activityinterestTags([String]): Tags for indicating user interestslocation(Location): Geographic location related to the activitymentionedUserIds([String]): List of users mentioned in the activityparentID(String): ID of parent activity for replies/commentspollID(String): ID of a poll to attach to activityrestrictReplies(String): Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobodysearchData([String: Any]): Additional data for search indexingskipEnrichURL(Bool): Whether to skip URL enrichment for the activityskipPush(Bool): Whether to skip push notificationstext(String): Text content of the activitytype(String) (required): Type of activityvisibility(String): Visibility setting for the activity. One of: public, private, tagvisibilityTag(String): If visibility is 'tag', this is the tag name and is required
upsertActivities
Add or update multiple activities in a batch, optimizing feed management by ensuring activities are current and efficiently handled. Use this for bulk operations where activities might need to be created or modified.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.upsertActivities(
request: .init(
activities: [],
enrichOwnFields: true
)
)
print(response)Response: UpsertActivitiesResponse
Parameters
Request Body:
activities([ActivityRequest]) (required): List of activities to create or updateenrichOwnFields(Bool): If true, enriches the activities' current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
deleteActivities
Remove multiple activities from a feed to keep it relevant and tidy. Use this when you need to clear outdated or unwanted content from a feed.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteActivities(
request: .init(
ids: ["id-1", "id-2"],
deleteNotificationActivity: true,
hardDelete: true
)
)
print(response)Response: DeleteActivitiesResponse
Parameters
Request Body:
deleteNotificationActivity(Bool): Whether to also delete any notification activities created from mentions in these activitieshardDelete(Bool): Whether to permanently delete the activitiesids([String]) (required): List of activity IDs to delete
trackActivityMetrics
Monitors and records user interactions with activities, providing insights into user engagement and behavior. Use this to analyze activity trends and optimize content strategy.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.trackActivityMetrics(
request: .init(
events: []
)
)
print(response)Response: TrackActivityMetricsResponse
Parameters
Request Body:
events([TrackActivityMetricsEvent]) (required): List of metric events to track (max 100 per request)
queryActivities
Retrieve a list of activities based on specific criteria, enabling users to access relevant content quickly. Use this to filter and display activities that match certain conditions.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryActivities(
request: .init(
enrichOwnFields: true,
filter: [:]
)
)
print(response)Response: QueryActivitiesResponse
Parameters
Request Body:
enrichOwnFields(Bool)filter([String: Any]): Filters to apply to the query. Supports location-based queries with 'near' and 'within_bounds' operators.includeSoftDeletedActivities(Bool): When true, include soft-deleted activities in the result.limit(Int)next(String)prev(String)sort([SortParamRequest]): Sorting parameters for the query
addBookmark
Save a specific item or activity for easy retrieval later, enhancing user experience by allowing quick access to important content. Use this to enable users to mark favorites or important items.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.addBookmark(
request: .init(
custom: [:],
folderID: "example_value"
)
)
print(response)Response: AddBookmarkResponse
Parameters
Path Parameters:
activityID(String) (required)
Request Body:
custom([String: Any]): Custom data for the bookmarkfolderID(String): ID of the folder to add the bookmark tonewFolder(AddFolderRequest): Create a new folder for this bookmark
updateBookmark
Modify the details of an existing bookmark to keep saved content accurate and useful. Use this when there is a need to change the information associated with a bookmark.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateBookmark(
request: .init(
custom: [:],
folderID: "example_value"
)
)
print(response)Response: UpdateBookmarkResponse
Parameters
Path Parameters:
activityID(String) (required)
Request Body:
custom([String: Any]): Custom data for the bookmarkfolderID(String): ID of the folder containing the bookmarknewFolder(AddFolderRequest): Create a new folder and move the bookmark into itnewFolderID(String): Move the bookmark to this folder (empty string removes the folder)
deleteBookmark
Remove a bookmark from the saved list to declutter a user's stored items. Use this when a bookmarked item is no longer needed or relevant.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteBookmark(
activityID: "activity-123"
)
print(response)Response: DeleteBookmarkResponse
Parameters
Path Parameters:
activityID(String) (required)
Query Parameters:
folderID(String)
activityFeedback
Submit user feedback on an activity to enhance personalization and content relevance. Use this to gather user preferences and improve content recommendations.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.activityFeedback(
request: .init(
hide: true,
showLess: true
)
)
print(response)Response: ActivityFeedbackResponse
Parameters
Path Parameters:
activityID(String) (required)
Request Body:
hide(Bool): Whether to hide this activityshowLess(Bool): Whether to show less content like thisshowMore(Bool): Whether to show more content like this
castPollVote
Register a user’s vote in a poll, contributing to collective decision-making or opinion-sharing. Use this to capture user opinions in polls.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.castPollVote(
request: .init(
vote: "example_value"
)
)
print(response)Response: PollVoteResponse
Parameters
Path Parameters:
activityID(String) (required)pollID(String) (required)
Request Body:
vote(VoteData): Vote data
deletePollVote
Remove a user's vote from a poll, allowing for changes in decision or corrections. Use this when a user needs to retract or alter their vote in a poll.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deletePollVote(
activityID: "activity-123",
pollID: "example_value",
voteID: "example_value"
)
print(response)Response: PollVoteResponse
Parameters
Path Parameters:
activityID(String) (required)pollID(String) (required)voteID(String) (required)
Query Parameters:
userID(String)
addActivityReaction
Add a reaction to a specified activity to engage users and track interactions. Use this method to express preferences or sentiments towards an activity.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.addActivityReaction(
request: .init(
type: "post",
copyCustomToNotification: [:],
createNotificationActivity: true
)
)
print(response)Response: AddReactionResponse
Parameters
Path Parameters:
activityID(String) (required)
Request Body:
copyCustomToNotification(Bool): Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom insteadcreateNotificationActivity(Bool): Whether to create a notification activity for this reactioncustom([String: Any]): Custom data for the reactionenforceUnique(Bool): Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one)skipPush(Bool)type(String) (required): Type of reaction
queryActivityReactions
Retrieve a list of reactions associated with a specific activity to analyze user engagement and response patterns. Use this to gain insights into activity interactions.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryActivityReactions(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: QueryActivityReactionsResponse
Parameters
Path Parameters:
activityID(String) (required)
Request Body:
filter([String: Any])limit(Int)next(String)prev(String)sort([SortParamRequest])
deleteActivityReaction
Remove a reaction from an activity to update user feedback or correct erroneous inputs. Use this when a reaction needs to be retracted or modified.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteActivityReaction(
activityID: "activity-123",
type: "post"
)
print(response)Response: DeleteActivityReactionResponse
Parameters
Path Parameters:
activityID(String) (required)type(String) (required)
Query Parameters:
deleteNotificationActivity(Bool)
getActivity
Fetch details of a specific activity to view or display the current state and content. Use this to retrieve complete information about an activity for further processing or display.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getActivity(
id: "example-id"
)
print(response)Response: GetActivityResponse
Parameters
Path Parameters:
id(String) (required)
Query Parameters:
commentSort(String)commentLimit(Int)
updateActivity
Replace all information of a specific activity to reflect new content or corrections. Use this when a full update of the activity's data is necessary.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateActivity(
request: .init(
attachments: [],
collectionRefs: ["value1", "value2"]
)
)
print(response)Response: UpdateActivityResponse
Parameters
Path Parameters:
id(String) (required)
Request Body:
attachments([Attachment]): List of attachments for the activitycollectionRefs([String]): Collections that this activity referencescopyCustomToNotification(Bool): Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom insteadcustom([String: Any]): Custom data for the activityenrichOwnFields(Bool): If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.expiresAt(Double): Time when the activity will expirefeeds([String]): List of feeds the activity is present infilterTags([String]): Tags used for filtering the activityhandleMentionNotifications(Bool): If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentionedinterestTags([String]): Tags indicating interest categorieslocation(Location): Geographic location for the activitymentionedUserIds([String]): List of user IDs mentioned in the activitypollID(String): Poll IDrestrictReplies(String): Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobodyrunActivityProcessors(Bool): If true, runs activity processors on the updated activity. Processors will only run if the activity text and/or attachments are changed. Defaults to false.searchData([String: Any]): Additional data for search indexingskipEnrichURL(Bool): Whether to skip URL enrichment for the activitytext(String): The text content of the activityvisibility(String): Visibility setting for the activityvisibilityTag(String): If visibility is 'tag', this is the tag name and is required
updateActivityPartial
Modify selected fields of an activity to make incremental changes without altering the entire activity. Use this for efficient updates when only specific attributes need adjustment.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateActivityPartial(
request: .init(
copyCustomToNotification: [:],
enrichOwnFields: true
)
)
print(response)Response: UpdateActivityPartialResponse
Parameters
Path Parameters:
id(String) (required)
Request Body:
copyCustomToNotification(Bool): Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom insteadenrichOwnFields(Bool): If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.handleMentionNotifications(Bool): If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentionedrunActivityProcessors(Bool): If true, runs activity processors on the updated activity. Processors will only run if the activity text and/or attachments are changed. Defaults to false.set([String: Any]): Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility', 'visibility_tag', 'restrict_replies' (values: 'everyone', 'people_i_follow', 'nobody'), 'location', 'expires_at', 'filter_tags', 'interest_tags', 'poll_id', 'feeds', 'mentioned_user_ids', 'search_data'. For custom fields, use dot-notation (e.g., 'custom.field_name')unset([String]): List of field names to remove. Supported fields: 'custom', 'visibility_tag', 'location', 'expires_at', 'filter_tags', 'interest_tags', 'attachments', 'poll_id', 'mentioned_user_ids', 'search_data'. Use dot-notation for nested custom fields (e.g., 'custom.field_name')
deleteActivity
Remove a specific activity from the feed to maintain relevance or manage content lifecycle. Use this when an activity is no longer needed or should not be displayed.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteActivity(
id: "example-id"
)
print(response)Response: DeleteActivityResponse
Parameters
Path Parameters:
id(String) (required)
Query Parameters:
hardDelete(Bool)deleteNotificationActivity(Bool)
restoreActivity
Restore a previously soft-deleted activity to make it active again, useful for recovering activities that were unintentionally removed or need to be reinstated.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.restoreActivity(
id: "example-id"
)
print(response)Response: RestoreActivityResponse
Parameters
Path Parameters:
id(String) (required)
Query Parameters:
enrichOwnFields(Bool)
queryBookmarkFolders
Retrieve a list of bookmark folders to organize and access saved activities quickly. Use this to manage user bookmarks and improve content retrieval efficiency.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryBookmarkFolders(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: QueryBookmarkFoldersResponse
Parameters
Request Body:
filter([String: Any]): Filters to apply to the querylimit(Int)next(String)prev(String)sort([SortParamRequest]): Sorting parameters for the query
updateBookmarkFolder
Modify the details of a bookmark folder to reorganize or rename it for better management. Use this when you need to update folder attributes for improved user experience.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateBookmarkFolder(
request: .init(
custom: [:],
name: "Example Name"
)
)
print(response)Response: UpdateBookmarkFolderResponse
Parameters
Path Parameters:
folderID(String) (required)
Request Body:
custom([String: Any]): Custom data for the foldername(String): Name of the folder
deleteBookmarkFolder
Remove a bookmark folder to declutter or reorganize saved content. Use this when a folder is no longer needed or should be consolidated with others.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteBookmarkFolder(
folderID: "example_value"
)
print(response)Response: DeleteBookmarkFolderResponse
Parameters
Path Parameters:
folderID(String) (required)
queryBookmarks
Retrieve a list of bookmarks based on specified criteria, useful for accessing saved or frequently accessed items quickly.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryBookmarks(
request: .init(
enrichOwnFields: true,
filter: [:]
)
)
print(response)Response: QueryBookmarksResponse
Parameters
Request Body:
enrichOwnFields(Bool)filter([String: Any]): Filters to apply to the querylimit(Int)next(String)prev(String)sort([SortParamRequest]): Sorting parameters for the query
readCollections
Fetch details of existing collections, enabling users to view and manage grouped data easily.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.readCollections()
print(response)Response: ReadCollectionsResponse
Parameters
Query Parameters:
collectionRefs([String])
createCollections
Create new collections in bulk, ideal for organizing large sets of data into manageable groups at once.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.createCollections(
request: .init(
collections: []
)
)
print(response)Response: CreateCollectionsResponse
Parameters
Request Body:
collections([CollectionRequest]) (required): List of collections to create
updateCollections
Modify existing collections by changing their attributes, facilitating the maintenance and customization of grouped data.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateCollections(
request: .init(
collections: []
)
)
print(response)Response: UpdateCollectionsResponse
Parameters
Request Body:
collections([UpdateCollectionRequest]) (required): List of collections to update (only custom data is updatable)
deleteCollections
Remove multiple collections at once, useful for cleaning up and organizing data by eliminating unneeded sets.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteCollections(
collectionRefs: "example_value"
)
print(response)Response: DeleteCollectionsResponse
Parameters
Query Parameters:
collectionRefs([String]) (required)
queryCollections
Retrieves data from specified collections, allowing you to access and filter stored information efficiently. Use this when you need to extract specific data from your collections for analysis or display.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryCollections(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: QueryCollectionsResponse
Parameters
Request Body:
filter([String: Any]): Filters to apply to the querylimit(Int)next(String)prev(String)sort([SortParamRequest]): Sorting parameters for the query
getComments
Retrieve comments related to a specific object, providing insights and feedback from users or collaborators.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getComments(
objectID: "example_value",
objectType: "example_value"
)
print(response)Response: GetCommentsResponse
Parameters
Query Parameters:
objectID(String) (required)objectType(String) (required)depth(Int)sort(String)repliesLimit(Int)idAround(String)limit(Int)prev(String)next(String)
addComment
Post a new comment or reply to an existing one, fostering interaction and discussion around a particular object.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.addComment(
request: .init(
attachments: [],
comment: "example_value"
)
)
print(response)Response: AddCommentResponse
Parameters
Request Body:
attachments([Attachment]): Media attachments for the replycomment(String): Text content of the commentcopyCustomToNotification(Bool): Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom insteadcreateNotificationActivity(Bool): Whether to create a notification activity for this commentcustom([String: Any]): Custom data for the commentid(String): Optional custom ID for the comment (max 255 characters). If not provided, a UUID will be generated.mentionedUserIds([String]): List of users mentioned in the replyobjectID(String): ID of the object to comment on. Required for root commentsobjectType(String): Type of the object to comment on. Required for root commentsparentID(String): ID of parent comment for replies. When provided, object_id and object_type are automatically inherited from the parent comment.skipEnrichURL(Bool): Whether to skip URL enrichment for this commentskipPush(Bool)
addCommentsBatch
Submit multiple comments in a single request, streamlining processes where multiple inputs are needed simultaneously.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.addCommentsBatch(
request: .init(
comments: []
)
)
print(response)Response: AddCommentsBatchResponse
Parameters
Request Body:
comments([AddCommentRequest]) (required): List of comments to add
queryComments
Search for comments based on defined parameters, allowing users to filter and locate specific discussions efficiently.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryComments(
request: .init(
filter: [:],
idAround: "example_value",
limit: 1
)
)
print(response)Response: QueryCommentsResponse
Parameters
Request Body:
filter([String: Any]) (required): Filter to apply to the queryidAround(String): Returns the comment with the specified ID along with surrounding comments for contextlimit(Int): Maximum number of comments to returnnext(String)prev(String)sort(String): Array of sort parameters
addCommentBookmark
Allows users to bookmark a comment for easy future reference. Use this to enable users to save important comments for quick access later.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.addCommentBookmark(
request: .init(
custom: [:],
folderID: "example_value"
)
)
print(response)Response: AddCommentBookmarkResponse
Parameters
Path Parameters:
commentID(String) (required)
Request Body:
custom([String: Any]): Custom data for the bookmarkfolderID(String): ID of the folder to add the bookmark tonewFolder(AddFolderRequest): Create a new folder for this bookmark
updateCommentBookmark
Modifies an existing comment bookmark to reflect changes or updates. Use this to ensure that user bookmarks remain relevant and up-to-date.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateCommentBookmark(
request: .init(
custom: [:],
folderID: "example_value"
)
)
print(response)Response: UpdateCommentBookmarkResponse
Parameters
Path Parameters:
commentID(String) (required)
Request Body:
custom([String: Any]): Custom data for the bookmarkfolderID(String): ID of the folder containing the bookmarknewFolder(AddFolderRequest): Create a new folder and move the bookmark into itnewFolderID(String): Move the bookmark to this folder (empty string removes the folder)
deleteCommentBookmark
Removes a bookmarked comment, freeing up space and reducing clutter. Use this when a bookmarked comment is no longer needed by the user.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteCommentBookmark(
commentID: "example_value"
)
print(response)Response: DeleteCommentBookmarkResponse
Parameters
Path Parameters:
commentID(String) (required)
Query Parameters:
folderID(String)
getComment
Retrieve a specific comment by its ID to view details or perform further operations. Use this method when you need to access the content or metadata of a particular comment.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getComment(
id: "example-id"
)
print(response)Response: GetCommentResponse
Parameters
Path Parameters:
id(String) (required)
updateComment
Modify the content or metadata of an existing comment. Use this method when you want to edit a comment's text or update its properties.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateComment(
request: .init(
attachments: [],
comment: "example_value"
)
)
print(response)Response: UpdateCommentResponse
Parameters
Path Parameters:
id(String) (required)
Request Body:
attachments([Attachment]): Updated media attachments for the comment. Providing this field will replace all existing attachments.comment(String): Updated text content of the commentcopyCustomToNotification(Bool): Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom insteadcustom([String: Any]): Updated custom data for the commenthandleMentionNotifications(Bool): If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentionedmentionedUserIds([String]): List of user IDs mentioned in the commentskipEnrichURL(Bool): Whether to skip URL enrichment for this commentskipPush(Bool)
deleteComment
Remove a comment from a feed. Use this method to permanently delete a comment when it is no longer needed.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteComment(
id: "example-id"
)
print(response)Response: DeleteCommentResponse
Parameters
Path Parameters:
id(String) (required)
Query Parameters:
hardDelete(Bool)deleteNotificationActivity(Bool)
updateCommentPartial
Applies partial updates to a comment, allowing for specific fields to be modified without altering the entire comment. Use this to efficiently update comment content or metadata.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateCommentPartial(
request: .init(
copyCustomToNotification: [:],
handleMentionNotifications: true
)
)
print(response)Response: UpdateCommentPartialResponse
Parameters
Path Parameters:
id(String) (required)
Request Body:
copyCustomToNotification(Bool): Whether to copy custom data to notification activities Deprecated: use notification_context.trigger.custom and notification_context.target.custom insteadhandleMentionNotifications(Bool): Whether to handle mention notification changesset([String: Any]): Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'mentioned_user_ids', 'status'. Use dot-notation for nested custom fields (e.g., 'custom.field_name')skipEnrichURL(Bool): Whether to skip URL enrichmentskipPush(Bool): Whether to skip push notificationsunset([String]): List of field names to remove. Supported fields: 'custom', 'attachments', 'mentioned_user_ids', 'status'. Use dot-notation for nested custom fields (e.g., 'custom.field_name')
addCommentReaction
Attach a reaction, such as a like or emoji, to a comment. Use this method to allow users to express their sentiments about a comment.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.addCommentReaction(
request: .init(
type: "post",
copyCustomToNotification: [:],
createNotificationActivity: true
)
)
print(response)Response: AddCommentReactionResponse
Parameters
Path Parameters:
id(String) (required)
Request Body:
copyCustomToNotification(Bool): Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom insteadcreateNotificationActivity(Bool): Whether to create a notification activity for this reactioncustom([String: Any]): Optional custom data to add to the reactionenforceUnique(Bool): Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one)skipPush(Bool)type(String) (required): The type of reaction, eg upvote, like, ...
queryCommentReactions
Retrieve all reactions associated with a specific comment. Use this method to view how users have interacted with a comment through various reactions.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryCommentReactions(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: QueryCommentReactionsResponse
Parameters
Path Parameters:
id(String) (required)
Request Body:
filter([String: Any])limit(Int)next(String)prev(String)sort([SortParamRequest])
deleteCommentReaction
Remove a specific reaction from a comment. Use this method when you need to retract or correct a reaction added to a comment.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.deleteCommentReaction(
id: "example-id",
type: "post"
)
print(response)Response: DeleteCommentReactionResponse
Parameters
Path Parameters:
id(String) (required)type(String) (required)
Query Parameters:
deleteNotificationActivity(Bool)
getCommentReplies
Fetch all replies associated with a specific comment. Use this method to view or manage the conversation thread stemming from a comment.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getCommentReplies(
id: "example-id"
)
print(response)Response: GetCommentRepliesResponse
Parameters
Path Parameters:
id(String) (required)
Query Parameters:
depth(Int)sort(String)repliesLimit(Int)idAround(String)limit(Int)prev(String)next(String)
restoreComment
Reactivates a comment that was previously soft-deleted, making it visible again. Use this to recover comments that were mistakenly deleted or need to be reinstated.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.restoreComment(
id: "example-id"
)
print(response)Response: RestoreCommentResponse
Parameters
Path Parameters:
id(String) (required)
getOrCreateFeed
Retrieve an existing feed or create a new one if it doesn't exist. Use this method to ensure a feed is available for content posting or interaction.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.getOrCreateFeed(
request: .init(
data: [:],
enrichmentOptions: "example_value"
)
)
print(response)Response: GetOrCreateFeedResponse
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)
Query Parameters:
connectionID(String)
Request Body:
data(FeedInput)enrichmentOptions(EnrichmentOptions)externalRanking([String: Any])filter([String: Any])followersPagination(PagerRequest)followingPagination(PagerRequest)friendReactionsOptions(FriendReactionsOptions)idAround(String)interestWeights([String: Any])limit(Int)memberPagination(PagerRequest)next(String)prev(String)view(String)watch(Bool)
updateFeed
Modify the details or settings of an existing feed to keep it current and relevant. Use this method when you want to change aspects like feed name, description, or settings.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.updateFeed(
request: .init(
clearLocation: true,
custom: [:]
)
)
print(response)Response: UpdateFeedResponse
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)
Request Body:
clearLocation(Bool): If true, removes the geographic location from the feedcustom([String: Any]): Custom data for the feeddescription(String): Description of the feedenrichOwnFields(Bool): If true, enriches the feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.filterTags([String]): Tags used for filtering feedslocation(Location): Geographic location for the feedname(String): Name of the feed
deleteFeed
Remove a specific feed permanently to clean up unused or obsolete data. This is useful when a feed is no longer needed and should be completely erased from your system.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.deleteFeed()
print(response)Response: DeleteFeedResponse
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)
Query Parameters:
hardDelete(Bool)
markActivity
Designate specific activities as read, seen, or watched to help users track their interactions and stay informed about new content. Use it to manage activity notifications and ensure users only see what is relevant to them.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.markActivity(
request: .init(
markAllRead: true,
markAllSeen: true
)
)
print(response)Response: Response
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)
Request Body:
markAllRead(Bool): Whether to mark all activities as readmarkAllSeen(Bool): Whether to mark all activities as seenmarkRead([String]): List of activity IDs to mark as readmarkSeen([String]): List of activity IDs to mark as seenmarkWatched([String]): List of activity IDs to mark as watched (for stories)
pinActivity
Highlight or prioritize an activity by pinning it to the top of a feed, ensuring it remains visible and easily accessible. This is useful for emphasizing important updates or content.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.pinActivity(
request: .init(
enrichOwnFields: true
)
)
print(response)Response: PinActivityResponse
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)activityID(String) (required)
Request Body:
enrichOwnFields(Bool): If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
unpinActivity
Remove a pinned activity from its prioritized position, allowing it to move naturally within the feed. Use this method when the activity no longer needs special emphasis.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.unpinActivity(
activityID: "activity-123"
)
print(response)Response: UnpinActivityResponse
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)activityID(String) (required)
Query Parameters:
enrichOwnFields(Bool)
updateFeedMembers
Modify the list of members associated with a feed, adding or removing individuals as necessary. This method is beneficial for managing access and collaboration within a feed.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.updateFeedMembers(
request: .init(
operation: "example_value",
limit: 1,
members: ["john", "jane"]
)
)
print(response)Response: UpdateFeedMembersResponse
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)
Request Body:
limit(Int)members([FeedMemberRequest]): List of members to upsert, remove, or setnext(String)operation(String) (required): Type of update operation to perform. One of: upsert, remove, setprev(String)
acceptFeedMemberInvite
Confirm and accept an invitation to join a feed as a member, facilitating collaboration and shared access. Use this method when you wish to join a feed you have been invited to.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.acceptFeedMemberInvite()
print(response)Response: AcceptFeedMemberInviteResponse
Parameters
Path Parameters:
feedID(String) (required)feedGroupID(String) (required)
queryFeedMembers
Retrieve a list of all members associated with a specific feed to understand who has access and manage member interactions. This is useful for auditing and managing feed membership.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.queryFeedMembers(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: QueryFeedMembersResponse
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)
Request Body:
filter([String: Any]): Filter parameters for the querylimit(Int)next(String)prev(String)sort([SortParamRequest]): Sort parameters for the query
rejectFeedMemberInvite
Decline an invitation to join a feed, preventing unwanted participation or access. Use this when you do not wish to be part of a feed you have been invited to.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.rejectFeedMemberInvite()
print(response)Response: RejectFeedMemberInviteResponse
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)
queryPinnedActivities
Retrieves a list of activities that have been pinned for prominence in a feed. Use this to highlight important or popular activities to your users.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.queryPinnedActivities(
request: .init(
enrichOwnFields: true,
filter: [:]
)
)
print(response)Response: QueryPinnedActivitiesResponse
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)
Request Body:
enrichOwnFields(Bool)filter([String: Any]): Filters to apply to the querylimit(Int)next(String)prev(String)sort([SortParamRequest]): Sorting parameters for the query
stopWatchingFeed
Use this method to unsubscribe from real-time updates of a specific feed, freeing up resources and reducing unnecessary data traffic when you no longer need live data.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let feed = client.feed(group: "user", id: "john")
try await feed.getOrCreate()
let response = try await feed.stopWatchingFeed()
print(response)Response: Response
Parameters
Path Parameters:
feedGroupID(String) (required)feedID(String) (required)
Query Parameters:
connectionID(String)
getFollowSuggestions
Receive personalized recommendations on which feeds or users to follow, enhancing user engagement and discovery of relevant content. This method is helpful for users looking to expand their network or interests.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getFollowSuggestions()
print(response)Response: GetFollowSuggestionsResponse
Parameters
Path Parameters:
feedGroupID(String) (required)
Query Parameters:
limit(Int)
createFeedsBatch
Simultaneously create multiple feeds with a single request. This method is ideal for initializing multiple content streams efficiently.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.createFeedsBatch(
request: .init(
feeds: ["user:john", "timeline:global"],
enrichOwnFields: true
)
)
print(response)Response: CreateFeedsBatchResponse
Parameters
Request Body:
enrichOwnFields(Bool): If true, enriches the created feeds with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.feeds([FeedRequest]) (required): List of feeds to create
ownBatch
Retrieve ownership details for multiple feeds. This is useful for managing or auditing which feeds you or your organization control.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.ownBatch(
request: .init(
feeds: ["user:john", "timeline:global"],
fields: ["value1", "value2"]
)
)
print(response)Response: OwnBatchResponse
Parameters
Query Parameters:
connectionID(String)
Request Body:
feeds([String]) (required): List of feed IDs to get own fields forfields([String]): Optional list of specific fields to return. If not specified, all fields (own_follows, own_followings, own_capabilities, own_membership) are returned
queryFeeds
Search and filter feeds based on specific criteria. Use this method to efficiently locate feeds that match your interests or requirements.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryFeeds(
request: .init(
enrichOwnFields: true,
filter: [:]
)
)
print(response)Response: QueryFeedsResponse
Parameters
Query Parameters:
connectionID(String)
Request Body:
enrichOwnFields(Bool)filter([String: Any]): Filters to apply to the querylimit(Int)next(String)prev(String)sort([SortParamRequest]): Sorting parameters for the querywatch(Bool): Whether to subscribe to realtime updates
follow
Establish a follow relationship with a feed, allowing you to receive updates or notifications about its content. Use this to stay informed about specific topics or creators.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.follow(
request: .init(
source: "example_value",
target: "example_value",
activityCopyLimit: 1,
copyCustomToNotification: [:]
)
)
print(response)Response: SingleFollowResponse
Parameters
Request Body:
activityCopyLimit(Int): Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000.copyCustomToNotification(Bool): Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom insteadcreateNotificationActivity(Bool): Whether to create a notification activity for this followcustom([String: Any]): Custom data for the follow relationshipenrichOwnFields(Bool): If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.pushPreference(String): Push preference for the follow relationshipskipPush(Bool): Whether to skip push for this followsource(String) (required): Fully qualified ID of the source feedtarget(String) (required): Fully qualified ID of the target feed
updateFollow
Modify an existing follow relationship. This method can be used to change your notification preferences or unfollow a feed when it is no longer relevant.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.updateFollow(
request: .init(
source: "example_value",
target: "example_value",
activityCopyLimit: 1,
copyCustomToNotification: [:]
)
)
print(response)Response: UpdateFollowResponse
Parameters
Request Body:
activityCopyLimit(Int): Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000.copyCustomToNotification(Bool): Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom insteadcreateNotificationActivity(Bool): Whether to create a notification activity for this followcustom([String: Any]): Custom data for the follow relationshipenrichOwnFields(Bool): If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.followerRole(String)pushPreference(String): Push preference for the follow relationshipskipPush(Bool): Whether to skip push for this followsource(String) (required): Fully qualified ID of the source feedtarget(String) (required): Fully qualified ID of the target feed
acceptFollow
Approve a pending follow request to allow a user to follow your feed, useful for managing access in private or protected feeds.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.acceptFollow(
request: .init(
source: "example_value",
target: "example_value",
followerRole: "example_value"
)
)
print(response)Response: AcceptFollowResponse
Parameters
Request Body:
followerRole(String): Optional role for the follower in the follow relationshipsource(String) (required): Fully qualified ID of the source feedtarget(String) (required): Fully qualified ID of the target feed
followBatch
Add multiple followers to a feed simultaneously, ideal for quickly expanding your feed's audience.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.followBatch(
request: .init(
follows: [],
enrichOwnFields: true
)
)
print(response)Response: FollowBatchResponse
Parameters
Request Body:
enrichOwnFields(Bool): If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.follows([FollowRequest]) (required): List of follow relationships to create
getOrCreateFollows
Ensure specified follows exist by either retrieving existing ones or creating them as needed, simplifying follow management.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getOrCreateFollows(
request: .init(
follows: [],
enrichOwnFields: true
)
)
print(response)Response: FollowBatchResponse
Parameters
Request Body:
enrichOwnFields(Bool): If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.follows([FollowRequest]) (required): List of follow relationships to create
queryFollows
Retrieve a list of users who are following a specific feed, helping you analyze and manage your audience.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.queryFollows(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: QueryFollowsResponse
Parameters
Request Body:
filter([String: Any]): Filters to apply to the querylimit(Int)next(String)prev(String)sort([SortParamRequest]): Sorting parameters for the query
rejectFollow
Deny a follow request to prevent a user from following your feed, useful for maintaining privacy or exclusivity.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.rejectFollow(
request: .init(
source: "example_value",
target: "example_value"
)
)
print(response)Response: RejectFollowResponse
Parameters
Request Body:
source(String) (required): Fully qualified ID of the source feedtarget(String) (required): Fully qualified ID of the target feed
unfollow
Remove a user from following a feed, helpful for managing your feed's audience or curating content access.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.unfollow(
source: "example_value",
target: "example_value"
)
print(response)Response: UnfollowResponse
Parameters
Path Parameters:
source(String) (required)target(String) (required)
Query Parameters:
deleteNotificationActivity(Bool)keepHistory(Bool)enrichOwnFields(Bool)
getOrCreateUnfollows
Ensure feeds are unfollowed without duplication by using an idempotent operation that simplifies management when transitioning away from specific content sources.
Example
import StreamCore
import StreamFeeds
let client = FeedsClient(
apiKey: APIKey("<your_api_key>"),
user: User(id: "john"),
token: "<user_token>"
)
try await client.connect()
let response = try await client.getOrCreateUnfollows(
request: .init(
follows: [],
deleteNotificationActivity: true,
enrichOwnFields: true
)
)
print(response)Response: UnfollowBatchResponse
Parameters
Request Body:
deleteNotificationActivity(Bool): Whether to delete the corresponding notification activity (default: false)enrichOwnFields(Bool): If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.follows([UnfollowPair]) (required): List of follow relationships to remove, each with optional keep_history
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
AcceptFeedMemberInviteResponse
struct AcceptFeedMemberInviteResponse {
var duration: String
var member: FeedMemberResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| member | FeedMemberResponse | Yes | The feed member after accepting the invite |
AcceptFollowResponse
struct AcceptFollowResponse {
var duration: String
var follow: FollowResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| follow | FollowResponse | Yes | The accepted follow relationship |
Action
struct Action {
var name: String
var style: String?
var text: String
var type: String
var 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
struct ActivityFeedbackResponse {
var activityID: String
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | String | Yes | The ID of the activity that received feedback |
| duration | String | Yes |
ActivityPinResponse
struct ActivityPinResponse {
var activity: ActivityResponse
var createdAt: Double
var feed: String
var updatedAt: Double
var user: UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The pinned activity |
| created_at | Double | Yes | When the pin was created |
| feed | String | Yes | ID of the feed where activity is pinned |
| updated_at | Double | Yes | When the pin was last updated |
| user | UserResponse | Yes | User who pinned the activity |
ActivityRequest
struct ActivityRequest {
var attachments: [Attachment]?
var collectionRefs: [String]?
var copyCustomToNotification: Bool?
var createNotificationActivity: Bool?
var custom: [String: Any]?
var expiresAt: String?
var feeds: [String]
var filterTags: [String]?
var id: String?
var interestTags: [String]?
var location: Location?
var mentionedUserIds: [String]?
var parentID: String?
var pollID: String?
var restrictReplies: String /* everyone | people_i_follow | nobody */?
var searchData: [String: Any]?
var skipEnrichURL: Bool?
var skipPush: Bool?
var text: String?
var type: String
var visibility: String /* public | private | tag */?
var visibilityTag: 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 | Bool | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | Bool | No | Whether to create notification activities for mentioned users |
| custom | [String: Any] | No | Custom data for the activity |
| expires_at | String | No | Expiration time for the activity |
| filter_tags | [String] | No | Tags for filtering activities |
| id | String | No | Optional ID for the activity |
| interest_tags | [String] | No | Tags for indicating user interests |
| location | Location | No | Geographic location related to the activity |
| mentioned_user_ids | [String] | No | List of users mentioned in the activity |
| parent_id | String | No | ID of parent activity for replies/comments |
| poll_id | String | No | ID of a poll to attach to activity |
| restrict_replies | String /* everyone | people_i_follow | nobody */ |
| search_data | [String: Any] | No | Additional data for search indexing |
| skip_enrich_url | Bool | No | Whether to skip URL enrichment for the activity |
| skip_push | Bool | No | Whether to skip push notifications |
| text | String | No | Text content of the activity |
| visibility | String /* public | private | tag */ |
| visibility_tag | String | No | If visibility is 'tag', this is the tag name and is required |
ActivityResponse
struct ActivityResponse {
var attachments: [Attachment]
var bookmarkCount: Int
var collections: [String: Any]
var commentCount: Int
var comments: [CommentResponse]
var createdAt: Double
var currentFeed: FeedResponse?
var custom: [String: Any]
var deletedAt: Double?
var editedAt: Double?
var expiresAt: Double?
var feeds: [String]
var filterTags: [String]
var friendReactionCount: Int?
var friendReactions: [FeedsReactionResponse]?
var hidden: Bool
var id: String
var interestTags: [String]
var isRead: Bool?
var isSeen: Bool?
var isWatched: Bool?
var latestReactions: [FeedsReactionResponse]
var location: Location?
var mentionedUsers: [UserResponse]
var metrics: [String: Any]?
var moderation: ModerationV2Response?
var moderationAction: String?
var notificationContext: NotificationContext?
var ownBookmarks: [BookmarkResponse]
var ownReactions: [FeedsReactionResponse]
var parent: ActivityResponse?
var poll: PollResponseData?
var popularity: Int
var preview: Bool
var reactionCount: Int
var reactionGroups: [String: Any]
var restrictReplies: String /* everyone | people_i_follow | nobody */
var score: Double
var scoreVars: [String: Any]?
var searchData: [String: Any]
var selectorSource: String?
var shareCount: Int
var text: String?
var type: String
var updatedAt: Double
var user: UserResponse
var visibility: String /* public | private | tag */
var visibilityTag: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | [Attachment] | Yes | Media attachments for the activity |
| bookmark_count | Int | Yes | Number of bookmarks on the activity |
| collections | [String: Any] | Yes | Enriched collection data referenced by this activity |
| comment_count | Int | Yes | Number of comments on the activity |
| comments | [CommentResponse] | Yes | Latest 5 comments of this activity (comment replies excluded) |
| created_at | Double | Yes | When the activity was created |
| custom | [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 | Bool | 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 | Int | Yes | Popularity score of the activity |
| preview | Bool | Yes | If this activity is obfuscated for this user. For premium content where you w... |
| reaction_count | Int | Yes | Number of reactions to the activity |
| reaction_groups | [String: Any] | Yes | Grouped reactions by type |
| restrict_replies | String /* everyone | people_i_follow | nobody */ |
| score | Double | Yes | Ranking score for this activity |
| search_data | [String: Any] | Yes | Data for search indexing |
| share_count | Int | Yes | Number of times the activity was shared |
| type | String | Yes | Type of activity |
| updated_at | Double | Yes | When the activity was last updated |
| user | UserResponse | Yes | User who created the activity |
| visibility | String /* public | private | tag */ |
| current_feed | FeedResponse | No | Feed context for this activity view. If an activity is added only to one feed... |
| deleted_at | Double | No | When the activity was deleted |
| edited_at | Double | No | When the activity was last edited |
| expires_at | Double | No | When the activity will expire |
| friend_reaction_count | Int | No | Total count of reactions from friends on this activity |
| friend_reactions | [FeedsReactionResponse] | No | Reactions from users the current user follows or has mutual follows with |
| is_read | Bool | No | Whether this activity has been read. Only set for feed groups with notificati... |
| is_seen | Bool | No | Whether this activity has been seen. Only set for feed groups with notificati... |
| is_watched | Bool | No | |
| location | Location | No | Geographic location related to the activity |
| metrics | [String: Any] | No | |
| moderation | ModerationV2Response | No | Moderation information |
| moderation_action | String | No | |
| notification_context | NotificationContext | No | Notification context data for the activity (if this is a reaction, comment, f... |
| parent | ActivityResponse | No | Parent activity (if this is a reply/comment) |
| poll | PollResponseData | No | Poll attached to this activity |
| score_vars | [String: Any] | No | Variable values used at ranking time. Only included when include_score_vars i... |
| selector_source | String | No | Which activity selector provided this activity (e.g., 'following', 'popular',... |
| text | String | No | Text content of the activity |
| visibility_tag | String | No | If visibility is 'tag', this is the tag name |
AddActivityResponse
struct AddActivityResponse {
var activity: ActivityResponse
var duration: String
var mentionNotificationsCreated: Int?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The created activity |
| duration | String | Yes | |
| mention_notifications_created | Int | No | Number of mention notification activities created for mentioned users |
AddBookmarkResponse
struct AddBookmarkResponse {
var bookmark: BookmarkResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The created bookmark |
| duration | String | Yes |
AddCommentBookmarkResponse
struct AddCommentBookmarkResponse {
var bookmark: BookmarkResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The created comment bookmark |
| duration | String | Yes |
AddCommentReactionResponse
struct AddCommentReactionResponse {
var comment: CommentResponse
var duration: String
var notificationCreated: Bool?
var 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 | Bool | No | Whether a notification activity was successfully created |
AddCommentRequest
struct AddCommentRequest {
var attachments: [Attachment]?
var comment: String?
var copyCustomToNotification: Bool?
var createNotificationActivity: Bool?
var custom: [String: Any]?
var id: String?
var mentionedUserIds: [String]?
var objectID: String?
var objectType: String?
var parentID: String?
var skipEnrichURL: Bool?
var skipPush: Bool?
}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 | Bool | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | Bool | No | Whether to create a notification activity for this comment |
| custom | [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 | Bool | No | Whether to skip URL enrichment for this comment |
| skip_push | Bool | No |
AddCommentResponse
struct AddCommentResponse {
var comment: CommentResponse
var duration: String
var mentionNotificationsCreated: Int?
var notificationCreated: Bool?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The created comment |
| duration | String | Yes | |
| mention_notifications_created | Int | No | Number of mention notification activities created for mentioned users |
| notification_created | Bool | No | Whether a notification activity was successfully created |
AddCommentsBatchResponse
struct AddCommentsBatchResponse {
var comments: [CommentResponse]
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | [CommentResponse] | Yes | List of comments added |
| duration | String | Yes |
AddFolderRequest
struct AddFolderRequest {
var custom: [String: Any]?
var name: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | Name of the folder |
| custom | [String: Any] | No | Custom data for the folder |
AddReactionResponse
struct AddReactionResponse {
var activity: ActivityResponse
var duration: String
var notificationCreated: Bool?
var reaction: FeedsReactionResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | |
| duration | String | Yes | |
| reaction | FeedsReactionResponse | Yes | The created reaction |
| notification_created | Bool | No | Whether a notification activity was successfully created |
AggregatedActivityResponse
struct AggregatedActivityResponse {
var activities: [ActivityResponse]
var activityCount: Int
var createdAt: Double
var group: String
var isRead: Bool?
var isSeen: Bool?
var isWatched: Bool?
var score: Double
var updatedAt: Double
var userCount: Int
var userCountTruncated: Bool
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | [ActivityResponse] | Yes | List of activities in this aggregation |
| activity_count | Int | Yes | Number of activities in this aggregation |
| created_at | Double | Yes | When the aggregation was created |
| group | String | Yes | Grouping identifier |
| score | Double | Yes | Ranking score for this aggregation |
| updated_at | Double | Yes | When the aggregation was last updated |
| user_count | Int | Yes | Number of unique users in this aggregation |
| user_count_truncated | Bool | Yes | Whether this activity group has been truncated due to exceeding the group siz... |
| is_read | Bool | No | Whether this aggregated group has been read. Only set for feed groups with no... |
| is_seen | Bool | No | Whether this aggregated group has been seen. Only set for feed groups with no... |
| is_watched | Bool | No |
Attachment
An attachment is a message object that represents a file uploaded by a user.
struct Attachment {
var actions: [Action]?
var assetURL: String?
var authorIcon: String?
var authorLink: String?
var authorName: String?
var color: String?
var custom: [String: Any]
var fallback: String?
var fields: [Field]?
var footer: String?
var footerIcon: String?
var giphy: Images?
var imageURL: String?
var ogScrapeURL: String?
var originalHeight: Int?
var originalWidth: Int?
var pretext: String?
var text: String?
var thumbURL: String?
var title: String?
var titleLink: String?
var type: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | [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 | Int | No | |
| original_width | Int | 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
struct BookmarkFolderResponse {
var createdAt: Double
var custom: [String: Any]?
var id: String
var name: String
var updatedAt: Double
var user: UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | When the folder was created |
| id | String | Yes | Unique identifier for the folder |
| name | String | Yes | Name of the folder |
| updated_at | Double | Yes | When the folder was last updated |
| user | UserResponse | Yes | User who created the folder |
| custom | [String: Any] | No | Custom data for the folder |
BookmarkResponse
struct BookmarkResponse {
var activity: ActivityResponse
var activityID: String?
var comment: CommentResponse?
var createdAt: Double
var custom: [String: Any]?
var folder: BookmarkFolderResponse?
var objectID: String
var objectType: String
var updatedAt: Double
var user: UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The bookmarked activity (set when object_type is activity) |
| created_at | Double | Yes | When the bookmark was created |
| object_id | String | Yes | ID of the bookmarked object |
| object_type | String | Yes | Type of the bookmarked object (activity or comment) |
| updated_at | Double | Yes | When the bookmark was last updated |
| user | UserResponse | Yes | User who created the bookmark |
| activity_id | String | No | |
| comment | CommentResponse | No | The bookmarked comment (set when object_type is comment) |
| custom | [String: Any] | No | Custom data for the bookmark |
| folder | BookmarkFolderResponse | No | Folder containing this bookmark |
CollectionRequest
struct CollectionRequest {
var custom: [String: Any]
var id: String?
var name: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | [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
struct CollectionResponse {
var createdAt: Double?
var custom: [String: Any]?
var id: String
var name: String
var updatedAt: Double?
var userID: 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 | Double | No | When the collection was created |
| custom | [String: Any] | No | Custom data for the collection |
| updated_at | Double | No | When the collection was last updated |
| user_id | String | No | ID of the user who owns this collection |
CommentResponse
struct CommentResponse {
var attachments: [Attachment]?
var bookmarkCount: Int
var confidenceScore: Double
var controversyScore: Double?
var createdAt: Double
var custom: [String: Any]?
var deletedAt: Double?
var downvoteCount: Int
var editedAt: Double?
var id: String
var latestReactions: [FeedsReactionResponse]?
var mentionedUsers: [UserResponse]
var moderation: ModerationV2Response?
var objectID: String
var objectType: String
var ownReactions: [FeedsReactionResponse]
var parentID: String?
var reactionCount: Int
var reactionGroups: [String: Any]?
var replyCount: Int
var score: Int
var status: String /* active | deleted | removed | hidden | shadow_blocked */
var text: String?
var updatedAt: Double
var upvoteCount: Int
var user: UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_count | Int | Yes | |
| confidence_score | Double | Yes | Confidence score of the comment |
| created_at | Double | Yes | When the comment was created |
| downvote_count | Int | 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 | Int | Yes | Number of reactions to this comment |
| reply_count | Int | Yes | Number of replies to this comment |
| score | Int | Yes | Score of the comment based on reactions |
| status | String /* active | deleted | removed |
| updated_at | Double | Yes | When the comment was last updated |
| upvote_count | Int | Yes | Number of upvotes for this comment |
| user | UserResponse | Yes | User who created the comment |
| attachments | [Attachment] | No | Attachments associated with the comment |
| controversy_score | Double | No | Controversy score of the comment |
| custom | [String: Any] | No | Custom data for the comment |
| deleted_at | Double | No | When the comment was deleted |
| edited_at | Double | No | When the comment was last edited |
| latest_reactions | [FeedsReactionResponse] | No | Recent reactions to the comment |
| moderation | ModerationV2Response | No | Moderation details for the comment |
| parent_id | String | No | ID of parent comment for nested replies |
| reaction_groups | [String: Any] | No | Grouped reactions by type |
| text | String | No | Text content of the comment |
CreateCollectionsResponse
struct CreateCollectionsResponse {
var collections: [CollectionResponse]
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | [CollectionResponse] | Yes | List of created collections |
| duration | String | Yes |
CreateFeedsBatchResponse
struct CreateFeedsBatchResponse {
var duration: String
var feeds: [FeedResponse]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| feeds | [FeedResponse] | Yes | List of created feeds |
Data
struct Data {
var id: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes |
DeleteActivitiesResponse
struct DeleteActivitiesResponse {
var deletedIds: [String]
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| deleted_ids | [String] | Yes | List of activity IDs that were successfully deleted |
| duration | String | Yes |
DeleteActivityReactionResponse
struct DeleteActivityReactionResponse {
var activity: ActivityResponse
var duration: String
var reaction: FeedsReactionResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | |
| duration | String | Yes | |
| reaction | FeedsReactionResponse | Yes |
DeleteActivityResponse
struct DeleteActivityResponse {
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes |
DeleteBookmarkFolderResponse
struct DeleteBookmarkFolderResponse {
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes |
DeleteBookmarkResponse
struct DeleteBookmarkResponse {
var bookmark: BookmarkResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The deleted bookmark |
| duration | String | Yes |
DeleteCollectionsResponse
struct DeleteCollectionsResponse {
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes |
DeleteCommentBookmarkResponse
struct DeleteCommentBookmarkResponse {
var bookmark: BookmarkResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The deleted comment bookmark |
| duration | String | Yes |
DeleteCommentReactionResponse
struct DeleteCommentReactionResponse {
var comment: CommentResponse
var duration: String
var 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
struct DeleteCommentResponse {
var activity: ActivityResponse
var comment: CommentResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The parent activity |
| comment | CommentResponse | Yes | The deleted comment |
| duration | String | Yes |
DeleteFeedResponse
struct DeleteFeedResponse {
var duration: String
var taskID: 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.
struct EnrichmentOptions {
var enrichOwnFollowings: Bool?
var includeScoreVars: Bool?
var skipActivity: Bool?
var skipActivityCollections: Bool?
var skipActivityComments: Bool?
var skipActivityCurrentFeed: Bool?
var skipActivityMentionedUsers: Bool?
var skipActivityOwnBookmarks: Bool?
var skipActivityParents: Bool?
var skipActivityPoll: Bool?
var skipActivityReactions: Bool?
var skipActivityRefreshImageUrls: Bool?
var skipAll: Bool?
var skipFeedMemberUser: Bool?
var skipFollowers: Bool?
var skipFollowing: Bool?
var skipOwnCapabilities: Bool?
var skipOwnFollows: Bool?
var skipPins: Bool?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enrich_own_followings | Bool | No | Default: false. When true, includes fetching and enriching own_followings (fo... |
| include_score_vars | Bool | No | Default: false. When true, includes score_vars in activity responses containi... |
| skip_activity | Bool | No | Default: false. When true, skips all activity enrichments. |
| skip_activity_collections | Bool | No | Default: false. When true, skips enriching collections on activities. |
| skip_activity_comments | Bool | No | Default: false. When true, skips enriching comments on activities. |
| skip_activity_current_feed | Bool | No | Default: false. When true, skips enriching current_feed on activities. Note: ... |
| skip_activity_mentioned_users | Bool | No | Default: false. When true, skips enriching mentioned users on activities. |
| skip_activity_own_bookmarks | Bool | No | Default: false. When true, skips enriching own bookmarks on activities. |
| skip_activity_parents | Bool | No | Default: false. When true, skips enriching parent activities. |
| skip_activity_poll | Bool | No | Default: false. When true, skips enriching poll data on activities. |
| skip_activity_reactions | Bool | No | Default: false. When true, skips fetching and enriching latest and own reacti... |
| skip_activity_refresh_image_urls | Bool | No | Default: false. When true, skips refreshing image URLs on activities. |
| skip_all | Bool | No | Default: false. When true, skips all enrichments. |
| skip_feed_member_user | Bool | No | Default: false. When true, skips enriching user data on feed members. |
| skip_followers | Bool | No | Default: false. When true, skips fetching and enriching followers. Note: If f... |
| skip_following | Bool | No | Default: false. When true, skips fetching and enriching following. Note: If f... |
| skip_own_capabilities | Bool | No | Default: false. When true, skips computing and including capabilities for feeds. |
| skip_own_follows | Bool | No | Default: false. When true, skips fetching and enriching own_follows (follows ... |
| skip_pins | Bool | No | Default: false. When true, skips enriching pinned activities. |
FeedInput
struct FeedInput {
var custom: [String: Any]?
var description: String?
var filterTags: [String]?
var location: Location?
var members: [FeedMemberRequest]?
var name: String?
var visibility: String /* public | visible | followers | members | private */?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | [String: Any] | No | |
| description | String | No | |
| filter_tags | [String] | No | |
| location | Location | No | |
| members | [FeedMemberRequest] | No | |
| name | String | No | |
| visibility | String /* public | visible | followers |
FeedMemberRequest
struct FeedMemberRequest {
var custom: [String: Any]?
var invite: Bool?
var membershipLevel: String?
var role: String?
var userID: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| user_id | String | Yes | ID of the user to add as a member |
| custom | [String: Any] | No | Custom data for the member |
| invite | Bool | 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
struct FeedMemberResponse {
var createdAt: Double
var custom: [String: Any]?
var inviteAcceptedAt: Double?
var inviteRejectedAt: Double?
var membershipLevel: MembershipLevelResponse?
var role: String
var status: String /* member | pending | rejected */
var updatedAt: Double
var user: UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | When the membership was created |
| role | String | Yes | Role of the member in the feed |
| status | String /* member | pending | rejected */ |
| updated_at | Double | Yes | When the membership was last updated |
| user | UserResponse | Yes | User who is a member |
| custom | [String: Any] | No | Custom data for the membership |
| invite_accepted_at | Double | No | When the invite was accepted |
| invite_rejected_at | Double | No | When the invite was rejected |
| membership_level | MembershipLevelResponse | No | Membership level assigned to the member |
FeedRequest
struct FeedRequest {
var createdByID: String?
var custom: [String: Any]?
var description: String?
var feedGroupID: String
var feedID: String
var filterTags: [String]?
var location: Location?
var members: [FeedMemberRequest]?
var name: String?
var visibility: String /* 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 | [String: Any] | No | Custom data for the feed |
| description | String | No | Description of the feed |
| filter_tags | [String] | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| members | [FeedMemberRequest] | No | Initial members for the feed |
| name | String | No | Name of the feed |
| visibility | String /* public | visible | followers |
FeedResponse
struct FeedResponse {
var activityCount: Int
var createdAt: Double
var createdBy: UserResponse
var custom: [String: Any]?
var deletedAt: Double?
var description: String
var feed: String
var filterTags: [String]?
var followerCount: Int
var followingCount: Int
var groupID: String
var id: String
var location: Location?
var memberCount: Int
var name: String
var ownCapabilities: [FeedOwnCapability]?
var ownFollowings: [FollowResponse]?
var ownFollows: [FollowResponse]?
var ownMembership: FeedMemberResponse?
var pinCount: Int
var updatedAt: Double
var visibility: String /* public | visible | followers | members | private */?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_count | Int | Yes | |
| created_at | Double | 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 | Int | Yes | Number of followers of this feed |
| following_count | Int | 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 | Int | Yes | Number of members in this feed |
| name | String | Yes | Name of the feed |
| pin_count | Int | Yes | Number of pinned activities in this feed |
| updated_at | Double | Yes | When the feed was last updated |
| custom | [String: Any] | No | Custom data for the feed |
| deleted_at | Double | No | When the feed was deleted |
| filter_tags | [String] | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| own_capabilities | [FeedOwnCapability] | No | Capabilities the current user has for this feed |
| own_followings | [FollowResponse] | No | Follow relationships where the feed owner’s feeds are following the current... |
| own_follows | [FollowResponse] | No | Follow relationships where the current user's feeds are following this feed |
| own_membership | FeedMemberResponse | No | Membership information for the current user in this feed |
| visibility | String /* public | visible | followers |
FeedSuggestionResponse
struct FeedSuggestionResponse {
var activityCount: Int
var algorithmScores: [String: Any]?
var createdAt: Double
var createdBy: UserResponse
var custom: [String: Any]?
var deletedAt: Double?
var description: String
var feed: String
var filterTags: [String]?
var followerCount: Int
var followingCount: Int
var groupID: String
var id: String
var location: Location?
var memberCount: Int
var name: String
var ownCapabilities: [FeedOwnCapability]?
var ownFollowings: [FollowResponse]?
var ownFollows: [FollowResponse]?
var ownMembership: FeedMemberResponse?
var pinCount: Int
var reason: String?
var recommendationScore: Double?
var updatedAt: Double
var visibility: String /* public | visible | followers | members | private */?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_count | Int | Yes | |
| created_at | Double | 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 | Int | Yes | Number of followers of this feed |
| following_count | Int | 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 | Int | Yes | Number of members in this feed |
| name | String | Yes | Name of the feed |
| pin_count | Int | Yes | Number of pinned activities in this feed |
| updated_at | Double | Yes | When the feed was last updated |
| algorithm_scores | [String: Any] | No | |
| custom | [String: Any] | No | Custom data for the feed |
| deleted_at | Double | No | When the feed was deleted |
| filter_tags | [String] | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| own_capabilities | [FeedOwnCapability] | No | Capabilities the current user has for this feed |
| own_followings | [FollowResponse] | No | Follow relationships where the feed owner’s feeds are following the current... |
| own_follows | [FollowResponse] | No | Follow relationships where the current user's feeds are following this feed |
| own_membership | FeedMemberResponse | No | Membership information for the current user in this feed |
| reason | String | No | |
| recommendation_score | Double | No | |
| visibility | String /* public | visible | followers |
FeedsReactionResponse
struct FeedsReactionResponse {
var activityID: String
var commentID: String?
var createdAt: Double
var custom: [String: Any]?
var type: String
var updatedAt: Double
var user: UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | String | Yes | ID of the activity that was reacted to |
| created_at | Double | Yes | When the reaction was created |
| type | String | Yes | Type of reaction |
| updated_at | Double | 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 | [String: Any] | No | Custom data for the reaction |
Field
struct Field {
var short: Bool
var title: String
var value: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | Bool | Yes | |
| title | String | Yes | |
| value | String | Yes |
FollowBatchResponse
struct FollowBatchResponse {
var created: [FollowResponse]
var duration: String
var follows: [FollowResponse]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created | [FollowResponse] | Yes | List of newly created follow relationships |
| duration | String | Yes | |
| follows | [FollowResponse] | Yes | List of current follow relationships |
FollowRequest
struct FollowRequest {
var activityCopyLimit: Int?
var copyCustomToNotification: Bool?
var createNotificationActivity: Bool?
var custom: [String: Any]?
var enrichOwnFields: Bool?
var pushPreference: String /* all | none */?
var skipPush: Bool?
var source: String
var target: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| source | String | Yes | Fully qualified ID of the source feed |
| target | String | Yes | Fully qualified ID of the target feed |
| activity_copy_limit | Int | No | Maximum number of historical activities to copy from the target feed when the... |
| copy_custom_to_notification | Bool | No | Whether to copy custom data to the notification activity (only applies when c... |
| create_notification_activity | Bool | No | Whether to create a notification activity for this follow |
| custom | [String: Any] | No | Custom data for the follow relationship |
| enrich_own_fields | Bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields ... |
| push_preference | String /* all | none */ | No |
| skip_push | Bool | No | Whether to skip push for this follow |
FollowResponse
struct FollowResponse {
var createdAt: Double
var custom: [String: Any]?
var followerRole: String
var pushPreference: String /* all | none */
var requestAcceptedAt: Double?
var requestRejectedAt: Double?
var sourceFeed: FeedResponse
var status: String /* accepted | pending | rejected */
var targetFeed: FeedResponse
var updatedAt: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | When the follow relationship was created |
| follower_role | String | Yes | Role of the follower (source user) in the follow relationship |
| push_preference | String /* all | none */ | Yes |
| source_feed | FeedResponse | Yes | Source feed object |
| status | String /* accepted | pending | rejected */ |
| target_feed | FeedResponse | Yes | Target feed object |
| updated_at | Double | Yes | When the follow relationship was last updated |
| custom | [String: Any] | No | Custom data for the follow relationship |
| request_accepted_at | Double | No | When the follow request was accepted |
| request_rejected_at | Double | No | When the follow request was rejected |
FriendReactionsOptions
Options to control fetching reactions from friends (users you follow or have mutual follows with).
struct FriendReactionsOptions {
var enabled: Bool?
var limit: Int?
var type: String /* following | mutual */?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | No | Default: false. When true, fetches friend reactions for activities. |
| limit | Int | No | Default: 3, Max: 10. The maximum number of friend reactions to return per act... |
| type | String /* following | mutual */ | No |
GetActivityResponse
struct GetActivityResponse {
var activity: ActivityResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The requested activity |
| duration | String | Yes |
GetCommentRepliesResponse
struct GetCommentRepliesResponse {
var comments: [ThreadedCommentResponse]
var duration: String
var next: String?
var prev: String?
var sort: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | [ThreadedCommentResponse] | Yes | Threaded listing of replies to the comment |
| duration | String | Yes | |
| sort | String | Yes | Sort order used for the replies (first, last, top, best, controversial) |
| next | String | No | |
| prev | String | No |
GetCommentResponse
struct GetCommentResponse {
var comment: CommentResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | Comment |
| duration | String | Yes |
GetCommentsResponse
struct GetCommentsResponse {
var comments: [ThreadedCommentResponse]
var duration: String
var next: String?
var prev: String?
var sort: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | [ThreadedCommentResponse] | Yes | Threaded listing for the activity |
| duration | String | Yes | |
| sort | String | Yes | Sort order used for the comments (first, last, top, best, controversial) |
| next | String | No | |
| prev | String | No |
GetFollowSuggestionsResponse
struct GetFollowSuggestionsResponse {
var algorithmUsed: String?
var duration: String
var 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
struct GetOrCreateFeedResponse {
var activities: [ActivityResponse]
var aggregatedActivities: [AggregatedActivityResponse]
var created: Bool
var duration: String
var feed: FeedResponse
var followers: [FollowResponse]
var followersPagination: PagerResponse?
var following: [FollowResponse]
var followingPagination: PagerResponse?
var memberPagination: PagerResponse?
var members: [FeedMemberResponse]
var next: String?
var notificationStatus: NotificationStatusResponse?
var pinnedActivities: [ActivityPinResponse]
var prev: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | [ActivityResponse] | Yes | |
| aggregated_activities | [AggregatedActivityResponse] | Yes | |
| created | Bool | 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
struct Images {
var fixedHeight: ImageData
var fixedHeightDownsampled: ImageData
var fixedHeightStill: ImageData
var fixedWidth: ImageData
var fixedWidthDownsampled: ImageData
var fixedWidthStill: ImageData
var 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 |
Location
struct Location {
var lat: Double
var lng: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| lat | Double | Yes | Latitude coordinate |
| lng | Double | Yes | Longitude coordinate |
NotificationStatusResponse
struct NotificationStatusResponse {
var lastReadAt: Double?
var lastSeenAt: Double?
var readActivities: [String]?
var seenActivities: [String]?
var unread: Int
var unseen: Int
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| unread | Int | Yes | Number of unread notifications |
| unseen | Int | Yes | Number of unseen notifications |
| last_read_at | Double | No | When notifications were last read |
| last_seen_at | Double | No | When notifications were last seen |
| read_activities | [String] | No | Deprecated: use is_read on each activity/group instead. IDs of activities tha... |
| seen_activities | [String] | No | Deprecated: use is_seen on each activity/group instead. IDs of activities tha... |
OwnBatchResponse
struct OwnBatchResponse {
var data: [String: Any]
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| data | [String: Any] | Yes | Map of feed ID to own fields data |
| duration | String | Yes |
PagerRequest
struct PagerRequest {
var limit: Int?
var next: String?
var prev: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | Int | No | |
| next | String | No | |
| prev | String | No |
PagerResponse
struct PagerResponse {
var next: String?
var prev: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| next | String | No | |
| prev | String | No |
PinActivityResponse
struct PinActivityResponse {
var activity: ActivityResponse
var createdAt: Double
var duration: String
var feed: String
var userID: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The pinned activity |
| created_at | Double | Yes | When the activity was pinned |
| duration | String | Yes | |
| feed | String | Yes | Fully qualified ID of the feed the activity was pinned to |
| user_id | String | Yes | ID of the user who pinned the activity |
PollResponseData
struct PollResponseData {
var allowAnswers: Bool
var allowUserSuggestedOptions: Bool
var answersCount: Int
var createdAt: Double
var createdBy: UserResponse?
var createdByID: String
var custom: [String: Any]
var description: String
var enforceUniqueVote: Bool
var id: String
var isClosed: Bool?
var latestAnswers: [PollVoteResponseData]
var latestVotesByOption: [String: Any]
var maxVotesAllowed: Int?
var name: String
var options: [PollOptionResponseData]
var ownVotes: [PollVoteResponseData]
var updatedAt: Double
var voteCount: Int
var voteCountsByOption: [String: Any]
var votingVisibility: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | Bool | Yes | |
| allow_user_suggested_options | Bool | Yes | |
| answers_count | Int | Yes | |
| created_at | Double | Yes | |
| created_by_id | String | Yes | |
| custom | [String: Any] | Yes | |
| description | String | Yes | |
| enforce_unique_vote | Bool | Yes | |
| id | String | Yes | |
| latest_answers | [PollVoteResponseData] | Yes | |
| latest_votes_by_option | [String: Any] | Yes | |
| name | String | Yes | |
| options | [PollOptionResponseData] | Yes | |
| own_votes | [PollVoteResponseData] | Yes | |
| updated_at | Double | Yes | |
| vote_count | Int | Yes | |
| vote_counts_by_option | [String: Any] | Yes | |
| voting_visibility | String | Yes | |
| created_by | UserResponse | No | |
| is_closed | Bool | No | |
| max_votes_allowed | Int | No |
PollVoteResponse
struct PollVoteResponse {
var duration: String
var poll: PollResponseData?
var 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
struct PollVoteResponseData {
var answerText: String?
var createdAt: Double
var id: String
var isAnswer: Bool?
var optionID: String
var pollID: String
var updatedAt: Double
var user: UserResponse?
var userID: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| id | String | Yes | |
| option_id | String | Yes | |
| poll_id | String | Yes | |
| updated_at | Double | Yes | |
| answer_text | String | No | |
| is_answer | Bool | No | |
| user | UserResponse | No | |
| user_id | String | No |
QueryActivitiesResponse
struct QueryActivitiesResponse {
var activities: [ActivityResponse]
var duration: String
var next: String?
var 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
struct QueryActivityReactionsResponse {
var duration: String
var next: String?
var prev: String?
var 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
struct QueryBookmarkFoldersResponse {
var bookmarkFolders: [BookmarkFolderResponse]
var duration: String
var next: String?
var 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
struct QueryBookmarksResponse {
var bookmarks: [BookmarkResponse]
var duration: String
var next: String?
var prev: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmarks | [BookmarkResponse] | Yes | List of bookmarks matching the query |
| duration | String | Yes | |
| next | String | No | Cursor for next page |
| prev | String | No | Cursor for previous page |
QueryCollectionsResponse
struct QueryCollectionsResponse {
var collections: [CollectionResponse]
var duration: String
var next: String?
var prev: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | [CollectionResponse] | Yes | List of collections matching the query |
| duration | String | Yes | |
| next | String | No | Cursor for next page |
| prev | String | No | Cursor for previous page |
QueryCommentReactionsResponse
Basic response information
struct QueryCommentReactionsResponse {
var duration: String
var next: String?
var prev: String?
var 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
struct QueryCommentsResponse {
var comments: [CommentResponse]
var duration: String
var next: String?
var 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
struct QueryFeedMembersResponse {
var duration: String
var members: [FeedMemberResponse]
var next: String?
var 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
struct QueryFeedsResponse {
var duration: String
var feeds: [FeedResponse]
var next: String?
var 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
struct QueryFollowsResponse {
var duration: String
var follows: [FollowResponse]
var next: String?
var 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 |
QueryPinnedActivitiesResponse
struct QueryPinnedActivitiesResponse {
var duration: String
var next: String?
var pinnedActivities: [ActivityPinResponse]
var prev: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| pinned_activities | [ActivityPinResponse] | Yes | List of pinned activities matching the query |
| next | String | No | Cursor for next page |
| prev | String | No | Cursor for previous page |
Reaction
struct Reaction {
var activityID: String
var childrenCounts: [String: Any]?
var createdAt: Double
var data: [String: Any]?
var deletedAt: Double?
var id: String?
var kind: String
var latestChildren: [String: Any]?
var moderation: [String: Any]?
var ownChildren: [String: Any]?
var parent: String?
var score: Double?
var targetFeeds: [String]?
var targetFeedsExtraData: [String: Any]?
var updatedAt: Double
var user: User?
var userID: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | String | Yes | |
| created_at | Double | Yes | |
| kind | String | Yes | |
| updated_at | Double | Yes | |
| user_id | String | Yes | |
| children_counts | [String: Any] | No | |
| data | [String: Any] | No | |
| deleted_at | Double | No | |
| id | String | No | |
| latest_children | [String: Any] | No | |
| moderation | [String: Any] | No | |
| own_children | [String: Any] | No | |
| parent | String | No | |
| score | Double | No | |
| target_feeds | [String] | No | |
| target_feeds_extra_data | [String: Any] | No | |
| user | User | No |
ReadCollectionsResponse
struct ReadCollectionsResponse {
var collections: [CollectionResponse]
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | [CollectionResponse] | Yes | List of collections matching the references |
| duration | String | Yes |
RejectFeedMemberInviteResponse
struct RejectFeedMemberInviteResponse {
var duration: String
var member: FeedMemberResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| member | FeedMemberResponse | Yes | The feed member after rejecting the invite |
RejectFollowResponse
struct RejectFollowResponse {
var duration: String
var follow: FollowResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| follow | FollowResponse | Yes | The rejected follow relationship |
Response
Basic response information
struct Response {
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | Duration of the request in milliseconds |
RestoreActivityResponse
struct RestoreActivityResponse {
var activity: ActivityResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The restored activity with full enrichment |
| duration | String | Yes |
RestoreCommentResponse
struct RestoreCommentResponse {
var activity: ActivityResponse
var comment: CommentResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The parent activity with updated counts |
| comment | CommentResponse | Yes | The restored comment |
| duration | String | Yes |
SingleFollowResponse
struct SingleFollowResponse {
var duration: String
var follow: FollowResponse
var notificationCreated: Bool?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| follow | FollowResponse | Yes | The created follow relationship |
| notification_created | Bool | No | Whether a notification activity was successfully created |
SortParam
struct SortParam {
var direction: Int
var field: String
var type: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | Int | Yes | |
| field | String | Yes | |
| type | String | Yes |
SortParamRequest
struct SortParamRequest {
var direction: Int?
var field: String?
var type: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | Int | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One o... |
| field | String | No | Name of field to sort by |
| type | String | No | Type of field to sort by. Empty string or omitted means string type (default)... |
ThreadedCommentResponse
A comment with an optional, depth‑limited slice of nested replies.
struct ThreadedCommentResponse {
var attachments: [Attachment]?
var bookmarkCount: Int
var confidenceScore: Double
var controversyScore: Double?
var createdAt: Double
var custom: [String: Any]?
var deletedAt: Double?
var downvoteCount: Int
var editedAt: Double?
var id: String
var latestReactions: [FeedsReactionResponse]?
var mentionedUsers: [UserResponse]
var meta: RepliesMeta?
var moderation: ModerationV2Response?
var objectID: String
var objectType: String
var ownReactions: [FeedsReactionResponse]
var parentID: String?
var reactionCount: Int
var reactionGroups: [String: Any]?
var replies: [ThreadedCommentResponse]?
var replyCount: Int
var score: Int
var status: String /* active | deleted | removed | hidden | shadow_blocked */
var text: String?
var updatedAt: Double
var upvoteCount: Int
var user: UserResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_count | Int | Yes | |
| confidence_score | Double | Yes | |
| created_at | Double | Yes | |
| downvote_count | Int | Yes | |
| id | String | Yes | |
| mentioned_users | [UserResponse] | Yes | |
| object_id | String | Yes | |
| object_type | String | Yes | |
| own_reactions | [FeedsReactionResponse] | Yes | |
| reaction_count | Int | Yes | |
| reply_count | Int | Yes | |
| score | Int | Yes | |
| status | String /* active | deleted | removed |
| updated_at | Double | Yes | |
| upvote_count | Int | Yes | |
| user | UserResponse | Yes | |
| attachments | [Attachment] | No | |
| controversy_score | Double | No | |
| custom | [String: Any] | No | |
| deleted_at | Double | No | |
| edited_at | Double | 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 | [String: Any] | No | |
| replies | [ThreadedCommentResponse] | No | Slice of nested comments (may be empty). |
| text | String | No |
Time
struct Time {
}TrackActivityMetricsEvent
A single metric event to track for an activity
struct TrackActivityMetricsEvent {
var activityID: String
var delta: Int?
var metric: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | String | Yes | The ID of the activity to track the metric for |
| metric | String | Yes | The metric name (e.g. views, clicks, impressions). Alphanumeric and underscor... |
| delta | Int | No | The amount to increment (positive) or decrement (negative). Defaults to 1. Th... |
TrackActivityMetricsEventResult
Result of tracking a single metric event
struct TrackActivityMetricsEventResult {
var activityID: String
var allowed: Bool
var error: String?
var metric: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | String | Yes | The activity ID from the request |
| allowed | Bool | Yes | Whether the metric was counted (false if rate-limited) |
| metric | String | Yes | The metric name from the request |
| error | String | No | Error message if processing failed |
TrackActivityMetricsResponse
Response containing results for each tracked metric event
struct TrackActivityMetricsResponse {
var duration: String
var results: [TrackActivityMetricsEventResult]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| results | [TrackActivityMetricsEventResult] | Yes | Results for each event in the request, in the same order |
UnfollowBatchResponse
struct UnfollowBatchResponse {
var duration: String
var follows: [FollowResponse]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| follows | [FollowResponse] | Yes | List of follow relationships that were removed |
UnfollowPair
struct UnfollowPair {
var keepHistory: Bool?
var source: String
var target: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| source | String | Yes | Fully qualified ID of the source feed |
| target | String | Yes | Fully qualified ID of the target feed |
| keep_history | Bool | No | When true, activities from the unfollowed feed will remain in the source feed... |
UnfollowResponse
struct UnfollowResponse {
var duration: String
var follow: FollowResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| follow | FollowResponse | Yes | The deleted follow relationship |
UnpinActivityResponse
struct UnpinActivityResponse {
var activity: ActivityResponse
var duration: String
var feed: String
var userID: 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
struct UpdateActivityPartialResponse {
var activity: ActivityResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The updated activity |
| duration | String | Yes |
UpdateActivityResponse
struct UpdateActivityResponse {
var activity: ActivityResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The updated activity |
| duration | String | Yes |
UpdateBookmarkFolderResponse
struct UpdateBookmarkFolderResponse {
var bookmarkFolder: BookmarkFolderResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_folder | BookmarkFolderResponse | Yes | The updated bookmark folder |
| duration | String | Yes |
UpdateBookmarkResponse
struct UpdateBookmarkResponse {
var bookmark: BookmarkResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The updated bookmark |
| duration | String | Yes |
UpdateCollectionRequest
struct UpdateCollectionRequest {
var custom: [String: Any]
var id: String
var name: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | [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
struct UpdateCollectionsResponse {
var collections: [CollectionResponse]
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | [CollectionResponse] | Yes | List of updated collections |
| duration | String | Yes |
UpdateCommentBookmarkResponse
struct UpdateCommentBookmarkResponse {
var bookmark: BookmarkResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The updated comment bookmark |
| duration | String | Yes |
UpdateCommentPartialResponse
struct UpdateCommentPartialResponse {
var comment: CommentResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The updated comment |
| duration | String | Yes |
UpdateCommentResponse
struct UpdateCommentResponse {
var comment: CommentResponse
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The updated comment |
| duration | String | Yes |
UpdateFeedMembersResponse
Basic response information
struct UpdateFeedMembersResponse {
var added: [FeedMemberResponse]
var duration: String
var removedIds: [String]
var 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
struct UpdateFeedResponse {
var duration: String
var feed: FeedResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| feed | FeedResponse | Yes | The updated feed |
UpdateFollowResponse
struct UpdateFollowResponse {
var duration: String
var follow: FollowResponse
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| follow | FollowResponse | Yes | Details of the updated follow relationship |
UpsertActivitiesResponse
struct UpsertActivitiesResponse {
var activities: [ActivityResponse]
var duration: String
var mentionNotificationsCreated: Int?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | [ActivityResponse] | Yes | List of created or updated activities |
| duration | String | Yes | |
| mention_notifications_created | Int | No | Total number of mention notification activities created for mentioned users a... |
User
struct User {
var data: [String: Any]?
var id: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | |
| data | [String: Any] | No |
UserRequest
User request object
struct UserRequest {
var custom: [String: Any]?
var id: String
var image: String?
var invisible: Bool?
var language: String?
var name: String?
var privacySettings: PrivacySettingsResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | User ID |
| custom | [String: Any] | No | Custom user data |
| image | String | No | User's profile image URL |
| invisible | Bool | No | |
| language | String | No | |
| name | String | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No |
UserResponse
User response object
struct UserResponse {
var avgResponseTime: Int?
var banned: Bool
var blockedUserIds: [String]
var createdAt: Double
var custom: [String: Any]
var deactivatedAt: Double?
var deletedAt: Double?
var id: String
var image: String?
var language: String
var lastActive: Double?
var name: String?
var online: Bool
var revokeTokensIssuedBefore: Double?
var role: String
var teams: [String]
var teamsRole: [String: Any]?
var updatedAt: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | Bool | Yes | Whether a user is banned or not |
| blocked_user_ids | [String] | Yes | |
| created_at | Double | Yes | Date/time of creation |
| custom | [String: Any] | Yes | Custom data for this object |
| id | String | Yes | Unique user identifier |
| language | String | Yes | Preferred language of a user |
| online | Bool | 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 | Double | Yes | Date/time of the last update |
| avg_response_time | Int | No | |
| deactivated_at | Double | No | Date of deactivation |
| deleted_at | Double | No | Date/time of deletion |
| image | String | No | |
| last_active | Double | No | Date of last activity |
| name | String | No | Optional name of user |
| revoke_tokens_issued_before | Double | No | Revocation date for tokens |
| teams_role | [String: Any] | No |
VoteData
struct VoteData {
var answerText: String?
var optionID: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| answer_text | String | No | |
| option_id | String | No |