# 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. For changing a feed's visibility after creation, see [Changing Feed Visibility](/activity-feeds/docs/javascript/changing-feed-visibility/).

Visibility changes are asynchronous. The change request returns optimistically while follow relationships are reconciled in the background, and counts may be temporarily stale until reconciliation completes.

<Tabs>

```swift label="Swift"
// More options
let query = FeedQuery(
    group: "user",
    id: "jack",
    data: .init(
        visibility: "public"
    )
)
let feed = client.feed(for: query)
try await feed.getOrCreate()
```

```kotlin label="Kotlin"
// More options
val query = FeedQuery(
    group = "user",
    id = "jack",
    data = FeedInputData(
        visibility = FeedVisibility.Public
    )
)
val feed = client.feed(query = query)
feed.getOrCreate()
```

```js label="JavaScript"
const feed = client.feed("user", "jack");
await feed.getOrCreate({
  data: {
    visibility: "public",
  },
});
```

```js label="React"
const feed = client.feed("user", "jack");
await feed.getOrCreate({
  data: {
    visibility: "public",
  },
});
```

```js label="React Native"
const feed = client.feed("user", "jack");
await feed.getOrCreate({
  data: {
    visibility: "public",
  },
});
```

```dart label="Dart"
// More options
const query = FeedQuery(
  fid: FeedId(group: 'user', id: 'jack'),
  data: FeedInputData(
    visibility: FeedVisibility.public,
  ),
);
final feed = client.feedFromQuery(query);
await feed.getOrCreate();
```

```js label="Node"
// 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...
});
```

```go label="Go"
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)

// Change visibility after feed creation
changeResponse, err := feed.ChangeFeedVisibility(context.Background(), &getstream.ChangeFeedVisibilityRequest{
  Visibility: "followers",
})
if err != nil {
  log.Fatal("Error changing feed visibility:", err)
}
log.Printf("Visibility updated: %+v", changeResponse.Data)
```

```php label="php"
// 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']
        ]
    )
);

// Change visibility after feed creation
$changeResponse = $feed->changeFeedVisibility(
    new \GetStream\GeneratedModels\ChangeFeedVisibilityRequest(
        visibility: 'followers'
    )
);
```

```csharp label="C#"
var createResponse = await _feedsV3Client.CreateFeedGroupAsync(new CreateFeedGroupRequest
{
    ID = feedGroupId,
    DefaultVisibility = "public",
    ActivityProcessors = new List<ActivityProcessorConfig>
    {
        new() { Type = "default" }
    }
});

// Change visibility after feed creation
var feed = _feedsV3Client.Feed("user", "jack");
var changeResponse = await feed.ChangeFeedVisibilityAsync(new ChangeFeedVisibilityRequest
{
    Visibility = "followers"
});
```

```python label="Python"
create_response = self.client.feeds.create_feed_group(
    id= feed_group_id,
    default_visibility= "public",
)
```

```ruby label="Ruby"
require 'getstream_ruby'

client = GetStreamRuby.manual(
  api_key: 'api_key',
  api_secret: 'api_secret'
)

# Create a feed with custom visibility
feed_response = client.feeds.get_or_create_feed(
  'user',
  'jack',
  GetStream::Generated::Models::GetOrCreateFeedRequest.new(
    user_id: 'jack',
    data: GetStream::Generated::Models::FeedInput.new(
      visibility: 'public'
    )
  )
)

# Create a feed group with default visibility
create_request = GetStream::Generated::Models::CreateFeedGroupRequest.new(
  id: 'myid',
  default_visibility: 'public',
  activity_processors: [
    GetStream::Generated::Models::ActivityProcessorConfig.new(type: 'default')
  ]
)
create_response = client.feeds.create_feed_group(create_request)

# Change visibility after feed creation
change_response = feed.change_feed_visibility(
  GetStream::Generated::Models::ChangeFeedVisibilityRequest.new(
    visibility: 'followers'
  )
)
```

```java label="Java"
import io.getstream.services.FeedsImpl;
import io.getstream.services.Feed;
import io.getstream.models.*;

FeedsImpl feedsClient = new FeedsImpl(new StreamHTTPClient("<API key>", "<API secret>"));

// Create a feed with custom visibility
Feed feed = new Feed("user", "jack", feedsClient);
GetOrCreateFeedRequest feedRequest = GetOrCreateFeedRequest.builder()
    .userID("jack")
    .data(FeedInput.builder()
        .visibility("public")
        .build())
    .build();
feed.getOrCreate(feedRequest);

// Create a feed group with default visibility
CreateFeedGroupRequest groupRequest = CreateFeedGroupRequest.builder()
    .id("myid")
    .defaultVisibility("public")
    .activityProcessors(List.of(
        ActivityProcessorConfig.builder().type("default").build()
    ))
    .build();
CreateFeedGroupResponse groupResponse = feedsClient.createFeedGroup(groupRequest).execute().getData();

// Change visibility after feed creation
ChangeFeedVisibilityRequest visibilityRequest = ChangeFeedVisibilityRequest.builder()
    .visibility("followers")
    .build();
ChangeFeedVisibilityResponse visibilityResponse = feed.changeFeedVisibility(visibilityRequest).getData();
```

</Tabs>

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, <br /> 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 it
- `private`: marks the activity as private - only feed owner can see it
- `tag: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

<Tabs>

```swift label="Swift"
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 preview
```

```kotlin label="Kotlin"
val 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 preview
```

```js label="JavaScript"
feed.addActivity({
  type: "post",
  text: "Premium content",
  visibility: "tag",
  visibility_tag: "premium",
});
// Premium users can see full activity, others a preview
```

```js label="React"
feed.addActivity({
  type: "post",
  text: "Premium content",
  visibility: "tag",
  visibility_tag: "premium",
});
// Premium users can see full activity, others a preview
```

```js label="React Native"
feed.addActivity({
  type: "post",
  text: "Premium content",
  visibility: "tag",
  visibility_tag: "premium",
});
// Premium users can see full activity, others a preview
```

```dart label="Dart"
// 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',
  ),
);
```

```js label="Node"
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 preview
```

```go label="Go"
response, 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
```

```php label="php"
$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 preview
```

```python label="Python"
client.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 preview
```

```csharp label="C#"
await 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 preview
```

</Tabs>


For all the details on tag visibility read the [Membership levels guide](/activity-feeds/docs/javascript/membership-levels/).



---

This page was last updated at 2026-05-08T12:56:54.200Z.

For the most recent version of this documentation, visit [https://getstream.io/activity-feeds/docs/javascript/feed-and-activity-visibility/](https://getstream.io/activity-feeds/docs/javascript/feed-and-activity-visibility/).