Appearance
Feeds
About 22804 wordsAbout 76 min
Python SDK - Feeds API
Table of Contents
- add_activity
- upsert_activities
- update_activities_partial_batch
- delete_activities
- track_activity_metrics
- query_activities
- add_bookmark
- update_bookmark
- delete_bookmark
- activity_feedback
- cast_poll_vote
- delete_poll_vote
- add_activity_reaction
- query_activity_reactions
- delete_activity_reaction
- get_activity
- update_activity
- update_activity_partial
- delete_activity
- restore_activity
- query_bookmark_folders
- update_bookmark_folder
- delete_bookmark_folder
- query_bookmarks
- read_collections
- create_collections
- upsert_collections
- update_collections
- delete_collections
- query_collections
- get_comments
- add_comment
- add_comments_batch
- query_comments
- add_comment_bookmark
- update_comment_bookmark
- delete_comment_bookmark
- get_comment
- update_comment
- delete_comment
- update_comment_partial
- add_comment_reaction
- query_comment_reactions
- delete_comment_reaction
- get_comment_replies
- restore_comment
- list_feed_groups
- create_feed_group
- get_or_create_feed
- update_feed
- delete_feed
- mark_activity
- pin_activity
- unpin_activity
- update_feed_members
- accept_feed_member_invite
- query_feed_members
- reject_feed_member_invite
- query_pinned_activities
- get_follow_suggestions
- restore_feed_group
- get_feed_group
- get_or_create_feed_group
- update_feed_group
- delete_feed_group
- list_feed_views
- create_feed_view
- get_feed_view
- get_or_create_feed_view
- update_feed_view
- delete_feed_view
- list_feed_visibilities
- get_feed_visibility
- update_feed_visibility
- create_feeds_batch
- delete_feeds_batch
- own_batch
- query_feeds
- get_feeds_rate_limits
- follow
- update_follow
- accept_follow
- follow_batch
- get_or_create_follows
- query_follows
- reject_follow
- unfollow
- create_membership_level
- query_membership_levels
- update_membership_level
- delete_membership_level
- query_feeds_usage_stats
- unfollow_batch
- get_or_create_unfollows
- delete_feed_user_data
- export_feed_user_data
- Types Reference
add_activity
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add a single activity
response = client.feeds.add_activity(
feeds=["user:john", "timeline:global"],
type="like",
user_id="john",
id="activity-123"
)
print(response)Example: with text and skip_push
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add a single activity
response = client.feeds.add_activity(
feeds=["user:john", "timeline:global"],
type="like",
text="Hello, world!",
skip_push=False
)
print(response)Example: with visibility and enrich_own_fields
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add a single activity
response = client.feeds.add_activity(
feeds=["user:john", "timeline:global"],
type="like",
visibility="public",
enrich_own_fields=False
)
print(response)Example: with expires_at and filter_tags
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add a single activity
response = client.feeds.add_activity(
feeds=["user:john", "timeline:global"],
type="like",
expires_at="value",
filter_tags=["tag1", "tag2"]
)
print(response)Response: AddActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feeds | []string | Yes | List of feeds to add the activity to with a default max limit of 25 feeds |
| type | str | 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 create_notification_a... |
| create_notification_activity | bool | No | Whether to create notification activities for mentioned users |
| custom | dict | No | Custom data for the activity |
| enrich_own_fields | bool | No | - |
| expires_at | str | No | Expiration time for the activity |
| filter_tags | []string | No | Tags for filtering activities |
| force_moderation | bool | No | - |
| id | str | 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 | str | No | ID of parent activity for replies/comments |
| poll_id | str | No | ID of a poll to attach to activity |
| restrict_replies | str | No | Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody |
| search_data | dict | 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 | str | No | Text content of the activity |
| user_id | str | No | ID of the user creating the activity |
| visibility | str | No | Visibility setting for the activity. One of: public, private, tag |
| visibility_tag | str | No | If visibility is 'tag', this is the tag name and is required |
upsert_activities
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Upsert multiple activities
response = client.feeds.upsert_activities(
activities=[],
enrich_own_fields=False,
force_moderation=False
)
print(response)Response: UpsertActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activities | []ActivityRequest | Yes | List of activities to create or update |
| enrich_own_fields | bool | No | If true, enriches the activities' current_feed with own_* fields (own_follows, own_followings, ow... |
| force_moderation | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
update_activities_partial_batch
Use this method to update specific fields of multiple activities in bulk without overwriting the entire activity data, ideal for making incremental changes efficiently.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Batch partial activity update
response = client.feeds.update_activities_partial_batch(
changes=[],
force_moderation=False
)
print(response)Response: UpdateActivitiesPartialBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| changes | []UpdateActivityPartialChangeRequest | Yes | List of activity changes to apply. Each change specifies an activity ID and the fields to set/unset |
| force_moderation | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
delete_activities
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Remove multiple activities
response = client.feeds.delete_activities(
ids=["activity-1", "activity-2"],
user_id="john",
hard_delete=False
)
print(response)Example: with user and delete_notification_activity
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Remove multiple activities
response = client.feeds.delete_activities(
ids=["activity-1", "activity-2"],
user={"id": "activity-123", "custom": {}},
delete_notification_activity=False
)
print(response)Response: DeleteActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ids | []string | Yes | List of activity IDs to delete |
| delete_notification_activity | bool | No | Whether to also delete any notification activities created from mentions in these activities |
| hard_delete | bool | No | Whether to permanently delete the activities |
| user | UserRequest | No | - |
| user_id | str | No | - |
track_activity_metrics
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Track activity metrics
response = client.feeds.track_activity_metrics(
events=[],
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Response: TrackActivityMetricsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| events | []TrackActivityMetricsEvent | Yes | List of metric events to track (max 100 per request) |
| user | UserRequest | No | - |
| user_id | str | No | - |
query_activities
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query activities
response = client.feeds.query_activities(
user_id="john",
limit=25,
filter={}
)
print(response)Example: with sort and include_soft_deleted_activities
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query activities
response = client.feeds.query_activities(
sort=[],
include_soft_deleted_activities=False
)
print(response)Example: with enrich_own_fields and next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query activities
response = client.feeds.query_activities(
enrich_own_fields=False,
next=None
)
print(response)Example: with prev and include_expired_activities
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query activities
response = client.feeds.query_activities(
prev=None,
include_expired_activities=False
)
print(response)Response: QueryActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| enrich_own_fields | bool | No | - |
| filter | dict | No | Filters to apply to the query. Supports location-based queries with 'near' and 'within_bounds' op... |
| include_expired_activities | bool | No | When true, include both expired and non-expired activities in the result. |
| include_private_activities | bool | No | - |
| include_soft_deleted_activities | bool | No | When true, include soft-deleted activities in the result. |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
| user | UserRequest | No | - |
| user_id | str | No | - |
add_bookmark
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add bookmark
response = client.feeds.add_bookmark(
activity_id="activity-123",
user_id="john",
folder_id="folder-123"
)
print(response)Example: with new_folder and user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add bookmark
response = client.feeds.add_bookmark(
activity_id="activity-123",
new_folder={"name": "My Feed", "custom": {}},
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add bookmark
response = client.feeds.add_bookmark(
activity_id="activity-123",
custom={}
)
print(response)Response: AddBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | - |
| custom | dict | No | Custom data for the bookmark |
| folder_id | str | No | ID of the folder to add the bookmark to |
| new_folder | AddFolderRequest | No | Create a new folder for this bookmark |
| user | UserRequest | No | - |
| user_id | str | No | - |
update_bookmark
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update bookmark
response = client.feeds.update_bookmark(
activity_id="activity-123",
user_id="john",
folder_id="folder-123"
)
print(response)Example: with new_folder and new_folder_id
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update bookmark
response = client.feeds.update_bookmark(
activity_id="activity-123",
new_folder={"name": "My Feed", "custom": {}},
new_folder_id="value"
)
print(response)Example: with user and custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update bookmark
response = client.feeds.update_bookmark(
activity_id="activity-123",
user={"id": "activity-123", "custom": {}},
custom={}
)
print(response)Response: UpdateBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | - |
| custom | dict | No | Custom data for the bookmark |
| folder_id | str | No | ID of the folder containing the bookmark |
| new_folder | AddFolderRequest | No | Create a new folder and move the bookmark into it |
| new_folder_id | str | No | Move the bookmark to this folder (empty string removes the folder) |
| user | UserRequest | No | - |
| user_id | str | No | - |
delete_bookmark
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete a bookmark
response = client.feeds.delete_bookmark(
activity_id="activity-123",
user_id="john",
folder_id="folder-123"
)
print(response)Response: DeleteBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | - |
| folder_id | str | No | - |
| user_id | str | No | - |
activity_feedback
Submit user feedback on an activity to enhance personalization and content relevance. Use this to gather user preferences and improve content recommendations.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Provide feedback on an activity
response = client.feeds.activity_feedback(
activity_id="activity-123",
user_id="john",
show_less=False
)
print(response)Example: with show_more and user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Provide feedback on an activity
response = client.feeds.activity_feedback(
activity_id="activity-123",
show_more=False,
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with hide
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Provide feedback on an activity
response = client.feeds.activity_feedback(
activity_id="activity-123",
hide=False
)
print(response)Response: ActivityFeedbackResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | - |
| hide | bool | No | Whether to hide this activity |
| show_less | bool | No | Whether to show less content like this |
| show_more | bool | No | Whether to show more content like this |
| user | UserRequest | No | - |
| user_id | str | No | - |
cast_poll_vote
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Cast vote
response = client.feeds.cast_poll_vote(
activity_id="activity-123",
poll_id="poll-123",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with vote
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Cast vote
response = client.feeds.cast_poll_vote(
activity_id="activity-123",
poll_id="poll-123",
vote={"answer_text": "value"}
)
print(response)Response: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | - |
| poll_id | str | Yes | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
| vote | VoteData | No | Vote data |
delete_poll_vote
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete vote
response = client.feeds.delete_poll_vote(
activity_id="activity-123",
poll_id="poll-123",
vote_id="vote-123",
user_id="john"
)
print(response)Response: PollVoteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | - |
| poll_id | str | Yes | - |
| vote_id | str | Yes | - |
| user_id | str | No | - |
add_activity_reaction
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add reaction
response = client.feeds.add_activity_reaction(
activity_id="activity-123",
type="like",
user_id="john",
skip_push=False
)
print(response)Example: with custom and enforce_unique
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add reaction
response = client.feeds.add_activity_reaction(
activity_id="activity-123",
type="like",
custom={},
enforce_unique=True
)
print(response)Example: with copy_custom_to_notification and user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add reaction
response = client.feeds.add_activity_reaction(
activity_id="activity-123",
type="like",
copy_custom_to_notification=False,
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with create_notification_activity
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add reaction
response = client.feeds.add_activity_reaction(
activity_id="activity-123",
type="like",
create_notification_activity=False
)
print(response)Response: AddReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | - |
| type | str | Yes | Type of reaction |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | bool | No | Whether to create a notification activity for this reaction |
| custom | dict | No | Custom data for the reaction |
| enforce_unique | bool | No | Whether to enforce unique reactions per user (remove other reaction types from the user when addi... |
| skip_push | bool | No | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
query_activity_reactions
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query activity reactions
response = client.feeds.query_activity_reactions(
activity_id="activity-123",
limit=25,
filter={}
)
print(response)Example: with sort and prev
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query activity reactions
response = client.feeds.query_activity_reactions(
activity_id="activity-123",
sort=[],
prev=None
)
print(response)Example: with next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query activity reactions
response = client.feeds.query_activity_reactions(
activity_id="activity-123",
next=None
)
print(response)Response: QueryActivityReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | - |
| filter | dict | No | - |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | - |
delete_activity_reaction
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Remove reaction
response = client.feeds.delete_activity_reaction(
activity_id="activity-123",
type="like",
user_id="john",
delete_notification_activity=False
)
print(response)Response: DeleteActivityReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | - |
| type | str | Yes | - |
| delete_notification_activity | bool | No | - |
| user_id | str | No | - |
get_activity
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get activity
response = client.feeds.get_activity(
id="activity-123",
user_id="john",
comment_limit=10
)
print(response)Example: with comment_sort
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get activity
response = client.feeds.get_activity(
id="activity-123",
comment_sort="value"
)
print(response)Response: GetActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| comment_sort | str | No | - |
| comment_limit | int | No | - |
| user_id | str | No | - |
update_activity
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Full activity update
response = client.feeds.update_activity(
id="activity-123",
user_id="john",
text="Hello, world!"
)
print(response)Example: with feeds and visibility
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Full activity update
response = client.feeds.update_activity(
id="activity-123",
feeds=["user:john", "timeline:global"],
visibility="public"
)
print(response)Example: with enrich_own_fields and expires_at
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Full activity update
response = client.feeds.update_activity(
id="activity-123",
enrich_own_fields=False,
expires_at=10
)
print(response)Example: with attachments and filter_tags
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Full activity update
response = client.feeds.update_activity(
id="activity-123",
attachments=[],
filter_tags=["tag1", "tag2"]
)
print(response)Response: UpdateActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| 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 handle_mention_notifi... |
| custom | dict | No | Custom data for the activity |
| enrich_own_fields | bool | No | If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own... |
| expires_at | float | No | Time when the activity will expire |
| feeds | []string | No | List of feeds the activity is present in |
| filter_tags | []string | No | Tags used for filtering the activity |
| force_moderation | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| handle_mention_notifications | bool | No | If true, creates notification activities for newly mentioned users and deletes notifications for ... |
| interest_tags | []string | No | Tags indicating interest categories |
| location | Location | No | Geographic location for the activity |
| mentioned_user_ids | []string | No | List of user IDs mentioned in the activity |
| poll_id | str | No | Poll ID |
| restrict_replies | str | No | Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody |
| run_activity_processors | bool | No | If true, runs activity processors on the updated activity. Processors will only run if the activi... |
| search_data | dict | No | Additional data for search indexing |
| skip_enrich_url | bool | No | Whether to skip URL enrichment for the activity |
| text | str | No | The text content of the activity |
| user | UserRequest | No | - |
| user_id | str | No | - |
| visibility | str | No | Visibility setting for the activity |
| visibility_tag | str | No | If visibility is 'tag', this is the tag name and is required |
update_activity_partial
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partial activity update
response = client.feeds.update_activity_partial(
id="activity-123",
user_id="john",
enrich_own_fields=False
)
print(response)Example: with force_moderation and handle_mention_notifications
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partial activity update
response = client.feeds.update_activity_partial(
id="activity-123",
force_moderation=False,
handle_mention_notifications=False
)
print(response)Example: with run_activity_processors and set
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partial activity update
response = client.feeds.update_activity_partial(
id="activity-123",
run_activity_processors=False,
set={}
)
print(response)Example: with unset and user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partial activity update
response = client.feeds.update_activity_partial(
id="activity-123",
unset=[],
user={"id": "activity-123", "custom": {}}
)
print(response)Response: UpdateActivityPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when handle_mention_notifi... |
| enrich_own_fields | bool | No | If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own... |
| force_moderation | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| handle_mention_notifications | bool | No | If true, creates notification activities for newly mentioned users and deletes notifications for ... |
| run_activity_processors | bool | No | If true, runs activity processors on the updated activity. Processors will only run if the activi... |
| set | dict | No | Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility'... |
| unset | []string | No | List of field names to remove. Supported fields: 'custom', 'visibility_tag', 'location', 'expires... |
| user | UserRequest | No | - |
| user_id | str | No | - |
delete_activity
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete a single activity
response = client.feeds.delete_activity(
id="activity-123",
hard_delete=False,
delete_notification_activity=False
)
print(response)Response: DeleteActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| hard_delete | bool | No | - |
| delete_notification_activity | bool | No | - |
restore_activity
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Restore a soft-deleted activity
response = client.feeds.restore_activity(
id="activity-123",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with enrich_own_fields
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Restore a soft-deleted activity
response = client.feeds.restore_activity(
id="activity-123",
enrich_own_fields=False
)
print(response)Response: RestoreActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| enrich_own_fields | bool | No | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
query_bookmark_folders
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query bookmark folders
response = client.feeds.query_bookmark_folders(
limit=25,
filter={},
sort=[]
)
print(response)Example: with prev and next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query bookmark folders
response = client.feeds.query_bookmark_folders(
prev=None,
next=None
)
print(response)Response: QueryBookmarkFoldersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | dict | No | Filters to apply to the query |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
update_bookmark_folder
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a bookmark folder
response = client.feeds.update_bookmark_folder(
folder_id="folder-123",
user_id="john",
name="My Feed"
)
print(response)Example: with user and custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a bookmark folder
response = client.feeds.update_bookmark_folder(
folder_id="folder-123",
user={"id": "activity-123", "custom": {}},
custom={}
)
print(response)Response: UpdateBookmarkFolderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| folder_id | str | Yes | - |
| custom | dict | No | Custom data for the folder |
| name | str | No | Name of the folder |
| user | UserRequest | No | - |
| user_id | str | No | - |
delete_bookmark_folder
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete a bookmark folder
response = client.feeds.delete_bookmark_folder(
folder_id="folder-123"
)
print(response)Response: DeleteBookmarkFolderResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| folder_id | str | Yes | - |
query_bookmarks
Retrieve a list of bookmarks based on specified criteria, useful for accessing saved or frequently accessed items quickly.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query bookmarks
response = client.feeds.query_bookmarks(
limit=25,
filter={},
sort=[]
)
print(response)Example: with next and prev
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query bookmarks
response = client.feeds.query_bookmarks(
next=None,
prev=None
)
print(response)Example: with enrich_own_fields
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query bookmarks
response = client.feeds.query_bookmarks(
enrich_own_fields=False
)
print(response)Response: QueryBookmarksResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| enrich_own_fields | bool | No | - |
| filter | dict | No | Filters to apply to the query |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
read_collections
Fetch details of existing collections, enabling users to view and manage grouped data easily.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Read collections
response = client.feeds.read_collections(
user_id="john",
collection_refs=["food:pizza-123"]
)
print(response)Response: ReadCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collection_refs | []string | No | - |
| user_id | str | No | - |
create_collections
Create new collections in bulk, ideal for organizing large sets of data into manageable groups at once.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create multiple collections
response = client.feeds.create_collections(
collections=[],
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Response: CreateCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collections | []CollectionRequest | Yes | List of collections to create |
| user | UserRequest | No | - |
| user_id | str | No | - |
upsert_collections
Insert new collections or update existing ones in a single operation, ensuring your data is current without multiple requests.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Upsert multiple collections
response = client.feeds.upsert_collections(
collections=[]
)
print(response)Response: UpsertCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collections | []CollectionRequest | Yes | List of collections to upsert (insert if new, update if existing) |
update_collections
Modify existing collections by changing their attributes, facilitating the maintenance and customization of grouped data.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update multiple collections
response = client.feeds.update_collections(
collections=[],
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Response: UpdateCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collections | []UpdateCollectionRequest | Yes | List of collections to update (only custom data is updatable) |
| user | UserRequest | No | - |
| user_id | str | No | - |
delete_collections
Remove multiple collections at once, useful for cleaning up and organizing data by eliminating unneeded sets.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete multiple collections
response = client.feeds.delete_collections(
collection_refs=["food:pizza-123"]
)
print(response)Response: DeleteCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| collection_refs | []string | Yes | - |
query_collections
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query collections
response = client.feeds.query_collections(
user_id="john",
limit=25,
filter={}
)
print(response)Example: with sort and next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query collections
response = client.feeds.query_collections(
sort=[],
next=None
)
print(response)Example: with user and prev
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query collections
response = client.feeds.query_collections(
user={"id": "activity-123", "custom": {}},
prev=None
)
print(response)Response: QueryCollectionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | dict | No | Filters to apply to the query |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
| user | UserRequest | No | - |
| user_id | str | No | - |
get_comments
Retrieve comments related to a specific object, providing insights and feedback from users or collaborators.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get comments for an object
response = client.feeds.get_comments(
object_id="activity-123",
object_type="activity",
user_id="john",
limit=25
)
print(response)Example: with sort and id_around
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get comments for an object
response = client.feeds.get_comments(
object_id="activity-123",
object_type="activity",
sort=[{"field": "created_at", "direction": -1}],
id_around="value"
)
print(response)Example: with depth and replies_limit
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get comments for an object
response = client.feeds.get_comments(
object_id="activity-123",
object_type="activity",
depth=2,
replies_limit=10
)
print(response)Example: with prev and next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get comments for an object
response = client.feeds.get_comments(
object_id="activity-123",
object_type="activity",
prev=None,
next=None
)
print(response)Response: GetCommentsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| object_id | str | Yes | - |
| object_type | str | Yes | - |
| depth | int | No | - |
| sort | str | No | - |
| replies_limit | int | No | - |
| id_around | str | No | - |
| user_id | str | No | - |
| limit | int | No | - |
| prev | str | No | - |
| next | str | No | - |
add_comment
Post a new comment or reply to an existing one, fostering interaction and discussion around a particular object.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add a comment or reply
response = client.feeds.add_comment(
user_id="john",
id="activity-123",
skip_push=False
)
print(response)Example: with create_notification_activity and custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add a comment or reply
response = client.feeds.add_comment(
create_notification_activity=False,
custom={}
)
print(response)Example: with force_moderation and attachments
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add a comment or reply
response = client.feeds.add_comment(
force_moderation=False,
attachments=[]
)
print(response)Example: with mentioned_user_ids and object_id
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add a comment or reply
response = client.feeds.add_comment(
mentioned_user_ids=["user-1", "user-2"],
object_id="activity-123"
)
print(response)Response: AddCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| attachments | []Attachment | No | Media attachments for the reply |
| comment | str | No | Text content of the comment |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | bool | No | Whether to create a notification activity for this comment |
| custom | dict | No | Custom data for the comment |
| force_moderation | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| id | str | No | Optional custom ID for the comment (max 255 characters). If not provided, a UUID will be generated. |
| mentioned_user_ids | []string | No | List of users mentioned in the reply |
| object_id | str | No | ID of the object to comment on. Required for root comments |
| object_type | str | No | Type of the object to comment on. Required for root comments |
| parent_id | str | No | ID of parent comment for replies. When provided, object_id and object_type are automatically inhe... |
| skip_enrich_url | bool | No | Whether to skip URL enrichment for this comment |
| skip_push | bool | No | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
add_comments_batch
Submit multiple comments in a single request, streamlining processes where multiple inputs are needed simultaneously.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add multiple comments in a batch
response = client.feeds.add_comments_batch(
comments=[]
)
print(response)Response: AddCommentsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| comments | []AddCommentRequest | Yes | List of comments to add |
query_comments
Search for comments based on defined parameters, allowing users to filter and locate specific discussions efficiently.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query comments
response = client.feeds.query_comments(
filter={},
user_id="john",
limit=25
)
print(response)Example: with sort and prev
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query comments
response = client.feeds.query_comments(
filter={},
sort=[{"field": "created_at", "direction": -1}],
prev=None
)
print(response)Example: with id_around and user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query comments
response = client.feeds.query_comments(
filter={},
id_around="value",
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query comments
response = client.feeds.query_comments(
filter={},
next=None
)
print(response)Response: QueryCommentsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | dict | Yes | Filter to apply to the query |
| id_around | str | No | Returns the comment with the specified ID along with surrounding comments for context |
| limit | int | No | Maximum number of comments to return |
| next | str | No | - |
| prev | str | No | - |
| sort | str | No | Array of sort parameters |
| user | UserRequest | No | - |
| user_id | str | No | - |
add_comment_bookmark
Allows users to bookmark a comment for easy future reference. Use this to enable users to save important comments for quick access later.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add comment bookmark
response = client.feeds.add_comment_bookmark(
comment_id="comment-123",
user_id="john",
folder_id="folder-123"
)
print(response)Example: with new_folder and user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add comment bookmark
response = client.feeds.add_comment_bookmark(
comment_id="comment-123",
new_folder={"name": "My Feed", "custom": {}},
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add comment bookmark
response = client.feeds.add_comment_bookmark(
comment_id="comment-123",
custom={}
)
print(response)Response: AddCommentBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| comment_id | str | Yes | - |
| custom | dict | No | Custom data for the bookmark |
| folder_id | str | No | ID of the folder to add the bookmark to |
| new_folder | AddFolderRequest | No | Create a new folder for this bookmark |
| user | UserRequest | No | - |
| user_id | str | No | - |
update_comment_bookmark
Modifies an existing comment bookmark to reflect changes or updates. Use this to ensure that user bookmarks remain relevant and up-to-date.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update comment bookmark
response = client.feeds.update_comment_bookmark(
comment_id="comment-123",
user_id="john",
folder_id="folder-123"
)
print(response)Example: with new_folder and new_folder_id
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update comment bookmark
response = client.feeds.update_comment_bookmark(
comment_id="comment-123",
new_folder={"name": "My Feed", "custom": {}},
new_folder_id="value"
)
print(response)Example: with user and custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update comment bookmark
response = client.feeds.update_comment_bookmark(
comment_id="comment-123",
user={"id": "activity-123", "custom": {}},
custom={}
)
print(response)Response: UpdateCommentBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| comment_id | str | Yes | - |
| custom | dict | No | Custom data for the bookmark |
| folder_id | str | No | ID of the folder containing the bookmark |
| new_folder | AddFolderRequest | No | Create a new folder and move the bookmark into it |
| new_folder_id | str | No | Move the bookmark to this folder (empty string removes the folder) |
| user | UserRequest | No | - |
| user_id | str | No | - |
delete_comment_bookmark
Removes a bookmarked comment, freeing up space and reducing clutter. Use this when a bookmarked comment is no longer needed by the user.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete a comment bookmark
response = client.feeds.delete_comment_bookmark(
comment_id="comment-123",
user_id="john",
folder_id="folder-123"
)
print(response)Response: DeleteCommentBookmarkResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| comment_id | str | Yes | - |
| folder_id | str | No | - |
| user_id | str | No | - |
get_comment
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get comment
response = client.feeds.get_comment(
id="activity-123",
user_id="john"
)
print(response)Response: GetCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| user_id | str | No | - |
update_comment
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a comment
response = client.feeds.update_comment(
id="activity-123",
user_id="john",
skip_push=False
)
print(response)Example: with copy_custom_to_notification and custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a comment
response = client.feeds.update_comment(
id="activity-123",
copy_custom_to_notification=False,
custom={}
)
print(response)Example: with force_moderation and handle_mention_notifications
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a comment
response = client.feeds.update_comment(
id="activity-123",
force_moderation=False,
handle_mention_notifications=False
)
print(response)Example: with mentioned_user_ids and skip_enrich_url
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a comment
response = client.feeds.update_comment(
id="activity-123",
mentioned_user_ids=["user-1", "user-2"],
skip_enrich_url=False
)
print(response)Response: UpdateCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| attachments | []Attachment | No | Updated media attachments for the comment. Providing this field will replace all existing attachm... |
| comment | str | No | Updated text content of the comment |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when handle_mention_notifi... |
| custom | dict | No | Updated custom data for the comment |
| force_moderation | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| handle_mention_notifications | bool | No | If true, creates notification activities for newly mentioned users and deletes notifications for ... |
| mentioned_user_ids | []string | No | List of user IDs mentioned in the comment |
| skip_enrich_url | bool | No | Whether to skip URL enrichment for this comment |
| skip_push | bool | No | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
delete_comment
Remove a comment from a feed. Use this method to permanently delete a comment when it is no longer needed.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete a comment
response = client.feeds.delete_comment(
id="activity-123",
hard_delete=False,
delete_notification_activity=False
)
print(response)Response: DeleteCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| hard_delete | bool | No | - |
| delete_notification_activity | bool | No | - |
update_comment_partial
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partial comment update
response = client.feeds.update_comment_partial(
id="activity-123",
user_id="john",
skip_push=False
)
print(response)Example: with handle_mention_notifications and set
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partial comment update
response = client.feeds.update_comment_partial(
id="activity-123",
handle_mention_notifications=False,
set={}
)
print(response)Example: with skip_enrich_url and copy_custom_to_notification
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partial comment update
response = client.feeds.update_comment_partial(
id="activity-123",
skip_enrich_url=False,
copy_custom_to_notification=False
)
print(response)Example: with unset and user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Partial comment update
response = client.feeds.update_comment_partial(
id="activity-123",
unset=[],
user={"id": "activity-123", "custom": {}}
)
print(response)Response: UpdateCommentPartialResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| copy_custom_to_notification | bool | No | Whether to copy custom data to notification activities Deprecated: use notification_context.trigg... |
| force_moderation | bool | No | If true, forces moderation to run for server-side requests. By default, server-side requests skip... |
| handle_mention_notifications | bool | No | Whether to handle mention notification changes |
| set | dict | No | Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'mentioned_u... |
| skip_enrich_url | bool | No | Whether to skip URL enrichment |
| skip_push | bool | No | Whether to skip push notifications |
| unset | []string | No | List of field names to remove. Supported fields: 'custom', 'attachments', 'mentioned_user_ids', '... |
| user | UserRequest | No | - |
| user_id | str | No | - |
add_comment_reaction
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add comment reaction
response = client.feeds.add_comment_reaction(
id="activity-123",
type="like",
user_id="john",
skip_push=False
)
print(response)Example: with custom and enforce_unique
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add comment reaction
response = client.feeds.add_comment_reaction(
id="activity-123",
type="like",
custom={},
enforce_unique=True
)
print(response)Example: with copy_custom_to_notification and user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add comment reaction
response = client.feeds.add_comment_reaction(
id="activity-123",
type="like",
copy_custom_to_notification=False,
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with create_notification_activity
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Add comment reaction
response = client.feeds.add_comment_reaction(
id="activity-123",
type="like",
create_notification_activity=False
)
print(response)Response: AddCommentReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| type | str | Yes | The type of reaction, eg upvote, like, ... |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | bool | No | Whether to create a notification activity for this reaction |
| custom | dict | No | Optional custom data to add to the reaction |
| enforce_unique | bool | No | Whether to enforce unique reactions per user (remove other reaction types from the user when addi... |
| skip_push | bool | No | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
query_comment_reactions
Retrieve all reactions associated with a specific comment. Use this method to view how users have interacted with a comment through various reactions.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query comment reactions
response = client.feeds.query_comment_reactions(
id="activity-123",
limit=25,
filter={}
)
print(response)Example: with sort and prev
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query comment reactions
response = client.feeds.query_comment_reactions(
id="activity-123",
sort=[],
prev=None
)
print(response)Example: with next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query comment reactions
response = client.feeds.query_comment_reactions(
id="activity-123",
next=None
)
print(response)Response: QueryCommentReactionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| filter | dict | No | - |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | - |
delete_comment_reaction
Remove a specific reaction from a comment. Use this method when you need to retract or correct a reaction added to a comment.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete comment reaction
response = client.feeds.delete_comment_reaction(
id="activity-123",
type="like",
user_id="john",
delete_notification_activity=False
)
print(response)Response: DeleteCommentReactionResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| type | str | Yes | - |
| delete_notification_activity | bool | No | - |
| user_id | str | No | - |
get_comment_replies
Fetch all replies associated with a specific comment. Use this method to view or manage the conversation thread stemming from a comment.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get replies for a comment
response = client.feeds.get_comment_replies(
id="activity-123",
user_id="john",
limit=25
)
print(response)Example: with sort and id_around
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get replies for a comment
response = client.feeds.get_comment_replies(
id="activity-123",
sort=[{"field": "created_at", "direction": -1}],
id_around="value"
)
print(response)Example: with depth and replies_limit
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get replies for a comment
response = client.feeds.get_comment_replies(
id="activity-123",
depth=2,
replies_limit=10
)
print(response)Example: with prev and next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get replies for a comment
response = client.feeds.get_comment_replies(
id="activity-123",
prev=None,
next=None
)
print(response)Response: GetCommentRepliesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| depth | int | No | - |
| sort | str | No | - |
| replies_limit | int | No | - |
| id_around | str | No | - |
| user_id | str | No | - |
| limit | int | No | - |
| prev | str | No | - |
| next | str | No | - |
restore_comment
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Restore a soft-deleted comment
response = client.feeds.restore_comment(
id="activity-123",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Response: RestoreCommentResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
list_feed_groups
Retrieve a list of all available feed groups within the application. Use this method to explore or manage different categories of feeds.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List all feed groups
response = client.feeds.list_feed_groups(
include_soft_deleted=False
)
print(response)Response: ListFeedGroupsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| include_soft_deleted | bool | No | - |
create_feed_group
Establish a new feed group to categorize and organize related feeds. Use this method when you need to create a new grouping for feeds based on specific criteria or topics.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a new feed group
response = client.feeds.create_feed_group(
id="activity-123",
activity_processors=[],
activity_selectors=[]
)
print(response)Example: with aggregation and custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a new feed group
response = client.feeds.create_feed_group(
id="activity-123",
aggregation={"activities_sort": "value"},
custom={}
)
print(response)Example: with default_visibility and notification
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a new feed group
response = client.feeds.create_feed_group(
id="activity-123",
default_visibility="value",
notification={"deduplication_window": "value"}
)
print(response)Example: with push_notification and ranking
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a new feed group
response = client.feeds.create_feed_group(
id="activity-123",
push_notification={"enable_push": False},
ranking={"type": "like", "defaults": {}}
)
print(response)Response: CreateFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | Unique identifier for the feed group |
| activity_processors | []ActivityProcessorConfig | No | Configuration for activity processors |
| activity_selectors | []ActivitySelectorConfig | No | Configuration for activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| custom | dict | No | Custom data for the feed group |
| default_visibility | str | No | Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'pr... |
| notification | NotificationConfig | No | Configuration for notifications |
| push_notification | PushNotificationConfig | No | - |
| ranking | RankingConfig | No | Configuration for activity ranking |
| stories | StoriesConfig | No | Configuration for stories functionality |
get_or_create_feed
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a new feed
response = client.feeds.get_or_create_feed(
feed_group_id="user",
feed_id="john",
user_id="john",
limit=25
)
print(response)Example: with filter and data
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a new feed
response = client.feeds.get_or_create_feed(
feed_group_id="user",
feed_id="john",
filter={},
data={"custom": {}}
)
print(response)Example: with followers_pagination and following_pagination
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a new feed
response = client.feeds.get_or_create_feed(
feed_group_id="user",
feed_id="john",
followers_pagination={"limit": 25},
following_pagination={"limit": 25}
)
print(response)Example: with friend_reactions_options and id_around
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a new feed
response = client.feeds.get_or_create_feed(
feed_group_id="user",
feed_id="john",
friend_reactions_options={"enabled": False},
id_around="value"
)
print(response)Response: GetOrCreateFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| feed_id | str | Yes | - |
| data | FeedInput | No | - |
| enrichment_options | EnrichmentOptions | No | - |
| external_ranking | dict | No | - |
| filter | dict | No | - |
| followers_pagination | PagerRequest | No | - |
| following_pagination | PagerRequest | No | - |
| friend_reactions_options | FriendReactionsOptions | No | - |
| id_around | str | No | - |
| interest_weights | dict | No | - |
| limit | int | No | - |
| member_pagination | PagerRequest | No | - |
| next | str | No | - |
| prev | str | No | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
| view | str | No | - |
| watch | bool | No | - |
update_feed
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a feed
response = client.feeds.update_feed(
feed_group_id="user",
feed_id="john",
name="My Feed",
created_by_id="value"
)
print(response)Example: with custom and description
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a feed
response = client.feeds.update_feed(
feed_group_id="user",
feed_id="john",
custom={},
description="A description"
)
print(response)Example: with enrich_own_fields and filter_tags
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a feed
response = client.feeds.update_feed(
feed_group_id="user",
feed_id="john",
enrich_own_fields=False,
filter_tags=["tag1", "tag2"]
)
print(response)Example: with location and clear_location
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a feed
response = client.feeds.update_feed(
feed_group_id="user",
feed_id="john",
location={"lat": 10, "lng": 10},
clear_location=False
)
print(response)Response: UpdateFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| feed_id | str | Yes | - |
| clear_location | bool | No | If true, removes the geographic location from the feed |
| created_by_id | str | No | ID of the new feed creator (owner) |
| custom | dict | No | Custom data for the feed |
| description | str | No | Description of the feed |
| enrich_own_fields | bool | No | If true, enriches the feed with own_* fields (own_follows, own_followings, own_capabilities, own_... |
| filter_tags | []string | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| name | str | No | Name of the feed |
delete_feed
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete a single feed
response = client.feeds.delete_feed(
feed_group_id="user",
feed_id="john",
hard_delete=False
)
print(response)Response: DeleteFeedResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| feed_id | str | Yes | - |
| hard_delete | bool | No | - |
mark_activity
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Mark activities as read/seen/watched
response = client.feeds.mark_activity(
feed_group_id="user",
feed_id="john",
user_id="john",
mark_all_seen=True
)
print(response)Example: with mark_read and mark_seen
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Mark activities as read/seen/watched
response = client.feeds.mark_activity(
feed_group_id="user",
feed_id="john",
mark_read=[],
mark_seen=[]
)
print(response)Example: with mark_watched and user
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Mark activities as read/seen/watched
response = client.feeds.mark_activity(
feed_group_id="user",
feed_id="john",
mark_watched=[],
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with mark_all_read
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Mark activities as read/seen/watched
response = client.feeds.mark_activity(
feed_group_id="user",
feed_id="john",
mark_all_read=True
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| feed_id | str | Yes | - |
| mark_all_read | bool | No | Whether to mark all activities as read |
| mark_all_seen | bool | No | Whether to mark all activities as seen |
| mark_read | []string | No | List of activity IDs to mark as read |
| mark_seen | []string | No | List of activity IDs to mark as seen |
| mark_watched | []string | No | List of activity IDs to mark as watched (for stories) |
| user | UserRequest | No | - |
| user_id | str | No | - |
pin_activity
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Pin an activity to a feed
response = client.feeds.pin_activity(
feed_group_id="user",
feed_id="john",
activity_id="activity-123",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with enrich_own_fields
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Pin an activity to a feed
response = client.feeds.pin_activity(
feed_group_id="user",
feed_id="john",
activity_id="activity-123",
enrich_own_fields=False
)
print(response)Response: PinActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| feed_id | str | Yes | - |
| activity_id | str | Yes | - |
| enrich_own_fields | bool | No | If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own... |
| user | UserRequest | No | - |
| user_id | str | No | - |
unpin_activity
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Unpin an activity from a feed
response = client.feeds.unpin_activity(
feed_group_id="user",
feed_id="john",
activity_id="activity-123",
user_id="john",
enrich_own_fields=False
)
print(response)Response: UnpinActivityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| feed_id | str | Yes | - |
| activity_id | str | Yes | - |
| enrich_own_fields | bool | No | - |
| user_id | str | No | - |
update_feed_members
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update feed members
response = client.feeds.update_feed_members(
feed_group_id="user",
feed_id="john",
operation="add",
limit=25,
members=[]
)
print(response)Example: with next and prev
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update feed members
response = client.feeds.update_feed_members(
feed_group_id="user",
feed_id="john",
operation="add",
next=None,
prev=None
)
print(response)Response: UpdateFeedMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| feed_id | str | Yes | - |
| operation | str | Yes | Type of update operation to perform. One of: upsert, remove, set |
| limit | int | No | - |
| members | []FeedMemberRequest | No | List of members to upsert, remove, or set |
| next | str | No | - |
| prev | str | No | - |
accept_feed_member_invite
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Accept a feed member request
response = client.feeds.accept_feed_member_invite(
feed_id="john",
feed_group_id="user",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Response: AcceptFeedMemberInviteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_id | str | Yes | - |
| feed_group_id | str | Yes | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
query_feed_members
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query feed members
response = client.feeds.query_feed_members(
feed_group_id="user",
feed_id="john",
limit=25,
filter={}
)
print(response)Example: with sort and prev
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query feed members
response = client.feeds.query_feed_members(
feed_group_id="user",
feed_id="john",
sort=[],
prev=None
)
print(response)Example: with next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query feed members
response = client.feeds.query_feed_members(
feed_group_id="user",
feed_id="john",
next=None
)
print(response)Response: QueryFeedMembersResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| feed_id | str | Yes | - |
| filter | dict | No | Filter parameters for the query |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Sort parameters for the query |
reject_feed_member_invite
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Reject an invite to become a feed member
response = client.feeds.reject_feed_member_invite(
feed_group_id="user",
feed_id="john",
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Response: RejectFeedMemberInviteResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| feed_id | str | Yes | - |
| user | UserRequest | No | - |
| user_id | str | No | - |
query_pinned_activities
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query pinned activities
response = client.feeds.query_pinned_activities(
feed_group_id="user",
feed_id="john",
limit=25,
filter={}
)
print(response)Example: with sort and next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query pinned activities
response = client.feeds.query_pinned_activities(
feed_group_id="user",
feed_id="john",
sort=[],
next=None
)
print(response)Example: with prev and enrich_own_fields
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query pinned activities
response = client.feeds.query_pinned_activities(
feed_group_id="user",
feed_id="john",
prev=None,
enrich_own_fields=False
)
print(response)Response: QueryPinnedActivitiesResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| feed_id | str | Yes | - |
| enrich_own_fields | bool | No | - |
| filter | dict | No | Filters to apply to the query |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
get_follow_suggestions
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get follow suggestions
response = client.feeds.get_follow_suggestions(
feed_group_id="user",
user_id="john",
limit=25
)
print(response)Response: GetFollowSuggestionsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
| limit | int | No | - |
| user_id | str | No | - |
restore_feed_group
Restores a previously deleted feed group, reinstating its activities and user interactions. Use this to recover a feed group that needs to be active again after deletion.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Restore a feed group
response = client.feeds.restore_feed_group(
feed_group_id="user"
)
print(response)Response: RestoreFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | - |
get_feed_group
Retrieve details of an existing feed group to manage or display its contents effectively.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get a feed group
response = client.feeds.get_feed_group(
id="activity-123",
include_soft_deleted=False
)
print(response)Response: GetFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| include_soft_deleted | bool | No | - |
get_or_create_feed_group
Obtain an existing feed group or create a new one if it doesn't exist, ensuring your application can seamlessly manage feed group resources.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get or create a feed group
response = client.feeds.get_or_create_feed_group(
id="activity-123",
activity_processors=[],
activity_selectors=[]
)
print(response)Example: with aggregation and custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get or create a feed group
response = client.feeds.get_or_create_feed_group(
id="activity-123",
aggregation={"activities_sort": "value"},
custom={}
)
print(response)Example: with default_visibility and notification
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get or create a feed group
response = client.feeds.get_or_create_feed_group(
id="activity-123",
default_visibility="value",
notification={"deduplication_window": "value"}
)
print(response)Example: with push_notification and ranking
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get or create a feed group
response = client.feeds.get_or_create_feed_group(
id="activity-123",
push_notification={"enable_push": False},
ranking={"type": "like", "defaults": {}}
)
print(response)Response: GetOrCreateFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| activity_processors | []ActivityProcessorConfig | No | Configuration for activity processors |
| activity_selectors | []ActivitySelectorConfig | No | Configuration for activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| custom | dict | No | Custom data for the feed group |
| default_visibility | str | No | Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'pr... |
| notification | NotificationConfig | No | Configuration for notifications |
| push_notification | PushNotificationConfig | No | - |
| ranking | RankingConfig | No | Configuration for activity ranking |
| stories | StoriesConfig | No | Configuration for stories functionality |
update_feed_group
Modify the properties of an existing feed group to keep its information up-to-date and relevant to your application's needs.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a feed group
response = client.feeds.update_feed_group(
id="activity-123",
activity_processors=[],
activity_selectors=[]
)
print(response)Example: with aggregation and custom
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a feed group
response = client.feeds.update_feed_group(
id="activity-123",
aggregation={"activities_sort": "value"},
custom={}
)
print(response)Example: with default_visibility and notification
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a feed group
response = client.feeds.update_feed_group(
id="activity-123",
default_visibility="value",
notification={"deduplication_window": "value"}
)
print(response)Example: with push_notification and ranking
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a feed group
response = client.feeds.update_feed_group(
id="activity-123",
push_notification={"enable_push": False},
ranking={"type": "like", "defaults": {}}
)
print(response)Response: UpdateFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| activity_processors | []ActivityProcessorConfig | No | Configuration for activity processors |
| activity_selectors | []ActivitySelectorConfig | No | Configuration for activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| custom | dict | No | Custom data for the feed group |
| default_visibility | str | No | - |
| notification | NotificationConfig | No | Configuration for notifications |
| push_notification | PushNotificationConfig | No | - |
| ranking | RankingConfig | No | Configuration for activity ranking |
| stories | StoriesConfig | No | Configuration for stories functionality |
delete_feed_group
Remove an existing feed group to free up resources or when the feed group is no longer needed in your application.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete a feed group
response = client.feeds.delete_feed_group(
id="activity-123",
hard_delete=False
)
print(response)Response: DeleteFeedGroupResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| hard_delete | bool | No | - |
list_feed_views
Retrieve a list of all feed views to easily navigate and manage the available views in an application.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List all feed views
response = client.feeds.list_feed_views()
print(response)Response: ListFeedViewsResponse
create_feed_view
Generate a new feed view to organize and present feed data in a customized manner for users.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a new feed view
response = client.feeds.create_feed_view(
id="activity-123",
activity_selectors=[],
aggregation={"activities_sort": "value"}
)
print(response)Example: with ranking
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a new feed view
response = client.feeds.create_feed_view(
id="activity-123",
ranking={"type": "like", "defaults": {}}
)
print(response)Response: CreateFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | Unique identifier for the feed view |
| activity_selectors | []ActivitySelectorConfig | No | Configuration for selecting activities |
| aggregation | AggregationConfig | No | Configuration for aggregating activities |
| ranking | RankingConfig | No | Configuration for ranking activities |
get_feed_view
Access specific details of an existing feed view to analyze or display its configuration and content.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get a feed view
response = client.feeds.get_feed_view(
id="activity-123"
)
print(response)Response: GetFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
get_or_create_feed_view
Retrieve an existing feed view or create a new one if it doesn't exist, ensuring your application can always access the necessary view configurations.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get or create a feed view
response = client.feeds.get_or_create_feed_view(
id="activity-123",
activity_selectors=[],
aggregation={"activities_sort": "value"}
)
print(response)Example: with ranking
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get or create a feed view
response = client.feeds.get_or_create_feed_view(
id="activity-123",
ranking={"type": "like", "defaults": {}}
)
print(response)Response: GetOrCreateFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| activity_selectors | []ActivitySelectorConfig | No | Configuration for selecting activities |
| aggregation | AggregationConfig | No | Configuration for aggregating activities |
| ranking | RankingConfig | No | Configuration for ranking activities |
update_feed_view
Alter the settings or content of an existing feed view to reflect changes in data presentation or user requirements.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a feed view
response = client.feeds.update_feed_view(
id="activity-123",
activity_selectors=[],
aggregation={"activities_sort": "value"}
)
print(response)Example: with ranking
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a feed view
response = client.feeds.update_feed_view(
id="activity-123",
ranking={"type": "like", "defaults": {}}
)
print(response)Response: UpdateFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| activity_selectors | []ActivitySelectorConfig | No | Updated configuration for selecting activities |
| aggregation | AggregationConfig | No | Updated configuration for aggregating activities |
| ranking | RankingConfig | No | Updated configuration for ranking activities |
delete_feed_view
Remove an existing feed view when it is no longer required, helping to maintain an organized and efficient feed view collection.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete a feed view
response = client.feeds.delete_feed_view(
id="activity-123"
)
print(response)Response: DeleteFeedViewResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
list_feed_visibilities
Retrieve a list of visibility settings for multiple feeds. Use this method to gain insights into which feeds are public, private, or have custom visibility rules.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# List feed visibilities
response = client.feeds.list_feed_visibilities()
print(response)Response: ListFeedVisibilitiesResponse
get_feed_visibility
Obtain the visibility status of a specific feed. This method is useful for checking whether a feed is accessible to certain users or groups.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get feed visibility
response = client.feeds.get_feed_visibility(
name="My Feed"
)
print(response)Response: GetFeedVisibilityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | - |
update_feed_visibility
Modify the visibility settings of a feed. Use this to change who can view or interact with a feed, enhancing content privacy or accessibility as needed.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update Feed Visibility
response = client.feeds.update_feed_visibility(
name="My Feed",
grants={}
)
print(response)Response: UpdateFeedVisibilityResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | - |
| grants | dict | No | Updated permission grants for each role |
create_feeds_batch
Simultaneously create multiple feeds with a single request. This method is ideal for initializing multiple content streams efficiently.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create multiple feeds at once
response = client.feeds.create_feeds_batch(
feeds=["user:john", "timeline:global"],
enrich_own_fields=False
)
print(response)Response: CreateFeedsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feeds | []FeedRequest | Yes | List of feeds to create |
| enrich_own_fields | bool | No | If true, enriches the created feeds with own_* fields (own_follows, own_followings, own_capabilit... |
delete_feeds_batch
Remove multiple feeds in one operation. Use this method to streamline the cleanup process by deleting several feeds at once.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete multiple feeds
response = client.feeds.delete_feeds_batch(
feeds=["user:john", "timeline:global"],
hard_delete=False
)
print(response)Response: DeleteFeedsBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feeds | []string | Yes | List of fully qualified feed IDs (format: group_id:feed_id) to delete |
| hard_delete | bool | No | Whether to permanently delete the feeds instead of soft delete |
own_batch
Retrieve ownership details for multiple feeds. This is useful for managing or auditing which feeds you or your organization control.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get own fields for multiple feeds
response = client.feeds.own_batch(
feeds=["user:john", "timeline:global"],
user_id="john",
user={"id": "activity-123", "custom": {}}
)
print(response)Example: with fields
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get own fields for multiple feeds
response = client.feeds.own_batch(
feeds=["user:john", "timeline:global"],
fields=[]
)
print(response)Response: OwnBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| feeds | []string | Yes | List of feed IDs to get own fields for |
| fields | []string | No | Optional list of specific fields to return. If not specified, all fields (own_follows, own_follow... |
| user | UserRequest | No | - |
| user_id | str | No | - |
query_feeds
Search and filter feeds based on specific criteria. Use this method to efficiently locate feeds that match your interests or requirements.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query feeds
response = client.feeds.query_feeds(
limit=25,
filter={},
sort=[]
)
print(response)Example: with next and prev
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query feeds
response = client.feeds.query_feeds(
next=None,
prev=None
)
print(response)Example: with enrich_own_fields and watch
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query feeds
response = client.feeds.query_feeds(
enrich_own_fields=False,
watch=False
)
print(response)Response: QueryFeedsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| enrich_own_fields | bool | No | - |
| filter | dict | No | Filters to apply to the query |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
| watch | bool | No | Whether to subscribe to realtime updates |
get_feeds_rate_limits
Check the rate limits associated with feed operations. This method helps you understand the frequency restrictions on feed interactions to avoid exceeding usage quotas.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get Feeds Rate Limits
response = client.feeds.get_feeds_rate_limits(
endpoints="value",
android=False,
ios=False
)
print(response)Example: with web and server_side
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Get Feeds Rate Limits
response = client.feeds.get_feeds_rate_limits(
web=False,
server_side=False
)
print(response)Response: GetFeedsRateLimitsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoints | str | No | - |
| android | bool | No | - |
| ios | bool | No | - |
| web | bool | No | - |
| server_side | bool | No | - |
follow
Establish a follow relationship with a feed, allowing you to receive updates or notifications about its content. Use this to stay informed about specific topics or creators.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a follow
response = client.feeds.follow(
source="user:john",
target="timeline:jane",
skip_push=False,
copy_custom_to_notification=False
)
print(response)Example: with create_notification_activity and create_users
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a follow
response = client.feeds.follow(
source="user:john",
target="timeline:jane",
create_notification_activity=False,
create_users=False
)
print(response)Example: with custom and enrich_own_fields
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a follow
response = client.feeds.follow(
source="user:john",
target="timeline:jane",
custom={},
enrich_own_fields=False
)
print(response)Example: with push_preference and activity_copy_limit
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create a follow
response = client.feeds.follow(
source="user:john",
target="timeline:jane",
push_preference="value",
activity_copy_limit=10
)
print(response)Response: SingleFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | str | Yes | Fully qualified ID of the source feed |
| target | str | 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 follow is first mat... |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | bool | No | Whether to create a notification activity for this follow |
| create_users | bool | No | If true, auto-creates users referenced by the source and target FIDs when they don't already exis... |
| custom | dict | 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 (own_follows, own_fo... |
| push_preference | str | No | Push preference for the follow relationship |
| skip_push | bool | No | Whether to skip push for this follow |
| status | str | No | Status of the follow relationship. One of: accepted, pending, rejected |
update_follow
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
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a follow
response = client.feeds.update_follow(
source="user:john",
target="timeline:jane",
skip_push=False,
copy_custom_to_notification=False
)
print(response)Example: with create_notification_activity and create_users
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a follow
response = client.feeds.update_follow(
source="user:john",
target="timeline:jane",
create_notification_activity=False,
create_users=False
)
print(response)Example: with custom and enrich_own_fields
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a follow
response = client.feeds.update_follow(
source="user:john",
target="timeline:jane",
custom={},
enrich_own_fields=False
)
print(response)Example: with follower_role and push_preference
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update a follow
response = client.feeds.update_follow(
source="user:john",
target="timeline:jane",
follower_role="member",
push_preference="value"
)
print(response)Response: UpdateFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | str | Yes | Fully qualified ID of the source feed |
| target | str | 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 follow is first mat... |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when create_notification_a... |
| create_notification_activity | bool | No | Whether to create a notification activity for this follow |
| create_users | bool | No | If true, auto-creates users referenced by the source and target FIDs when they don't already exis... |
| custom | dict | 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 (own_follows, own_fo... |
| follower_role | str | No | - |
| push_preference | str | No | Push preference for the follow relationship |
| skip_push | bool | No | Whether to skip push for this follow |
| status | str | No | Status of the follow relationship. One of: accepted, pending, rejected |
accept_follow
Approve a pending follow request to allow a user to follow your feed, useful for managing access in private or protected feeds.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Accept a follow request
response = client.feeds.accept_follow(
source="user:john",
target="timeline:jane",
follower_role="member"
)
print(response)Response: AcceptFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | str | Yes | Fully qualified ID of the source feed |
| target | str | Yes | Fully qualified ID of the target feed |
| follower_role | str | No | Optional role for the follower in the follow relationship |
follow_batch
Add multiple followers to a feed simultaneously, ideal for quickly expanding your feed's audience.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create multiple follows at once
response = client.feeds.follow_batch(
follows=[],
create_users=False,
enrich_own_fields=False
)
print(response)Response: FollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []FollowRequest | Yes | List of follow relationships to create |
| create_users | bool | No | If true, auto-creates users referenced by source/target FIDs in the batch when they don't already... |
| enrich_own_fields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
get_or_create_follows
Ensure specified follows exist by either retrieving existing ones or creating them as needed, simplifying follow management.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Upsert multiple follows at once
response = client.feeds.get_or_create_follows(
follows=[],
create_users=False,
enrich_own_fields=False
)
print(response)Response: FollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []FollowRequest | Yes | List of follow relationships to create |
| create_users | bool | No | If true, auto-creates users referenced by source/target FIDs in the batch when they don't already... |
| enrich_own_fields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
query_follows
Retrieve a list of users who are following a specific feed, helping you analyze and manage your audience.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query follows
response = client.feeds.query_follows(
limit=25,
filter={},
sort=[]
)
print(response)Example: with prev and next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query follows
response = client.feeds.query_follows(
prev=None,
next=None
)
print(response)Response: QueryFollowsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | dict | No | Filters to apply to the query |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
reject_follow
Deny a follow request to prevent a user from following your feed, useful for maintaining privacy or exclusivity.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Reject a follow request
response = client.feeds.reject_follow(
source="user:john",
target="timeline:jane"
)
print(response)Response: RejectFollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | str | Yes | Fully qualified ID of the source feed |
| target | str | Yes | Fully qualified ID of the target feed |
unfollow
Remove a user from following a feed, helpful for managing your feed's audience or curating content access.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Unfollow a feed
response = client.feeds.unfollow(
source="user:john",
target="timeline:jane",
delete_notification_activity=False,
keep_history=False
)
print(response)Example: with enrich_own_fields
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Unfollow a feed
response = client.feeds.unfollow(
source="user:john",
target="timeline:jane",
enrich_own_fields=False
)
print(response)Response: UnfollowResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| source | str | Yes | - |
| target | str | Yes | - |
| delete_notification_activity | bool | No | - |
| keep_history | bool | No | - |
| enrich_own_fields | bool | No | - |
create_membership_level
Establish a new membership tier with specific benefits or access rights, allowing for tailored user engagement strategies.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create membership level
response = client.feeds.create_membership_level(
id="activity-123",
name="My Feed",
custom={},
description="A description"
)
print(response)Example: with priority and tags
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Create membership level
response = client.feeds.create_membership_level(
id="activity-123",
name="My Feed",
priority=1,
tags=["tag1", "tag2"]
)
print(response)Response: CreateMembershipLevelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | Unique identifier for the membership level |
| name | str | Yes | Display name for the membership level |
| custom | dict | No | Custom data for the membership level |
| description | str | No | Optional description of the membership level |
| priority | int | No | Priority level (higher numbers = higher priority) |
| tags | []string | No | Activity tags this membership level gives access to |
query_membership_levels
Retrieve existing membership levels to review or assess the tiers available for users, aiding in membership management.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query membership levels
response = client.feeds.query_membership_levels(
limit=25,
filter={},
sort=[]
)
print(response)Example: with prev and next
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query membership levels
response = client.feeds.query_membership_levels(
prev=None,
next=None
)
print(response)Response: QueryMembershipLevelsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | dict | No | Filters to apply to the query |
| limit | int | No | - |
| next | str | No | - |
| prev | str | No | - |
| sort | []SortParamRequest | No | Sorting parameters for the query |
update_membership_level
Modify an existing membership tier to adjust benefits or access rights, supporting dynamic content or service offerings.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update membership level
response = client.feeds.update_membership_level(
id="activity-123",
name="My Feed",
description="A description"
)
print(response)Example: with custom and priority
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update membership level
response = client.feeds.update_membership_level(
id="activity-123",
custom={},
priority=1
)
print(response)Example: with tags
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Update membership level
response = client.feeds.update_membership_level(
id="activity-123",
tags=["tag1", "tag2"]
)
print(response)Response: UpdateMembershipLevelResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
| custom | dict | No | Custom data for the membership level |
| description | str | No | Optional description of the membership level |
| name | str | No | Display name for the membership level |
| priority | int | No | Priority level (higher numbers = higher priority) |
| tags | []string | No | Activity tags this membership level gives access to |
delete_membership_level
Remove a membership level when it's no longer needed, streamlining your membership structure and offerings.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete membership level
response = client.feeds.delete_membership_level(
id="activity-123"
)
print(response)Response: Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | - |
query_feeds_usage_stats
Retrieve comprehensive usage statistics for a specific feed, helping you analyze engagement and performance trends over time.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Query Feed Usage Statistics
response = client.feeds.query_feeds_usage_stats(
from="value",
to="value"
)
print(response)Response: QueryFeedsUsageStatsResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| from | str | No | Start date in YYYY-MM-DD format (optional, defaults to 30 days ago) |
| to | str | No | End date in YYYY-MM-DD format (optional, defaults to today) |
unfollow_batch
Efficiently unfollow multiple feeds in a single operation, ideal for streamlining feed management when you no longer wish to receive updates from several sources.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Unfollow multiple feeds at once
response = client.feeds.unfollow_batch(
follows=[],
delete_notification_activity=False,
enrich_own_fields=False
)
print(response)Response: UnfollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []UnfollowPair | Yes | List of follow relationships to remove, each with optional keep_history |
| delete_notification_activity | bool | No | Whether to delete the corresponding notification activity (default: false) |
| enrich_own_fields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
get_or_create_unfollows
Ensure feeds are unfollowed without duplication by using an idempotent operation that simplifies management when transitioning away from specific content sources.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Unfollow multiple feeds (idempotent)
response = client.feeds.get_or_create_unfollows(
follows=[],
delete_notification_activity=False,
enrich_own_fields=False
)
print(response)Response: UnfollowBatchResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| follows | []UnfollowPair | Yes | List of follow relationships to remove, each with optional keep_history |
| delete_notification_activity | bool | No | Whether to delete the corresponding notification activity (default: false) |
| enrich_own_fields | bool | No | If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_fo... |
delete_feed_user_data
Permanently remove all data associated with a user's feed, useful for maintaining privacy and complying with data protection regulations when users request data deletion.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Delete all feed data for a user
response = client.feeds.delete_feed_user_data(
user_id="john",
hard_delete=False
)
print(response)Response: DeleteFeedUserDataResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | str | Yes | - |
| hard_delete | bool | No | Whether to perform a hard delete instead of a soft delete |
export_feed_user_data
Download a complete set of a user's feed data, allowing for backup, analysis, or migration to other systems while ensuring data portability.
Example
from getstream import Stream
client = Stream(api_key=api_key, api_secret=api_secret)
# Export all feed data for a user
response = client.feeds.export_feed_user_data(
user_id="john"
)
print(response)Response: ExportFeedUserDataResponse
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | str | Yes | - |
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
AcceptFeedMemberInviteResponse
class AcceptFeedMemberInviteResponse(TypedDict, total=False):
duration: str
member: FeedMemberResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| member | FeedMemberResponse | Yes | The feed member after accepting the invite |
AcceptFollowResponse
class AcceptFollowResponse(TypedDict, total=False):
duration: str
follow: FollowResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| follow | FollowResponse | Yes | The accepted follow relationship |
Action
class Action(TypedDict, total=False):
name: str
style: str
text: str
type: str
value: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | |
| text | str | Yes | |
| type | str | Yes | |
| style | str | No | |
| value | str | No |
ActivityFeedbackResponse
Response for activity feedback submission
class ActivityFeedbackResponse(TypedDict, total=False):
activity_id: str
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | The ID of the activity that received feedback |
| duration | str | Yes |
ActivityPinResponse
class ActivityPinResponse(TypedDict, total=False):
activity: ActivityResponse
created_at: float
feed: str
updated_at: float
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The pinned activity |
| created_at | float | Yes | When the pin was created |
| feed | str | Yes | ID of the feed where activity is pinned |
| updated_at | float | Yes | When the pin was last updated |
| user | UserResponse | Yes | User who pinned the activity |
ActivityProcessorConfig
class ActivityProcessorConfig(TypedDict, total=False):
type: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | str | Yes | Type of activity processor (required) |
ActivityRequest
class ActivityRequest(TypedDict, total=False):
attachments: List[Attachment]
collection_refs: List[str]
copy_custom_to_notification: bool
create_notification_activity: bool
custom: Dict[str, Any]
expires_at: str
feeds: List[str]
filter_tags: List[str]
id: str
interest_tags: List[str]
location: Location
mentioned_user_ids: List[str]
parent_id: str
poll_id: str
restrict_replies: str
search_data: Dict[str, Any]
skip_enrich_url: bool
skip_push: bool
text: str
type: str
user_id: str
visibility: str
visibility_tag: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| feeds | List[str] | Yes | List of feeds to add the activity to with a default max limit of 25 feeds |
| type | str | Yes | Type of activity |
| attachments | List[Attachment] | No | List of attachments for the activity |
| collection_refs | List[str] | 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 | Dict[str, Any] | No | Custom data for the activity |
| expires_at | str | No | Expiration time for the activity |
| filter_tags | List[str] | No | Tags for filtering activities |
| id | str | No | Optional ID for the activity |
| interest_tags | List[str] | No | Tags for indicating user interests |
| location | Location | No | Geographic location related to the activity |
| mentioned_user_ids | List[str] | No | List of users mentioned in the activity |
| parent_id | str | No | ID of parent activity for replies/comments |
| poll_id | str | No | ID of a poll to attach to activity |
| restrict_replies | str | No | Controls who can add comments/replies to this activity. One of: everyone, peo... |
| search_data | Dict[str, 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 | str | No | Text content of the activity |
| user_id | str | No | ID of the user creating the activity |
| visibility | str | No | Visibility setting for the activity. One of: public, private, tag |
| visibility_tag | str | No | If visibility is 'tag', this is the tag name and is required |
ActivityResponse
class ActivityResponse(TypedDict, total=False):
attachments: List[Attachment]
bookmark_count: int
collections: Dict[str, Any]
comment_count: int
comments: List[CommentResponse]
created_at: float
current_feed: FeedResponse
custom: Dict[str, Any]
deleted_at: float
edited_at: float
expires_at: float
feeds: List[str]
filter_tags: List[str]
friend_reaction_count: int
friend_reactions: List[FeedsReactionResponse]
hidden: bool
id: str
interest_tags: List[str]
is_read: bool
is_seen: bool
is_watched: bool
latest_reactions: List[FeedsReactionResponse]
location: Location
mentioned_users: List[UserResponse]
metrics: Dict[str, Any]
moderation: ModerationV2Response
moderation_action: str
notification_context: NotificationContext
own_bookmarks: List[BookmarkResponse]
own_reactions: List[FeedsReactionResponse]
parent: ActivityResponse
poll: PollResponseData
popularity: int
preview: bool
reaction_count: int
reaction_groups: Dict[str, Any]
restrict_replies: str
score: float
score_vars: Dict[str, Any]
search_data: Dict[str, Any]
selector_source: str
share_count: int
text: str
type: str
updated_at: float
user: UserResponse
visibility: str
visibility_tag: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | List[Attachment] | Yes | Media attachments for the activity |
| bookmark_count | int | Yes | Number of bookmarks on the activity |
| collections | Dict[str, Any] | Yes | Enriched collection data referenced by this activity |
| comment_count | int | Yes | Number of comments on the activity |
| comments | List[CommentResponse] | Yes | Latest 5 comments of this activity (comment replies excluded) |
| created_at | float | Yes | When the activity was created |
| custom | Dict[str, Any] | Yes | Custom data for the activity |
| feeds | List[str] | Yes | List of feed IDs containing this activity |
| filter_tags | List[str] | Yes | Tags for filtering |
| hidden | bool | Yes | If this activity is hidden by this user (using activity feedback) |
| id | str | Yes | Unique identifier for the activity |
| interest_tags | List[str] | Yes | Tags for user interests |
| latest_reactions | List[FeedsReactionResponse] | Yes | Recent reactions to the activity |
| mentioned_users | List[UserResponse] | Yes | Users mentioned in the activity |
| own_bookmarks | List[BookmarkResponse] | Yes | Current user's bookmarks for this activity |
| own_reactions | List[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 | Dict[str, Any] | Yes | Grouped reactions by type |
| restrict_replies | str | Yes | Controls who can add comments/replies to this activity. One of: everyone, peo... |
| score | float | Yes | Ranking score for this activity |
| search_data | Dict[str, Any] | Yes | Data for search indexing |
| share_count | int | Yes | Number of times the activity was shared |
| type | str | Yes | Type of activity |
| updated_at | float | Yes | When the activity was last updated |
| user | UserResponse | Yes | User who created the activity |
| visibility | str | Yes | Visibility setting for the activity. One of: public, private, tag |
| current_feed | FeedResponse | No | Feed context for this activity view. If an activity is added only to one feed... |
| deleted_at | float | No | When the activity was deleted |
| edited_at | float | No | When the activity was last edited |
| expires_at | float | No | When the activity will expire |
| friend_reaction_count | int | No | Total count of reactions from friends on this activity |
| friend_reactions | List[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 | Dict[str, Any] | No | |
| moderation | ModerationV2Response | No | Moderation information |
| moderation_action | str | 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 | Dict[str, Any] | No | Variable values used at ranking time. Only included when include_score_vars i... |
| selector_source | str | No | Which activity selector provided this activity (e.g., 'following', 'popular',... |
| text | str | No | Text content of the activity |
| visibility_tag | str | No | If visibility is 'tag', this is the tag name |
ActivitySelectorConfig
class ActivitySelectorConfig(TypedDict, total=False):
cutoff_time: str
cutoff_window: str
filter: Dict[str, Any]
min_popularity: int
params: Dict[str, Any]
sort: List[SortParamRequest]
type: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | str | Yes | Type of selector. One of: popular, proximity, following, current_feed, query,... |
| cutoff_time | str | No | Time threshold for activity selection (string). Expected RFC3339 format (e.g.... |
| cutoff_window | str | No | Flexible relative time window for activity selection (e.g., '1h', '3d', '1y')... |
| filter | Dict[str, Any] | No | Filter for activity selection |
| min_popularity | int | No | Minimum popularity threshold |
| params | Dict[str, Any] | No | |
| sort | List[SortParamRequest] | No | Sort parameters for activity selection |
AddActivityResponse
class AddActivityResponse(TypedDict, total=False):
activity: ActivityResponse
duration: str
mention_notifications_created: intProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The created activity |
| duration | str | Yes | |
| mention_notifications_created | int | No | Number of mention notification activities created for mentioned users |
AddBookmarkResponse
class AddBookmarkResponse(TypedDict, total=False):
bookmark: BookmarkResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The created bookmark |
| duration | str | Yes |
AddCommentBookmarkResponse
class AddCommentBookmarkResponse(TypedDict, total=False):
bookmark: BookmarkResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The created comment bookmark |
| duration | str | Yes |
AddCommentReactionResponse
class AddCommentReactionResponse(TypedDict, total=False):
comment: CommentResponse
duration: str
notification_created: bool
reaction: FeedsReactionResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The comment the reaction was added to |
| duration | str | 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
class AddCommentRequest(TypedDict, total=False):
attachments: List[Attachment]
comment: str
copy_custom_to_notification: bool
create_notification_activity: bool
custom: Dict[str, Any]
force_moderation: bool
id: str
mentioned_user_ids: List[str]
object_id: str
object_type: str
parent_id: str
skip_enrich_url: bool
skip_push: bool
user: UserRequest
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | List[Attachment] | No | Media attachments for the reply |
| comment | str | 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 | Dict[str, Any] | No | Custom data for the comment |
| force_moderation | bool | No | If true, forces moderation to run for server-side requests. By default, serve... |
| id | str | No | Optional custom ID for the comment (max 255 characters). If not provided, a U... |
| mentioned_user_ids | List[str] | No | List of users mentioned in the reply |
| object_id | str | No | ID of the object to comment on. Required for root comments |
| object_type | str | No | Type of the object to comment on. Required for root comments |
| parent_id | str | 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 | |
| user | UserRequest | No | |
| user_id | str | No |
AddCommentResponse
class AddCommentResponse(TypedDict, total=False):
comment: CommentResponse
duration: str
mention_notifications_created: int
notification_created: boolProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The created comment |
| duration | str | 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
class AddCommentsBatchResponse(TypedDict, total=False):
comments: List[CommentResponse]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | List[CommentResponse] | Yes | List of comments added |
| duration | str | Yes |
AddFolderRequest
class AddFolderRequest(TypedDict, total=False):
custom: Dict[str, Any]
name: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | str | Yes | Name of the folder |
| custom | Dict[str, Any] | No | Custom data for the folder |
AddReactionResponse
class AddReactionResponse(TypedDict, total=False):
activity: ActivityResponse
duration: str
notification_created: bool
reaction: FeedsReactionResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | |
| duration | str | Yes | |
| reaction | FeedsReactionResponse | Yes | The created reaction |
| notification_created | bool | No | Whether a notification activity was successfully created |
AggregatedActivityResponse
class AggregatedActivityResponse(TypedDict, total=False):
activities: List[ActivityResponse]
activity_count: int
created_at: float
group: str
is_read: bool
is_seen: bool
is_watched: bool
score: float
updated_at: float
user_count: int
user_count_truncated: boolProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | List[ActivityResponse] | Yes | List of activities in this aggregation |
| activity_count | int | Yes | Number of activities in this aggregation |
| created_at | float | Yes | When the aggregation was created |
| group | str | Yes | Grouping identifier |
| score | float | Yes | Ranking score for this aggregation |
| updated_at | float | 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 |
AggregationConfig
class AggregationConfig(TypedDict, total=False):
activities_sort: str
format: str
score_strategy: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities_sort | str | No | Order of member activities inside each aggregated group for non-stories feeds... |
| format | str | No | Format for activity aggregation |
| score_strategy | str | No | Strategy for computing aggregated group scores from member activity scores wh... |
Attachment
An attachment is a message object that represents a file uploaded by a user.
class Attachment(TypedDict, total=False):
actions: List[Action]
asset_url: str
author_icon: str
author_link: str
author_name: str
color: str
custom: Dict[str, Any]
fallback: str
fields: List[Field]
footer: str
footer_icon: str
giphy: Images
image_url: str
og_scrape_url: str
original_height: int
original_width: int
pretext: str
text: str
thumb_url: str
title: str
title_link: str
type: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Dict[str, Any] | Yes | |
| actions | List[Action] | No | |
| asset_url | str | No | |
| author_icon | str | No | |
| author_link | str | No | |
| author_name | str | No | |
| color | str | No | |
| fallback | str | No | |
| fields | List[Field] | No | |
| footer | str | No | |
| footer_icon | str | No | |
| giphy | Images | No | |
| image_url | str | No | |
| og_scrape_url | str | No | |
| original_height | int | No | |
| original_width | int | No | |
| pretext | str | No | |
| text | str | No | |
| thumb_url | str | No | |
| title | str | No | |
| title_link | str | No | |
| type | str | No | Attachment type (e.g. image, video, url) |
BookmarkFolderResponse
class BookmarkFolderResponse(TypedDict, total=False):
created_at: float
custom: Dict[str, Any]
id: str
name: str
updated_at: float
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | When the folder was created |
| id | str | Yes | Unique identifier for the folder |
| name | str | Yes | Name of the folder |
| updated_at | float | Yes | When the folder was last updated |
| user | UserResponse | Yes | User who created the folder |
| custom | Dict[str, Any] | No | Custom data for the folder |
BookmarkResponse
class BookmarkResponse(TypedDict, total=False):
activity: ActivityResponse
activity_id: str
comment: CommentResponse
created_at: float
custom: Dict[str, Any]
folder: BookmarkFolderResponse
object_id: str
object_type: str
updated_at: float
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The bookmarked activity (set when object_type is activity) |
| created_at | float | Yes | When the bookmark was created |
| object_id | str | Yes | ID of the bookmarked object |
| object_type | str | Yes | Type of the bookmarked object (activity or comment) |
| updated_at | float | Yes | When the bookmark was last updated |
| user | UserResponse | Yes | User who created the bookmark |
| activity_id | str | No | |
| comment | CommentResponse | No | The bookmarked comment (set when object_type is comment) |
| custom | Dict[str, Any] | No | Custom data for the bookmark |
| folder | BookmarkFolderResponse | No | Folder containing this bookmark |
CollectionRequest
class CollectionRequest(TypedDict, total=False):
custom: Dict[str, Any]
id: str
name: str
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Dict[str, Any] | Yes | Custom data for the collection (required, must contain at least one key) |
| name | str | Yes | Name/type of the collection |
| id | str | No | Unique identifier for the collection within its name (optional, will be auto-... |
| user_id | str | No | ID of the user who owns this collection |
CollectionResponse
class CollectionResponse(TypedDict, total=False):
created_at: float
custom: Dict[str, Any]
id: str
name: str
updated_at: float
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | Unique identifier for the collection within its name |
| name | str | Yes | Name/type of the collection |
| created_at | float | No | When the collection was created |
| custom | Dict[str, Any] | No | Custom data for the collection |
| updated_at | float | No | When the collection was last updated |
| user_id | str | No | ID of the user who owns this collection |
CommentResponse
class CommentResponse(TypedDict, total=False):
attachments: List[Attachment]
bookmark_count: int
confidence_score: float
controversy_score: float
created_at: float
custom: Dict[str, Any]
deleted_at: float
downvote_count: int
edited_at: float
id: str
latest_reactions: List[FeedsReactionResponse]
mentioned_users: List[UserResponse]
moderation: ModerationV2Response
object_id: str
object_type: str
own_reactions: List[FeedsReactionResponse]
parent_id: str
reaction_count: int
reaction_groups: Dict[str, Any]
reply_count: int
score: int
status: str
text: str
updated_at: float
upvote_count: int
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_count | int | Yes | |
| confidence_score | float | Yes | Confidence score of the comment |
| created_at | float | Yes | When the comment was created |
| downvote_count | int | Yes | Number of downvotes for this comment |
| id | str | Yes | Unique identifier for the comment |
| mentioned_users | List[UserResponse] | Yes | Users mentioned in the comment |
| object_id | str | Yes | ID of the object this comment is associated with |
| object_type | str | Yes | Type of the object this comment is associated with |
| own_reactions | List[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 | str | Yes | Status of the comment. One of: active, deleted, removed, hidden |
| updated_at | float | 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 | List[Attachment] | No | Attachments associated with the comment |
| controversy_score | float | No | Controversy score of the comment |
| custom | Dict[str, Any] | No | Custom data for the comment |
| deleted_at | float | No | When the comment was deleted |
| edited_at | float | No | When the comment was last edited |
| latest_reactions | List[FeedsReactionResponse] | No | Recent reactions to the comment |
| moderation | ModerationV2Response | No | Moderation details for the comment |
| parent_id | str | No | ID of parent comment for nested replies |
| reaction_groups | Dict[str, Any] | No | Grouped reactions by type |
| text | str | No | Text content of the comment |
CreateCollectionsResponse
class CreateCollectionsResponse(TypedDict, total=False):
collections: List[CollectionResponse]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | List[CollectionResponse] | Yes | List of created collections |
| duration | str | Yes |
CreateFeedGroupResponse
class CreateFeedGroupResponse(TypedDict, total=False):
duration: str
feed_group: FeedGroupResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_group | FeedGroupResponse | Yes | The upserted feed group |
CreateFeedViewResponse
class CreateFeedViewResponse(TypedDict, total=False):
duration: str
feed_view: FeedViewResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_view | FeedViewResponse | Yes | The created feed view |
CreateFeedsBatchResponse
class CreateFeedsBatchResponse(TypedDict, total=False):
duration: str
feeds: List[FeedResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feeds | List[FeedResponse] | Yes | List of created feeds |
CreateMembershipLevelResponse
class CreateMembershipLevelResponse(TypedDict, total=False):
duration: str
membership_level: MembershipLevelResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| membership_level | MembershipLevelResponse | Yes | The created membership level |
DailyMetricStatsResponse
class DailyMetricStatsResponse(TypedDict, total=False):
daily: List[DailyMetricResponse]
total: intProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| daily | List[DailyMetricResponse] | Yes | Array of daily metric values |
| total | int | Yes | Total value across all days in the date range |
Data
class Data(TypedDict, total=False):
id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes |
DeleteActivitiesResponse
class DeleteActivitiesResponse(TypedDict, total=False):
deleted_ids: List[str]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| deleted_ids | List[str] | Yes | List of activity IDs that were successfully deleted |
| duration | str | Yes |
DeleteActivityReactionResponse
class DeleteActivityReactionResponse(TypedDict, total=False):
activity: ActivityResponse
duration: str
reaction: FeedsReactionResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | |
| duration | str | Yes | |
| reaction | FeedsReactionResponse | Yes |
DeleteActivityResponse
class DeleteActivityResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes |
DeleteBookmarkFolderResponse
class DeleteBookmarkFolderResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes |
DeleteBookmarkResponse
class DeleteBookmarkResponse(TypedDict, total=False):
bookmark: BookmarkResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The deleted bookmark |
| duration | str | Yes |
DeleteCollectionsResponse
class DeleteCollectionsResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes |
DeleteCommentBookmarkResponse
class DeleteCommentBookmarkResponse(TypedDict, total=False):
bookmark: BookmarkResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The deleted comment bookmark |
| duration | str | Yes |
DeleteCommentReactionResponse
class DeleteCommentReactionResponse(TypedDict, total=False):
comment: CommentResponse
duration: str
reaction: FeedsReactionResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The comment after reaction removal |
| duration | str | Yes | |
| reaction | FeedsReactionResponse | Yes | The removed reaction |
DeleteCommentResponse
class DeleteCommentResponse(TypedDict, total=False):
activity: ActivityResponse
comment: CommentResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The parent activity |
| comment | CommentResponse | Yes | The deleted comment |
| duration | str | Yes |
DeleteFeedGroupResponse
Basic response information
class DeleteFeedGroupResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
DeleteFeedResponse
class DeleteFeedResponse(TypedDict, total=False):
duration: str
task_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| task_id | str | Yes | The ID of the async task that will handle feed cleanup and hard deletion |
DeleteFeedUserDataResponse
Response for deleting feed user data
class DeleteFeedUserDataResponse(TypedDict, total=False):
duration: str
task_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| task_id | str | Yes | The task ID for the deletion task |
DeleteFeedViewResponse
class DeleteFeedViewResponse(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes |
DeleteFeedsBatchResponse
class DeleteFeedsBatchResponse(TypedDict, total=False):
duration: str
task_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| task_id | str | Yes | The ID of the async task that will handle feed cleanup and hard deletion |
EMAUStatsResponse
class EMAUStatsResponse(TypedDict, total=False):
daily: List[DailyMetricResponse]
last_30_days: List[DailyMetricResponse]
month_to_date: List[DailyMetricResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| daily | List[DailyMetricResponse] | Yes | Per-day unique engaged user counts |
| last_30_days | List[DailyMetricResponse] | Yes | Rolling 30-day engaged user count snapshots |
| month_to_date | List[DailyMetricResponse] | Yes | Calendar month-to-date engaged user count snapshots |
EnrichmentOptions
Options to skip specific enrichments to improve performance. Default is false (enrichments are included). Setting a field to true skips that enrichment.
class EnrichmentOptions(TypedDict, total=False):
enrich_own_followings: bool
include_score_vars: bool
skip_activity: bool
skip_activity_collections: bool
skip_activity_comments: bool
skip_activity_current_feed: bool
skip_activity_mentioned_users: bool
skip_activity_own_bookmarks: bool
skip_activity_parents: bool
skip_activity_poll: bool
skip_activity_reactions: bool
skip_activity_refresh_image_urls: bool
skip_all: bool
skip_feed_member_user: bool
skip_followers: bool
skip_following: bool
skip_own_capabilities: bool
skip_own_follows: bool
skip_pins: boolProperties:
| 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. |
ExportFeedUserDataResponse
Response for exporting feed user data
class ExportFeedUserDataResponse(TypedDict, total=False):
duration: str
task_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| task_id | str | Yes | The task ID for the export task |
FeedGroupResponse
class FeedGroupResponse(TypedDict, total=False):
activity_processors: List[ActivityProcessorConfig]
activity_selectors: List[ActivitySelectorConfigResponse]
aggregation: AggregationConfig
created_at: float
custom: Dict[str, Any]
default_visibility: str
deleted_at: float
id: str
notification: NotificationConfig
push_notification: PushNotificationConfig
ranking: RankingConfig
stories: StoriesConfig
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | When the feed group was created |
| id | str | Yes | Identifier within the group |
| updated_at | float | Yes | When the feed group was last updated |
| activity_processors | List[ActivityProcessorConfig] | No | Configuration for activity processors |
| activity_selectors | List[ActivitySelectorConfigResponse] | No | Configuration for activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| custom | Dict[str, Any] | No | Custom data for the feed group |
| default_visibility | str | No | Default visibility for activities. One of: public, visible, followers, member... |
| deleted_at | float | No | |
| notification | NotificationConfig | No | Configuration for notifications |
| push_notification | PushNotificationConfig | No | Configuration for push notifications |
| ranking | RankingConfig | No | Configuration for activity ranking |
| stories | StoriesConfig | No | Configuration for stories feature |
FeedInput
class FeedInput(TypedDict, total=False):
custom: Dict[str, Any]
description: str
filter_tags: List[str]
location: Location
members: List[FeedMemberRequest]
name: str
visibility: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Dict[str, Any] | No | |
| description | str | No | |
| filter_tags | List[str] | No | |
| location | Location | No | |
| members | List[FeedMemberRequest] | No | |
| name | str | No | |
| visibility | str | No |
FeedMemberRequest
class FeedMemberRequest(TypedDict, total=False):
custom: Dict[str, Any]
invite: bool
membership_level: str
role: str
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| user_id | str | Yes | ID of the user to add as a member |
| custom | Dict[str, Any] | No | Custom data for the member |
| invite | bool | No | Whether this is an invite to become a member |
| membership_level | str | No | ID of the membership level to assign to the member |
| role | str | No | Role of the member in the feed |
FeedMemberResponse
class FeedMemberResponse(TypedDict, total=False):
created_at: float
custom: Dict[str, Any]
invite_accepted_at: float
invite_rejected_at: float
membership_level: MembershipLevelResponse
role: str
status: str
updated_at: float
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | When the membership was created |
| role | str | Yes | Role of the member in the feed |
| status | str | Yes | Status of the membership. One of: member, pending, rejected |
| updated_at | float | Yes | When the membership was last updated |
| user | UserResponse | Yes | User who is a member |
| custom | Dict[str, Any] | No | Custom data for the membership |
| invite_accepted_at | float | No | When the invite was accepted |
| invite_rejected_at | float | No | When the invite was rejected |
| membership_level | MembershipLevelResponse | No | Membership level assigned to the member |
FeedRequest
class FeedRequest(TypedDict, total=False):
created_by_id: str
custom: Dict[str, Any]
description: str
feed_group_id: str
feed_id: str
filter_tags: List[str]
location: Location
members: List[FeedMemberRequest]
name: str
visibility: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| feed_group_id | str | Yes | ID of the feed group |
| feed_id | str | Yes | ID of the feed |
| created_by_id | str | No | ID of the feed creator |
| custom | Dict[str, Any] | No | Custom data for the feed |
| description | str | No | Description of the feed |
| filter_tags | List[str] | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| members | List[FeedMemberRequest] | No | Initial members for the feed |
| name | str | No | Name of the feed |
| visibility | str | No | Visibility setting for the feed. One of: public, visible, followers, members,... |
FeedResponse
class FeedResponse(TypedDict, total=False):
activity_count: int
created_at: float
created_by: UserResponse
custom: Dict[str, Any]
deleted_at: float
description: str
feed: str
filter_tags: List[str]
follower_count: int
following_count: int
group_id: str
id: str
location: Location
member_count: int
name: str
own_capabilities: List[FeedOwnCapability]
own_followings: List[FollowResponse]
own_follows: List[FollowResponse]
own_membership: FeedMemberResponse
pin_count: int
updated_at: float
visibility: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_count | int | Yes | |
| created_at | float | Yes | When the feed was created |
| created_by | UserResponse | Yes | User who created the feed |
| description | str | Yes | Description of the feed |
| feed | str | 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 | str | Yes | Group this feed belongs to |
| id | str | Yes | Unique identifier for the feed |
| member_count | int | Yes | Number of members in this feed |
| name | str | Yes | Name of the feed |
| pin_count | int | Yes | Number of pinned activities in this feed |
| updated_at | float | Yes | When the feed was last updated |
| custom | Dict[str, Any] | No | Custom data for the feed |
| deleted_at | float | No | When the feed was deleted |
| filter_tags | List[str] | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| own_capabilities | List[FeedOwnCapability] | No | Capabilities the current user has for this feed |
| own_followings | List[FollowResponse] | No | Follow relationships where the feed owner’s feeds are following the current... |
| own_follows | List[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 | str | No | Visibility setting for the feed |
FeedSuggestionResponse
class FeedSuggestionResponse(TypedDict, total=False):
activity_count: int
algorithm_scores: Dict[str, Any]
created_at: float
created_by: UserResponse
custom: Dict[str, Any]
deleted_at: float
description: str
feed: str
filter_tags: List[str]
follower_count: int
following_count: int
group_id: str
id: str
location: Location
member_count: int
name: str
own_capabilities: List[FeedOwnCapability]
own_followings: List[FollowResponse]
own_follows: List[FollowResponse]
own_membership: FeedMemberResponse
pin_count: int
reason: str
recommendation_score: float
updated_at: float
visibility: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_count | int | Yes | |
| created_at | float | Yes | When the feed was created |
| created_by | UserResponse | Yes | User who created the feed |
| description | str | Yes | Description of the feed |
| feed | str | 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 | str | Yes | Group this feed belongs to |
| id | str | Yes | Unique identifier for the feed |
| member_count | int | Yes | Number of members in this feed |
| name | str | Yes | Name of the feed |
| pin_count | int | Yes | Number of pinned activities in this feed |
| updated_at | float | Yes | When the feed was last updated |
| algorithm_scores | Dict[str, Any] | No | |
| custom | Dict[str, Any] | No | Custom data for the feed |
| deleted_at | float | No | When the feed was deleted |
| filter_tags | List[str] | No | Tags used for filtering feeds |
| location | Location | No | Geographic location for the feed |
| own_capabilities | List[FeedOwnCapability] | No | Capabilities the current user has for this feed |
| own_followings | List[FollowResponse] | No | Follow relationships where the feed owner’s feeds are following the current... |
| own_follows | List[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 | str | No | |
| recommendation_score | float | No | |
| visibility | str | No | Visibility setting for the feed |
FeedViewResponse
class FeedViewResponse(TypedDict, total=False):
activity_selectors: List[ActivitySelectorConfigResponse]
aggregation: AggregationConfig
id: str
last_used_at: float
ranking: RankingConfigProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | Unique identifier for the custom feed view |
| activity_selectors | List[ActivitySelectorConfigResponse] | No | Configured activity selectors |
| aggregation | AggregationConfig | No | Configuration for activity aggregation |
| last_used_at | float | No | When the feed view was last used |
| ranking | RankingConfig | No | Configuration for activity ranking |
FeedVisibilityResponse
class FeedVisibilityResponse(TypedDict, total=False):
grants: Dict[str, Any]
name: str
permissions: List[Permission]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| grants | Dict[str, Any] | Yes | Permission grants for each role |
| name | str | Yes | Name of the feed visibility level |
| permissions | List[Permission] | Yes | List of permission policies |
FeedsReactionResponse
class FeedsReactionResponse(TypedDict, total=False):
activity_id: str
comment_id: str
created_at: float
custom: Dict[str, Any]
type: str
updated_at: float
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | ID of the activity that was reacted to |
| created_at | float | Yes | When the reaction was created |
| type | str | Yes | Type of reaction |
| updated_at | float | Yes | When the reaction was last updated |
| user | UserResponse | Yes | User who created the reaction |
| comment_id | str | No | ID of the comment that was reacted to |
| custom | Dict[str, Any] | No | Custom data for the reaction |
Field
class Field(TypedDict, total=False):
short: bool
title: str
value: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | bool | Yes | |
| title | str | Yes | |
| value | str | Yes |
FollowBatchResponse
class FollowBatchResponse(TypedDict, total=False):
created: List[FollowResponse]
duration: str
follows: List[FollowResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created | List[FollowResponse] | Yes | List of newly created follow relationships |
| duration | str | Yes | |
| follows | List[FollowResponse] | Yes | List of current follow relationships |
FollowRequest
class FollowRequest(TypedDict, total=False):
activity_copy_limit: int
copy_custom_to_notification: bool
create_notification_activity: bool
create_users: bool
custom: Dict[str, Any]
enrich_own_fields: bool
push_preference: str
skip_push: bool
source: str
status: str
target: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| source | str | Yes | Fully qualified ID of the source feed |
| target | str | 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 |
| create_users | bool | No | If true, auto-creates users referenced by the source and target FIDs when the... |
| custom | Dict[str, 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 | str | No | Push preference for the follow relationship |
| skip_push | bool | No | Whether to skip push for this follow |
| status | str | No | Status of the follow relationship. One of: accepted, pending, rejected |
FollowResponse
class FollowResponse(TypedDict, total=False):
created_at: float
custom: Dict[str, Any]
follower_role: str
push_preference: str
request_accepted_at: float
request_rejected_at: float
source_feed: FeedResponse
status: str
target_feed: FeedResponse
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | When the follow relationship was created |
| follower_role | str | Yes | Role of the follower (source user) in the follow relationship |
| push_preference | str | Yes | Push preference for notifications. One of: all, none |
| source_feed | FeedResponse | Yes | Source feed object |
| status | str | Yes | Status of the follow relationship. One of: accepted, pending, rejected |
| target_feed | FeedResponse | Yes | Target feed object |
| updated_at | float | Yes | When the follow relationship was last updated |
| custom | Dict[str, Any] | No | Custom data for the follow relationship |
| request_accepted_at | float | No | When the follow request was accepted |
| request_rejected_at | float | No | When the follow request was rejected |
FriendReactionsOptions
Options to control fetching reactions from friends (users you follow or have mutual follows with).
class FriendReactionsOptions(TypedDict, total=False):
enabled: bool
limit: int
type: strProperties:
| 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 | str | No | Default: 'following'. The type of friend relationship to use. 'following' = u... |
GetActivityResponse
class GetActivityResponse(TypedDict, total=False):
activity: ActivityResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The requested activity |
| duration | str | Yes |
GetCommentRepliesResponse
class GetCommentRepliesResponse(TypedDict, total=False):
comments: List[ThreadedCommentResponse]
duration: str
next: str
prev: str
sort: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | List[ThreadedCommentResponse] | Yes | Threaded listing of replies to the comment |
| duration | str | Yes | |
| sort | str | Yes | Sort order used for the replies (first, last, top, best, controversial) |
| next | str | No | |
| prev | str | No |
GetCommentResponse
class GetCommentResponse(TypedDict, total=False):
comment: CommentResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | Comment |
| duration | str | Yes |
GetCommentsResponse
class GetCommentsResponse(TypedDict, total=False):
comments: List[ThreadedCommentResponse]
duration: str
next: str
prev: str
sort: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | List[ThreadedCommentResponse] | Yes | Threaded listing for the activity |
| duration | str | Yes | |
| sort | str | Yes | Sort order used for the comments (first, last, top, best, controversial) |
| next | str | No | |
| prev | str | No |
GetFeedGroupResponse
class GetFeedGroupResponse(TypedDict, total=False):
duration: str
feed_group: FeedGroupResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_group | FeedGroupResponse | Yes | The requested feed group |
GetFeedViewResponse
class GetFeedViewResponse(TypedDict, total=False):
duration: str
feed_view: FeedViewResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_view | FeedViewResponse | Yes | The requested feed view |
GetFeedVisibilityResponse
class GetFeedVisibilityResponse(TypedDict, total=False):
duration: str
feed_visibility: FeedVisibilityResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_visibility | FeedVisibilityResponse | Yes | Feed visibility configuration and permissions |
GetFeedsRateLimitsResponse
class GetFeedsRateLimitsResponse(TypedDict, total=False):
android: Dict[str, Any]
duration: str
ios: Dict[str, Any]
server_side: Dict[str, Any]
web: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| android | Dict[str, Any] | No | Rate limits for Android platform (endpoint name -> limit info) |
| ios | Dict[str, Any] | No | Rate limits for iOS platform (endpoint name -> limit info) |
| server_side | Dict[str, Any] | No | Rate limits for server-side platform (endpoint name -> limit info) |
| web | Dict[str, Any] | No | Rate limits for Web platform (endpoint name -> limit info) |
GetFollowSuggestionsResponse
class GetFollowSuggestionsResponse(TypedDict, total=False):
algorithm_used: str
duration: str
suggestions: List[FeedSuggestionResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| suggestions | List[FeedSuggestionResponse] | Yes | List of suggested feeds to follow |
| algorithm_used | str | No |
GetOrCreateFeedGroupResponse
class GetOrCreateFeedGroupResponse(TypedDict, total=False):
duration: str
feed_group: FeedGroupResponse
was_created: boolProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_group | FeedGroupResponse | Yes | The feed group that was retrieved or created |
| was_created | bool | Yes | Indicates whether the feed group was created (true) or already existed (false) |
GetOrCreateFeedResponse
Basic response information
class GetOrCreateFeedResponse(TypedDict, total=False):
activities: List[ActivityResponse]
aggregated_activities: List[AggregatedActivityResponse]
created: bool
duration: str
feed: FeedResponse
followers: List[FollowResponse]
followers_pagination: PagerResponse
following: List[FollowResponse]
following_pagination: PagerResponse
member_pagination: PagerResponse
members: List[FeedMemberResponse]
next: str
notification_status: NotificationStatusResponse
pinned_activities: List[ActivityPinResponse]
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | List[ActivityResponse] | Yes | |
| aggregated_activities | List[AggregatedActivityResponse] | Yes | |
| created | bool | Yes | |
| duration | str | Yes | Duration of the request in milliseconds |
| feed | FeedResponse | Yes | |
| followers | List[FollowResponse] | Yes | |
| following | List[FollowResponse] | Yes | |
| members | List[FeedMemberResponse] | Yes | |
| pinned_activities | List[ActivityPinResponse] | Yes | |
| followers_pagination | PagerResponse | No | |
| following_pagination | PagerResponse | No | |
| member_pagination | PagerResponse | No | |
| next | str | No | |
| notification_status | NotificationStatusResponse | No | |
| prev | str | No |
GetOrCreateFeedViewResponse
class GetOrCreateFeedViewResponse(TypedDict, total=False):
duration: str
feed_view: FeedViewResponse
was_created: boolProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_view | FeedViewResponse | Yes | The feed view (either existing or newly created) |
| was_created | bool | Yes | Indicates whether the feed view was newly created (true) or already existed (... |
Images
class Images(TypedDict, total=False):
fixed_height: ImageData
fixed_height_downsampled: ImageData
fixed_height_still: ImageData
fixed_width: ImageData
fixed_width_downsampled: ImageData
fixed_width_still: ImageData
original: ImageDataProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| fixed_height | ImageData | Yes | |
| fixed_height_downsampled | ImageData | Yes | |
| fixed_height_still | ImageData | Yes | |
| fixed_width | ImageData | Yes | |
| fixed_width_downsampled | ImageData | Yes | |
| fixed_width_still | ImageData | Yes | |
| original | ImageData | Yes |
ListFeedGroupsResponse
Basic response information
class ListFeedGroupsResponse(TypedDict, total=False):
duration: str
groups: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| groups | Dict[str, Any] | Yes |
ListFeedViewsResponse
class ListFeedViewsResponse(TypedDict, total=False):
duration: str
views: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| views | Dict[str, Any] | Yes | Map of feed view ID to feed view |
ListFeedVisibilitiesResponse
class ListFeedVisibilitiesResponse(TypedDict, total=False):
duration: str
feed_visibilities: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_visibilities | Dict[str, Any] | Yes | Map of feed visibility configurations by name |
Location
class Location(TypedDict, total=False):
lat: float
lng: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| lat | float | Yes | Latitude coordinate |
| lng | float | Yes | Longitude coordinate |
MembershipLevelResponse
class MembershipLevelResponse(TypedDict, total=False):
created_at: float
custom: Dict[str, Any]
description: str
id: str
name: str
priority: int
tags: List[str]
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | When the membership level was created |
| id | str | Yes | Unique identifier for the membership level |
| name | str | Yes | Display name for the membership level |
| priority | int | Yes | Priority level |
| tags | List[str] | Yes | Activity tags this membership level gives access to |
| updated_at | float | Yes | When the membership level was last updated |
| custom | Dict[str, Any] | No | Custom data for the membership level |
| description | str | No | Description of the membership level |
NotificationConfig
class NotificationConfig(TypedDict, total=False):
deduplication_window: str
track_read: bool
track_seen: boolProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| deduplication_window | str | No | Time window for deduplicating notification activities (reactions and follows)... |
| track_read | bool | No | Whether to track read status |
| track_seen | bool | No | Whether to track seen status |
NotificationStatusResponse
class NotificationStatusResponse(TypedDict, total=False):
last_read_at: float
last_seen_at: float
read_activities: List[str]
seen_activities: List[str]
unread: int
unseen: intProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| unread | int | Yes | Number of unread notifications |
| unseen | int | Yes | Number of unseen notifications |
| last_read_at | float | No | When notifications were last read |
| last_seen_at | float | No | When notifications were last seen |
| read_activities | List[str] | No | Deprecated: use is_read on each activity/group instead. IDs of activities tha... |
| seen_activities | List[str] | No | Deprecated: use is_seen on each activity/group instead. IDs of activities tha... |
OwnBatchResponse
class OwnBatchResponse(TypedDict, total=False):
data: Dict[str, Any]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| data | Dict[str, Any] | Yes | Map of feed ID to own fields data |
| duration | str | Yes |
PagerRequest
class PagerRequest(TypedDict, total=False):
limit: int
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| limit | int | No | |
| next | str | No | |
| prev | str | No |
PagerResponse
class PagerResponse(TypedDict, total=False):
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| next | str | No | |
| prev | str | No |
PinActivityResponse
class PinActivityResponse(TypedDict, total=False):
activity: ActivityResponse
created_at: float
duration: str
feed: str
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The pinned activity |
| created_at | float | Yes | When the activity was pinned |
| duration | str | Yes | |
| feed | str | Yes | Fully qualified ID of the feed the activity was pinned to |
| user_id | str | Yes | ID of the user who pinned the activity |
PollResponseData
class PollResponseData(TypedDict, total=False):
allow_answers: bool
allow_user_suggested_options: bool
answers_count: int
created_at: float
created_by: UserResponse
created_by_id: str
custom: Dict[str, Any]
description: str
enforce_unique_vote: bool
id: str
is_closed: bool
latest_answers: List[PollVoteResponseData]
latest_votes_by_option: Dict[str, Any]
max_votes_allowed: int
name: str
options: List[PollOptionResponseData]
own_votes: List[PollVoteResponseData]
updated_at: float
vote_count: int
vote_counts_by_option: Dict[str, Any]
voting_visibility: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| allow_answers | bool | Yes | |
| allow_user_suggested_options | bool | Yes | |
| answers_count | int | Yes | |
| created_at | float | Yes | |
| created_by_id | str | Yes | |
| custom | Dict[str, Any] | Yes | |
| description | str | Yes | |
| enforce_unique_vote | bool | Yes | |
| id | str | Yes | |
| latest_answers | List[PollVoteResponseData] | Yes | |
| latest_votes_by_option | Dict[str, Any] | Yes | |
| name | str | Yes | |
| options | List[PollOptionResponseData] | Yes | |
| own_votes | List[PollVoteResponseData] | Yes | |
| updated_at | float | Yes | |
| vote_count | int | Yes | |
| vote_counts_by_option | Dict[str, Any] | Yes | |
| voting_visibility | str | Yes | |
| created_by | UserResponse | No | |
| is_closed | bool | No | |
| max_votes_allowed | int | No |
PollVoteResponse
class PollVoteResponse(TypedDict, total=False):
duration: str
poll: PollResponseData
vote: PollVoteResponseDataProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| poll | PollResponseData | No | Poll |
| vote | PollVoteResponseData | No | Poll vote |
PollVoteResponseData
class PollVoteResponseData(TypedDict, total=False):
answer_text: str
created_at: float
id: str
is_answer: bool
option_id: str
poll_id: str
updated_at: float
user: UserResponse
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | float | Yes | |
| id | str | Yes | |
| option_id | str | Yes | |
| poll_id | str | Yes | |
| updated_at | float | Yes | |
| answer_text | str | No | |
| is_answer | bool | No | |
| user | UserResponse | No | |
| user_id | str | No |
PrivacySettingsResponse
class PrivacySettingsResponse(TypedDict, total=False):
delivery_receipts: DeliveryReceiptsResponse
read_receipts: ReadReceiptsResponse
typing_indicators: TypingIndicatorsResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
PushNotificationConfig
class PushNotificationConfig(TypedDict, total=False):
enable_push: bool
push_types: List[str]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enable_push | bool | No | Whether push notifications are enabled for this feed group |
| push_types | List[str] | No | List of notification types that should trigger push notifications (e.g., foll... |
QueryActivitiesResponse
class QueryActivitiesResponse(TypedDict, total=False):
activities: List[ActivityResponse]
duration: str
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | List[ActivityResponse] | Yes | List of activities matching the query |
| duration | str | Yes | |
| next | str | No | Cursor for next page |
| prev | str | No | Cursor for previous page |
QueryActivityReactionsResponse
Basic response information
class QueryActivityReactionsResponse(TypedDict, total=False):
duration: str
next: str
prev: str
reactions: List[FeedsReactionResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| reactions | List[FeedsReactionResponse] | Yes | |
| next | str | No | |
| prev | str | No |
QueryBookmarkFoldersResponse
class QueryBookmarkFoldersResponse(TypedDict, total=False):
bookmark_folders: List[BookmarkFolderResponse]
duration: str
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_folders | List[BookmarkFolderResponse] | Yes | List of bookmark folders matching the query |
| duration | str | Yes | |
| next | str | No | Cursor for next page |
| prev | str | No | Cursor for previous page |
QueryBookmarksResponse
class QueryBookmarksResponse(TypedDict, total=False):
bookmarks: List[BookmarkResponse]
duration: str
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmarks | List[BookmarkResponse] | Yes | List of bookmarks matching the query |
| duration | str | Yes | |
| next | str | No | Cursor for next page |
| prev | str | No | Cursor for previous page |
QueryCollectionsResponse
class QueryCollectionsResponse(TypedDict, total=False):
collections: List[CollectionResponse]
duration: str
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | List[CollectionResponse] | Yes | List of collections matching the query |
| duration | str | Yes | |
| next | str | No | Cursor for next page |
| prev | str | No | Cursor for previous page |
QueryCommentReactionsResponse
Basic response information
class QueryCommentReactionsResponse(TypedDict, total=False):
duration: str
next: str
prev: str
reactions: List[FeedsReactionResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
| reactions | List[FeedsReactionResponse] | Yes | |
| next | str | No | |
| prev | str | No |
QueryCommentsResponse
class QueryCommentsResponse(TypedDict, total=False):
comments: List[CommentResponse]
duration: str
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comments | List[CommentResponse] | Yes | List of comments matching the query |
| duration | str | Yes | |
| next | str | No | Cursor for next page |
| prev | str | No | Cursor for previous page |
QueryFeedMembersResponse
class QueryFeedMembersResponse(TypedDict, total=False):
duration: str
members: List[FeedMemberResponse]
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| members | List[FeedMemberResponse] | Yes | List of feed members |
| next | str | No | Cursor for next page |
| prev | str | No | Cursor for previous page |
QueryFeedsResponse
class QueryFeedsResponse(TypedDict, total=False):
duration: str
feeds: List[FeedResponse]
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feeds | List[FeedResponse] | Yes | List of feeds matching the query |
| next | str | No | Cursor for next page |
| prev | str | No | Cursor for previous page |
QueryFeedsUsageStatsResponse
class QueryFeedsUsageStatsResponse(TypedDict, total=False):
activities: DailyMetricStatsResponse
api_requests: DailyMetricStatsResponse
duration: str
emau: EMAUStatsResponse
follows: DailyMetricStatsResponse
openai_requests: DailyMetricStatsResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | DailyMetricStatsResponse | Yes | Activities statistics with daily breakdown and total |
| api_requests | DailyMetricStatsResponse | Yes | API requests statistics with daily breakdown and total |
| duration | str | Yes | |
| follows | DailyMetricStatsResponse | Yes | Follows statistics with daily breakdown and total |
| openai_requests | DailyMetricStatsResponse | Yes | OpenAI requests statistics with daily breakdown and total |
| emau | EMAUStatsResponse | No | Engaged Monthly Active Users snapshots within the requested date range. Omitt... |
QueryFollowsResponse
class QueryFollowsResponse(TypedDict, total=False):
duration: str
follows: List[FollowResponse]
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| follows | List[FollowResponse] | Yes | List of follow relationships matching the query |
| next | str | No | Cursor for next page |
| prev | str | No | Cursor for previous page |
QueryMembershipLevelsResponse
class QueryMembershipLevelsResponse(TypedDict, total=False):
duration: str
membership_levels: List[MembershipLevelResponse]
next: str
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| membership_levels | List[MembershipLevelResponse] | Yes | |
| next | str | No | Cursor for next page |
| prev | str | No | Cursor for previous page |
QueryPinnedActivitiesResponse
class QueryPinnedActivitiesResponse(TypedDict, total=False):
duration: str
next: str
pinned_activities: List[ActivityPinResponse]
prev: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| pinned_activities | List[ActivityPinResponse] | Yes | List of pinned activities matching the query |
| next | str | No | Cursor for next page |
| prev | str | No | Cursor for previous page |
RankingConfig
class RankingConfig(TypedDict, total=False):
defaults: Dict[str, Any]
functions: Dict[str, Any]
score: str
type: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | str | Yes | Type of ranking algorithm. Required. One of: expression, interest |
| defaults | Dict[str, Any] | No | Default values for ranking |
| functions | Dict[str, Any] | No | Decay functions configuration |
| score | str | No | Scoring formula. Required when type is 'expression' or 'interest' |
Reaction
class Reaction(TypedDict, total=False):
activity_id: str
children_counts: Dict[str, Any]
created_at: float
data: Dict[str, Any]
deleted_at: float
id: str
kind: str
latest_children: Dict[str, Any]
moderation: Dict[str, Any]
own_children: Dict[str, Any]
parent: str
score: float
target_feeds: List[str]
target_feeds_extra_data: Dict[str, Any]
updated_at: float
user: User
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | |
| created_at | float | Yes | |
| kind | str | Yes | |
| updated_at | float | Yes | |
| user_id | str | Yes | |
| children_counts | Dict[str, Any] | No | |
| data | Dict[str, Any] | No | |
| deleted_at | float | No | |
| id | str | No | |
| latest_children | Dict[str, Any] | No | |
| moderation | Dict[str, Any] | No | |
| own_children | Dict[str, Any] | No | |
| parent | str | No | |
| score | float | No | |
| target_feeds | List[str] | No | |
| target_feeds_extra_data | Dict[str, Any] | No | |
| user | User | No |
ReadCollectionsResponse
class ReadCollectionsResponse(TypedDict, total=False):
collections: List[CollectionResponse]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | List[CollectionResponse] | Yes | List of collections matching the references |
| duration | str | Yes |
RejectFeedMemberInviteResponse
class RejectFeedMemberInviteResponse(TypedDict, total=False):
duration: str
member: FeedMemberResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| member | FeedMemberResponse | Yes | The feed member after rejecting the invite |
RejectFollowResponse
class RejectFollowResponse(TypedDict, total=False):
duration: str
follow: FollowResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| follow | FollowResponse | Yes | The rejected follow relationship |
Response
Basic response information
class Response(TypedDict, total=False):
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | Duration of the request in milliseconds |
RestoreActivityResponse
class RestoreActivityResponse(TypedDict, total=False):
activity: ActivityResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The restored activity with full enrichment |
| duration | str | Yes |
RestoreCommentResponse
class RestoreCommentResponse(TypedDict, total=False):
activity: ActivityResponse
comment: CommentResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The parent activity with updated counts |
| comment | CommentResponse | Yes | The restored comment |
| duration | str | Yes |
RestoreFeedGroupResponse
class RestoreFeedGroupResponse(TypedDict, total=False):
duration: str
feed_group: FeedGroupResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_group | FeedGroupResponse | Yes | The restored feed group |
SingleFollowResponse
class SingleFollowResponse(TypedDict, total=False):
duration: str
follow: FollowResponse
notification_created: boolProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| follow | FollowResponse | Yes | The created follow relationship |
| notification_created | bool | No | Whether a notification activity was successfully created |
SortParamRequest
class SortParamRequest(TypedDict, total=False):
direction: int
field: str
type: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| direction | int | No | Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One o... |
| field | str | No | Name of field to sort by |
| type | str | No | Type of field to sort by. Empty string or omitted means string type (default)... |
StoriesConfig
class StoriesConfig(TypedDict, total=False):
skip_watched: bool
track_watched: boolProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| skip_watched | bool | No | Whether to skip already watched stories |
| track_watched | bool | No | Whether to track watched status for stories |
ThreadedCommentResponse
A comment with an optional, depth‑limited slice of nested replies.
class ThreadedCommentResponse(TypedDict, total=False):
attachments: List[Attachment]
bookmark_count: int
confidence_score: float
controversy_score: float
created_at: float
custom: Dict[str, Any]
deleted_at: float
downvote_count: int
edited_at: float
id: str
latest_reactions: List[FeedsReactionResponse]
mentioned_users: List[UserResponse]
meta: RepliesMeta
moderation: ModerationV2Response
object_id: str
object_type: str
own_reactions: List[FeedsReactionResponse]
parent_id: str
reaction_count: int
reaction_groups: Dict[str, Any]
replies: List[ThreadedCommentResponse]
reply_count: int
score: int
status: str
text: str
updated_at: float
upvote_count: int
user: UserResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_count | int | Yes | |
| confidence_score | float | Yes | |
| created_at | float | Yes | |
| downvote_count | int | Yes | |
| id | str | Yes | |
| mentioned_users | List[UserResponse] | Yes | |
| object_id | str | Yes | |
| object_type | str | Yes | |
| own_reactions | List[FeedsReactionResponse] | Yes | |
| reaction_count | int | Yes | |
| reply_count | int | Yes | |
| score | int | Yes | |
| status | str | Yes | Status of the comment. One of: active, deleted, removed, hidden |
| updated_at | float | Yes | |
| upvote_count | int | Yes | |
| user | UserResponse | Yes | |
| attachments | List[Attachment] | No | |
| controversy_score | float | No | |
| custom | Dict[str, Any] | No | |
| deleted_at | float | No | |
| edited_at | float | No | |
| latest_reactions | List[FeedsReactionResponse] | No | |
| meta | RepliesMeta | No | Pagination & depth info for this node's direct replies. |
| moderation | ModerationV2Response | No | |
| parent_id | str | No | |
| reaction_groups | Dict[str, Any] | No | |
| replies | List[ThreadedCommentResponse] | No | Slice of nested comments (may be empty). |
| text | str | No |
Time
class Time(TypedDict, total=False):
passTrackActivityMetricsEvent
A single metric event to track for an activity
class TrackActivityMetricsEvent(TypedDict, total=False):
activity_id: str
delta: int
metric: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | The ID of the activity to track the metric for |
| metric | str | 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
class TrackActivityMetricsEventResult(TypedDict, total=False):
activity_id: str
allowed: bool
error: str
metric: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | The activity ID from the request |
| allowed | bool | Yes | Whether the metric was counted (false if rate-limited) |
| metric | str | Yes | The metric name from the request |
| error | str | No | Error message if processing failed |
TrackActivityMetricsResponse
Response containing results for each tracked metric event
class TrackActivityMetricsResponse(TypedDict, total=False):
duration: str
results: List[TrackActivityMetricsEventResult]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| results | List[TrackActivityMetricsEventResult] | Yes | Results for each event in the request, in the same order |
UnfollowBatchResponse
class UnfollowBatchResponse(TypedDict, total=False):
duration: str
follows: List[FollowResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| follows | List[FollowResponse] | Yes | List of follow relationships that were removed |
UnfollowPair
class UnfollowPair(TypedDict, total=False):
keep_history: bool
source: str
target: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| source | str | Yes | Fully qualified ID of the source feed |
| target | str | 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
class UnfollowResponse(TypedDict, total=False):
duration: str
follow: FollowResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| follow | FollowResponse | Yes | The deleted follow relationship |
UnpinActivityResponse
class UnpinActivityResponse(TypedDict, total=False):
activity: ActivityResponse
duration: str
feed: str
user_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The unpinned activity |
| duration | str | Yes | |
| feed | str | Yes | Fully qualified ID of the feed the activity was unpinned from |
| user_id | str | Yes | ID of the user who unpinned the activity |
UpdateActivitiesPartialBatchResponse
class UpdateActivitiesPartialBatchResponse(TypedDict, total=False):
activities: List[ActivityResponse]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | List[ActivityResponse] | Yes | List of successfully updated activities |
| duration | str | Yes |
UpdateActivityPartialChangeRequest
class UpdateActivityPartialChangeRequest(TypedDict, total=False):
activity_id: str
copy_custom_to_notification: bool
handle_mention_notifications: bool
set: Dict[str, Any]
unset: List[str]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | str | Yes | ID of the activity to update |
| copy_custom_to_notification | bool | No | Whether to copy custom data to the notification activity (only applies when h... |
| handle_mention_notifications | bool | No | When true and 'mentioned_user_ids' is updated, automatically creates or delet... |
| set | Dict[str, Any] | No | Map of field names to new values. Supported fields: 'text', 'attachments', 'c... |
| unset | List[str] | No | List of field names to remove. Supported fields: 'custom', 'location', 'expir... |
UpdateActivityPartialResponse
class UpdateActivityPartialResponse(TypedDict, total=False):
activity: ActivityResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The updated activity |
| duration | str | Yes |
UpdateActivityResponse
class UpdateActivityResponse(TypedDict, total=False):
activity: ActivityResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity | ActivityResponse | Yes | The updated activity |
| duration | str | Yes |
UpdateBookmarkFolderResponse
class UpdateBookmarkFolderResponse(TypedDict, total=False):
bookmark_folder: BookmarkFolderResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark_folder | BookmarkFolderResponse | Yes | The updated bookmark folder |
| duration | str | Yes |
UpdateBookmarkResponse
class UpdateBookmarkResponse(TypedDict, total=False):
bookmark: BookmarkResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The updated bookmark |
| duration | str | Yes |
UpdateCollectionRequest
class UpdateCollectionRequest(TypedDict, total=False):
custom: Dict[str, Any]
id: str
name: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | Dict[str, Any] | Yes | Custom data for the collection (required, must contain at least one key) |
| id | str | Yes | Unique identifier for the collection within its name |
| name | str | Yes | Name/type of the collection |
UpdateCollectionsResponse
class UpdateCollectionsResponse(TypedDict, total=False):
collections: List[CollectionResponse]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | List[CollectionResponse] | Yes | List of updated collections |
| duration | str | Yes |
UpdateCommentBookmarkResponse
class UpdateCommentBookmarkResponse(TypedDict, total=False):
bookmark: BookmarkResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| bookmark | BookmarkResponse | Yes | The updated comment bookmark |
| duration | str | Yes |
UpdateCommentPartialResponse
class UpdateCommentPartialResponse(TypedDict, total=False):
comment: CommentResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The updated comment |
| duration | str | Yes |
UpdateCommentResponse
class UpdateCommentResponse(TypedDict, total=False):
comment: CommentResponse
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| comment | CommentResponse | Yes | The updated comment |
| duration | str | Yes |
UpdateFeedGroupResponse
class UpdateFeedGroupResponse(TypedDict, total=False):
duration: str
feed_group: FeedGroupResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_group | FeedGroupResponse | Yes | The updated feed group |
UpdateFeedMembersResponse
Basic response information
class UpdateFeedMembersResponse(TypedDict, total=False):
added: List[FeedMemberResponse]
duration: str
removed_ids: List[str]
updated: List[FeedMemberResponse]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| added | List[FeedMemberResponse] | Yes | |
| duration | str | Yes | Duration of the request in milliseconds |
| removed_ids | List[str] | Yes | |
| updated | List[FeedMemberResponse] | Yes |
UpdateFeedResponse
class UpdateFeedResponse(TypedDict, total=False):
duration: str
feed: FeedResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed | FeedResponse | Yes | The updated feed |
UpdateFeedViewResponse
class UpdateFeedViewResponse(TypedDict, total=False):
duration: str
feed_view: FeedViewResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_view | FeedViewResponse | Yes | The updated feed view |
UpdateFeedVisibilityResponse
class UpdateFeedVisibilityResponse(TypedDict, total=False):
duration: str
feed_visibility: FeedVisibilityResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| feed_visibility | FeedVisibilityResponse | Yes | Feed visibility configuration and permissions |
UpdateFollowResponse
class UpdateFollowResponse(TypedDict, total=False):
duration: str
follow: FollowResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| follow | FollowResponse | Yes | Details of the updated follow relationship |
UpdateMembershipLevelResponse
class UpdateMembershipLevelResponse(TypedDict, total=False):
duration: str
membership_level: MembershipLevelResponseProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | str | Yes | |
| membership_level | MembershipLevelResponse | Yes | The updated membership level |
UpsertActivitiesResponse
class UpsertActivitiesResponse(TypedDict, total=False):
activities: List[ActivityResponse]
duration: str
mention_notifications_created: intProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| activities | List[ActivityResponse] | Yes | List of created or updated activities |
| duration | str | Yes | |
| mention_notifications_created | int | No | Total number of mention notification activities created for mentioned users a... |
UpsertCollectionsResponse
class UpsertCollectionsResponse(TypedDict, total=False):
collections: List[CollectionResponse]
duration: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| collections | List[CollectionResponse] | Yes | List of upserted collections |
| duration | str | Yes |
User
class User(TypedDict, total=False):
data: Dict[str, Any]
id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | |
| data | Dict[str, Any] | No |
UserRequest
User request object
class UserRequest(TypedDict, total=False):
custom: Dict[str, Any]
id: str
image: str
invisible: bool
language: str
name: str
privacy_settings: PrivacySettingsResponse
role: str
teams: List[str]
teams_role: Dict[str, Any]Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | str | Yes | User ID |
| custom | Dict[str, Any] | No | Custom user data |
| image | str | No | User's profile image URL |
| invisible | bool | No | |
| language | str | No | |
| name | str | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | |
| role | str | No | User's global role |
| teams | List[str] | No | List of teams the user belongs to |
| teams_role | Dict[str, Any] | No | Map of team-specific roles for the user |
UserResponse
User response object
class UserResponse(TypedDict, total=False):
avg_response_time: int
ban_expires: float
banned: bool
blocked_user_ids: List[str]
bypass_moderation: bool
created_at: float
custom: Dict[str, Any]
deactivated_at: float
deleted_at: float
devices: List[DeviceResponse]
id: str
image: str
invisible: bool
language: str
last_active: float
name: str
online: bool
privacy_settings: PrivacySettingsResponse
push_notifications: PushNotificationSettingsResponse
revoke_tokens_issued_before: float
role: str
shadow_banned: bool
teams: List[str]
teams_role: Dict[str, Any]
updated_at: floatProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | bool | Yes | Whether a user is banned or not |
| blocked_user_ids | List[str] | Yes | |
| created_at | float | Yes | Date/time of creation |
| custom | Dict[str, Any] | Yes | Custom data for this object |
| id | str | Yes | Unique user identifier |
| invisible | bool | Yes | |
| language | str | Yes | Preferred language of a user |
| online | bool | Yes | Whether a user online or not |
| role | str | Yes | Determines the set of user permissions |
| shadow_banned | bool | Yes | Whether a user is shadow banned |
| teams | List[str] | Yes | List of teams user is a part of |
| updated_at | float | Yes | Date/time of the last update |
| avg_response_time | int | No | |
| ban_expires | float | No | Date when ban expires |
| bypass_moderation | bool | No | |
| deactivated_at | float | No | Date of deactivation |
| deleted_at | float | No | Date/time of deletion |
| devices | List[DeviceResponse] | No | List of devices user is using |
| image | str | No | |
| last_active | float | No | Date of last activity |
| name | str | No | Optional name of user |
| privacy_settings | PrivacySettingsResponse | No | User privacy settings |
| push_notifications | PushNotificationSettingsResponse | No | User push notification settings |
| revoke_tokens_issued_before | float | No | Revocation date for tokens |
| teams_role | Dict[str, Any] | No |
VoteData
class VoteData(TypedDict, total=False):
answer_text: str
option_id: strProperties:
| Property | Type | Required | Description |
|---|---|---|---|
| answer_text | str | No | |
| option_id | str | No |