# Feed and Activity Visibility

### Feed Visibility Levels

Feed groups have a default visibility. You can also override the group's default when creating a feed. A feed's visibility level can't be changed after creation.

<codetabs>

<codetabs-item value="swift" label="Swift">

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

</codetabs-item>

<codetabs-item value="javascript" label="JavaScript">

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

</codetabs-item>

<codetabs-item value="nodejs" label="Node">

```js
// 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...
});
```

</codetabs-item>

<codetabs-item value="go-golang" label="Go">

```go
package main

import (
    "context"
    "log"

    "github.com/GetStream/getstream-go/v3"
)

func main() {
    client, err := getstream.NewClient("<your_api_key>", "<your_api_secret>")
    if err != nil {
        log.Fatal(err)
    }

    ctx := context.Background()

    feedsClient := client.Feeds()

    // Create feed with specific visibility
    feed := feedsClient.Feed("user", "jack")
    response, err := feed.GetOrCreate(ctx, &getstream.GetOrCreateFeedRequest{
        Data: map[string]interface{}{
            "visibility": "public", // visible, public, followers, members, private
        },
        UserID: getstream.PtrTo("<user id>"),
    })
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("Feed created with visibility: %+v", response.Data.Feed)

    // Create feed group with default visibility
    feedGroupResponse, err := feedsClient.CreateFeedGroup(ctx, &getstream.CreateFeedGroupRequest{
        FeedGroupId: getstream.PtrTo("myid"),
        Custom: map[string]interface{}{
            "default_visibility": "public",
            "description":        "Public feed group",
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("Feed group created: %+v", feedGroupResponse.Data)
}
```

</codetabs-item>

</codetabs>

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

<codetabs>

<codetabs-item value="swift" label="Swift">

```swift
let privateActivity = try await feed.addActivity(
    request: .init(
        text: "Premium content",
        type: "post",
        visibility: .tag,
        visibilityTag: "premium"
    )
)
// Only users with the permission to read premium activities can read this
```

</codetabs-item>

<codetabs-item value="javascript" label="JavaScript">

```js
feed.addActivity({
  type: "post",
  text: "Premium content",
  visibility: "tag",
  visibility_tag: "premium",
});
// Only users with the permission to read premium activities can read this
```

</codetabs-item>

<codetabs-item value="nodejs" label="Node">

```js
client.feeds.addActivity({
  fids: ["user:1"],
  type: "post",
  text: "Premium content",
  visibility: "tag",
  visibility_tag: "premium",
  user_id: "<user id>",
});
// Only users with the permission to read premium activities can read this
```

</codetabs-item>

<codetabs-item value="go-golang" label="Go">

```go
package main

import (
    "context"
    "log"

    "github.com/GetStream/getstream-go/v3"
)

func main() {
    client, err := getstream.NewClient("<your_api_key>", "<your_api_secret>")
    if err != nil {
        log.Fatal(err)
    }

    ctx := context.Background()

    feedsClient := client.Feeds()

    // Create public activity (default)
    publicActivity, err := feedsClient.AddActivity(ctx, &getstream.AddActivityRequest{
        Fids:       []string{"user:1"},
        Type:       getstream.PtrTo("post"),
        Text:       getstream.PtrTo("This is a public post"),
        Visibility: getstream.PtrTo("public"),
        UserID:     getstream.PtrTo("<user id>"),
    })
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("Public activity created: %+v", publicActivity.Data)

    // Create private activity
    privateActivity, err := feedsClient.AddActivity(ctx, &getstream.AddActivityRequest{
        Fids:       []string{"user:1"},
        Type:       getstream.PtrTo("post"),
        Text:       getstream.PtrTo("This is a private post"),
        Visibility: getstream.PtrTo("private"),
        UserID:     getstream.PtrTo("<user id>"),
    })
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("Private activity created: %+v", privateActivity.Data)

    // Create tag-based visibility activity (premium content)
    premiumActivity, err := feedsClient.AddActivity(ctx, &getstream.AddActivityRequest{
        Fids:          []string{"user:1"},
        Type:          getstream.PtrTo("post"),
        Text:          getstream.PtrTo("Premium content"),
        Visibility:    getstream.PtrTo("tag"),
        VisibilityTag: getstream.PtrTo("premium"),
        UserID:        getstream.PtrTo("<user id>"),
        Custom: map[string]interface{}{
            "tier": "premium",
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("Premium activity created: %+v", premiumActivity.Data)
    log.Println("Only users with 'premium' tag permission can read this")

    // Create subscriber-only content
    subscriberActivity, err := feedsClient.AddActivity(ctx, &getstream.AddActivityRequest{
        Fids:          []string{"user:1"},
        Type:          getstream.PtrTo("post"),
        Text:          getstream.PtrTo("Subscriber-only content"),
        Visibility:    getstream.PtrTo("tag"),
        VisibilityTag: getstream.PtrTo("subscriber"),
        UserID:        getstream.PtrTo("<user id>"),
        Custom: map[string]interface{}{
            "subscription_level": "paid",
        },
    })
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("Subscriber activity created: %+v", subscriberActivity.Data)
}
```

</codetabs-item>

</codetabs>

---

This page was last updated at 2025-08-15T14:14:10.188Z.

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