> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nulix.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Control Reader Access to Content with Nulix Audiences

> Use Nulix Audiences to gate articles and categories by reader group, enabling tiered docs, internal content, and beta feature guides.

Not every piece of documentation is meant for every reader. Nulix **Audiences** let you define named groups of readers and then attach those groups to specific articles or categories, so only the right people see the right content. Whether you want to hide beta features from general users, surface internal runbooks only to your team, or give enterprise customers access to advanced guides, Audiences give you that control — without maintaining separate knowledge bases.

## What Is an Audience?

An audience is a named label that represents a segment of your readers. You create audiences in your workspace settings and then assign them to content. A reader belongs to one or more audiences based on attributes you pass to Nulix (typically via your app or the Nulix API).

Nulix includes a built-in **"All Users"** audience that covers every authenticated visitor. You can create as many custom audiences as your plan allows.

### Example Audiences

| Audience name | Who it covers |
| - | - |
| **All Users** | Every reader who accesses the knowledge base (default) |
| **Pro Plan** | Customers on your Pro subscription tier |
| **Enterprise** | Customers on your Enterprise subscription tier |
| **Internal** | Your own team members, for internal runbooks and SOPs |
| **Beta Testers** | Users enrolled in an early-access program |

## Restricting Articles and Categories

You can assign an audience to any article or category directly from the editor sidebar:

**1. Open the content item**

Navigate to the article or category you want to restrict inside your knowledge base editor.

**2. Open Visibility settings**

In the right-hand panel, click **Visibility & Access** to expand the audience controls.

**3. Select an audience**

Choose one or more audiences from the dropdown. Only readers who belong to at least one of the selected audiences will see this content.

**4. Save and publish**

Save your changes. The restriction takes effect immediately for published content and at the time of publishing for drafts.

> [!NOTE]
>
> When you restrict a **category**, all articles nested inside it inherit the same audience restriction automatically. You can tighten restrictions on individual articles within the category, but you cannot make a child article visible to a broader audience than its parent category allows.

## Passing Audience Membership via the API

Nulix integrates with your product's identity layer so that audience membership is determined at runtime, not manually managed inside Nulix. When a reader authenticates in your app, you generate a signed **viewer token** that includes the audiences the reader belongs to. Pass this token to the Nulix embedded widget or public API, and Nulix automatically filters content to match their membership.

A minimal token payload looks like this:

```json theme={null}
{
  "sub": "user_abc123",
  "email": "reader@example.com",
  "nulix_audiences": ["pro-plan", "beta-testers"]
}
```

Sign the token with your workspace's secret key and pass it in the `Authorization` header or as a query parameter when loading the knowledge base. Nulix validates the signature and resolves the reader's visible content in real time.

> [!WARNING]
>
> Never expose your workspace secret key in client-side code. Always generate viewer tokens on your backend server and send only the signed token to the browser.

## Use Cases

> **[Tiered Documentation](https://docs.nulix.io/publishing/visibility-access.md)**
>
> Show basic guides to Free users and unlock advanced content for Pro and Enterprise customers automatically.

> **[Internal-Only Articles](https://docs.nulix.io/publishing/visibility-access.md)**
>
> Publish internal SOPs, runbooks, or admin guides in the same knowledge base without exposing them to external readers.

> **[Beta Feature Docs](https://docs.nulix.io/publishing/visibility-access.md)**
>
> Document features in active development and restrict visibility to enrolled beta testers until general availability.

> **[API Integration](https://docs.nulix.io/integrations/api-access.md)**
>
> Connect your app's identity provider to Nulix so audience membership is resolved automatically from your user attributes.

## Public vs. Gated Content

> [!NOTE]
>
> Content that has **no audience restriction** (or is assigned to "All Users") is visible to every reader, including unauthenticated visitors if your knowledge base is set to **Public**. As soon as you assign a non-default audience to a piece of content, Nulix requires the reader to be authenticated and carry the matching audience claim in their token before rendering that content.

## Next Steps

> **[Visibility & Access](https://docs.nulix.io/publishing/visibility-access.md)**
>
> Explore the full range of visibility controls available for articles, categories, and entire knowledge bases.

> **[API Access](https://docs.nulix.io/integrations/api-access.md)**
>
> Learn how to authenticate readers and pass audience membership programmatically using the Nulix API.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.