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