// More options
let query = FeedQuery(
    group: "user",
    id: "jack",
    data: .init(
        visibility: "public"
    )
)
let feed = client.feed(for: query)
try await feed.getOrCreate()Activity Feeds v3 is in beta — try it out!
Feed and Activity Visibility
Feed Visibility Levels
Feed groups have a default visibility (if it’s not set when creating the group, visible will be set). You can also override the group’s default when creating a feed. A feed’s visibility level can’t be changed after creation.
// More options
val query = FeedQuery(
    group = "user",
    id = "jack",
    data = FeedInputData(
        visibility = FeedVisibility.Public
    )
)
val feed = client.feed(query = query)
feed.getOrCreate()const feed = client.feed("user", "jack");
await feed.getOrCreate({
  data: {
    visibility: "public",
  },
});// More options
const query = FeedQuery(
  fid: FeedId(group: 'user', id: 'jack'),
  data: FeedInputData(
    visibility: FeedVisibility.public,
  ),
);
final feed = client.feedFromQuery(query);
await feed.getOrCreate();// More options
const feed = client.feeds.feed("user", "jack");
await feed.getOrCreate({
  data: {
    visibility: "public",
  },
  // The owner of the feed
  user_id: "<user id>",
});
const response = await client.feeds.createFeedGroup({
  feed_group_id: "myid",
  default_visibility: "public",
  // Other settings...
});feed := client.Feeds().Feed("user", "alice")
feed.GetOrCreate(context.Background(), &getstream.GetOrCreateFeedRequest{
  Data: &getstream.FeedInput{
    // Override group's default visibility
    Visibility: getstream.PtrTo("public"),
  },
  UserID: getstream.PtrTo("alice"),
})
feedGroupID := "test-feed-group"
createResponse, err := client.Feeds().CreateFeedGroup(context.Background(), &getstream.CreateFeedGroupRequest{
  ID:                feedGroupID,
  DefaultVisibility: getstream.PtrTo("public"),
  // Other settings
})
if err != nil {
  log.Fatal("Error creating feed group:", err)
}
log.Printf("Feed group created: %+v", createResponse.Data)// Create a feed with custom visibility
$feed = $feedsClient->feed('user', 'jack');
$response = $feed->getOrCreateFeed(
    new \GetStream\GeneratedModels\GetOrCreateFeedRequest(
        userID: 'jack',
        data: new \GetStream\GeneratedModels\FeedInput(
            visibility: 'public'
        )
    )
);
// Create a feed group with default visibility
$createResponse = $feedsClient->createFeedGroup(
    new \GetStream\GeneratedModels\CreateFeedGroupRequest(
        id: 'myid',
        defaultVisibility: 'public',
        activityProcessors: [
            ['type' => 'default']
        ]
    )
);var createResponse = await _feedsV3Client.CreateFeedGroupAsync(new CreateFeedGroupRequest
{
    ID = feedGroupId,
    DefaultVisibility = "public",
    ActivityProcessors = new List<ActivityProcessorConfig>
    {
        new() { Type = "default" }
    }
});create_response = self.client.feeds.create_feed_group(
    id= feed_group_id,
    default_visibility= "public",
)Supported visibility levels:
| Level | Viewing feed (activities + metadata) | Following | Posting | 
|---|---|---|---|
visible | Anyone can view | Anyone can follow | Only the owner or member/follower with the post permission can post | 
public | Anyone can view | Anyone can follow | Anyone can post | 
followers | Only approved followers can view | Anyone can send a follow request,  follow requests have to be approved  | Only the owner or member/follower with the post permission can post | 
members | Only members can view | Only members can follow | Only the owner or member/follower with the post permission can post | 
private | Only the owner can view | Only the owner can follow | Only the owner can post | 
Activity Visibility Levels
public: marks the activity as public - everyone who can view feed content, can see itprivate: marks the activity as private - only feed owner can see ittag:mytag: marks the activity as only visible to followers/members with the permission to see this tag
This visibility system is very flexible and allows you to build:
- Apps like Patreon where only certain levels of users can see your content
 - Apps like Strava where it’s possible to share your activity with nobody, everyone or your followers
 
let privateActivity = try await feed.addActivity(
    request: .init(
        text: "Premium content",
        type: "post",
        visibility: .tag,
        visibilityTag: "premium"
    )
)
// Premium users can see full activity, others a previewval privateActivity: Result<ActivityData> = feed.addActivity(
    request = FeedAddActivityRequest(
        text = "Premium content",
        type = "post",
        visibility = AddActivityRequest.Visibility.Tag,
        visibilityTag = "premium"
    )
)
// Premium users can see full activity, others a previewfeed.addActivity({
  type: "post",
  text: "Premium content",
  visibility: "tag",
  visibility_tag: "premium",
});
// Premium users can see full activity, others a preview// Premium users can see full activity, others a preview
final privateActivity = await feed.addActivity(
  request: const FeedAddActivityRequest(
    text: 'Premium content',
    type: 'post',
    visibility: AddActivityRequestVisibility.tag,
    visibilityTag: 'premium',
  ),
);client.feeds.addActivity({
  feeds: ["user:1"],
  type: "post",
  text: "Premium content",
  visibility: "tag",
  visibility_tag: "premium",
  user_id: "<user id>",
});
// Premium users can see full activity, others a previewresponse, err := client.Feeds().AddActivity(context.Background(), &getstream.AddActivityRequest{
    Feeds:         []string{"user:alice"},
    Type:          "post",
    Text:          getstream.PtrTo("Premium content"),
    Visibility:    getstream.PtrTo("tag"),
    VisibilityTag: getstream.PtrTo("premium"),
    UserID:        getstream.PtrTo("alice"),
})
if err != nil {
    log.Fatal("Error adding activity:", err)
}
log.Printf("Activity added successfully: %+v", response)
// Premium users can see full activity, others a preview$feedsClient->addActivity(
    new \GetStream\GeneratedModels\AddActivityRequest(
        feeds: ['user:1'],
        type: 'post',
        text: 'Premium content',
        visibility: 'tag',
        visibilityTag: 'premium',
        userID: '<user id>'
    )
);
// Premium users can see full activity, others a previewclient.feeds.add_activity(
    feeds=["user:1"],
    type="post",
    text="Premium content",
    visibility="tag",
    visibility_tag="premium",
    user_id="<user id>"
)
# Premium users can see full activity, others a previewawait client.AddActivityAsync(new AddActivityRequest
{
    Feeds = new List<string> { "user:1" },
    Type = "post",
    Text = "Premium content",
    Visibility = "tag",
    VisibilityTag = "premium",
    UserID = "<user id>"
});
// Premium users can see full activity, others a previewFor all the details on tag visibility read the Membership levels guide.