> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiJhMGYzZTBkMC1mZWJiLTRkNzEtYjI4ZC1mNWJmMTNlNjA3OTQiLCJleHAiOjE3NzgzMDkyOTgsImlhdCI6MTc3ODMwODk5OH0.wOU-wGwwDxzcIHRyoyZuZDnOSJHHIPplkj7AEdB9C6M
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

# 受众群体

<Warning title="团队版和企业版功能">
  此功能仅适用于[团队版和企业版套餐](https://buildwithfern.com/pricing)。要开始使用，请联系 [support@buildwithfern.com](mailto:support@buildwithfern.com)。
</Warning>

受众群体是为不同消费者细分 API 的有用工具。受众群体的常见示例包括 `public` 和 `beta`。您可以在 [OpenAPI 规范](/learn/api-definitions/openapi/extensions/audiences) 和 [Fern Definition](/learn/api-definitions/ferndef/audiences) 中配置受众群体。

将受众群体添加到 API 规范后，您可以通过在 `docs.yml` 导航中的 `api` 对象中添加 `audience` 属性来筛选到该受众群体。

<CodeBlocks>
  ```yaml title="docs.yml" {3-4}
  navigation:
    - api: API Reference
      audiences:
        - public
  ```
</CodeBlocks>

这是 [Schematic 在生产环境中的示例](https://github.com/SchematicHQ/schematic-fern-config/blob/e19f5ea69a343727ed018e79127bf4fd20ad0f7b/fern/docs.yml#L128-L129)。

## 实例受众群体

API 参考受众群体与[实例受众群体](/docs/configuration/products#add-instance-audiences)协同工作，后者控制哪些产品和版本出现在每个文档实例中。您可以同时使用这两个功能：

* **API 参考受众群体** - 控制哪些端点和架构出现在 API 参考中
* **实例受众群体** - 控制哪些产品和版本出现在每个实例中

例如，您可能有一个仅显示公开端点的 `public` API 参考。为了确保此 API 参考仅出现在您的公开文档站点上，请使用 `public` 受众群体标记包含的产品或版本。