---
title: 用户配置文件的工作原理
url: https://platform.claude.com/docs/zh-CN/manage-claude/user-profiles/how-user-profiles-work
description: 用户配置文件告诉 Anthropic 向 Claude 发出的请求是为您的哪位客户发出的。了解其重要性以及您何时需要用户配置文件。
---

“User profile”（用户配置文件）告诉 Anthropic 向 Claude 发出的请求是为您的哪位客户发出的，无论该客户是个人还是公司。当您的客户（"终端客户"）通过您的产品或平台使用 Claude 时，这一点很重要，因为他们的请求会归入您的组织。为每位终端客户创建一个用户配置文件后，安全限制或封禁就可以仅作用于该终端客户，而不是您的整个组织。

## 工作原理

假设您的平台通过您的组织为两家公司提供服务。您为每家公司创建一个用户配置文件，并在该公司的请求中发送该用户配置文件的 ID。如果某家公司的请求导致了安全执行措施，例如[限制或封禁](https://platform.claude.com/docs/zh-CN/manage-claude/user-profiles/manage-profiles#check-whether-anthropic-has-restricted-or-banned-a-profile)，该措施可以仅作用于该公司的用户配置文件。在这种情况下，另一家公司的请求不会受到影响。

如果没有用户配置文件，所有这些请求都会归入您的组织，最多只能通过自由文本形式的 [`metadata.user_id`](https://platform.claude.com/docs/zh-CN/api/messages/create) 来区分它们。Anthropic 会对 API 流量运行自动化安全分类器，因此单个终端客户就可能触发作用于您整个组织的执行措施。

您为每位终端客户创建一次用户配置文件，Anthropic 会为该用户配置文件分配一个不透明的 ID，该 ID 不包含您提供的任何详细信息。您在为该终端客户发出的每个请求中发送该 ID。您添加的任何详细信息（例如名称或元数据）都是可选的。要开始使用，请参阅[创建用户配置文件并归属请求](https://platform.claude.com/docs/zh-CN/manage-claude/user-profiles/attribute-requests)。

就其本身而言，用户配置文件不会改变计费或定价。如果您使用 [Linked billing](https://platform.claude.com/docs/zh-CN/manage-claude/oauth-apps/linked-billing)，用户配置文件也是您标识要计费的客户的方式。

### 用户配置文件包含的内容以及 Anthropic 如何使用它

用户配置文件仅包含您发送的有关终端客户的信息，以及 Anthropic 设置的任何[计划状态](https://platform.claude.com/docs/zh-CN/manage-claude/user-profiles-verification-portal#after-the-end-customer-links-the-profile)或执行状态。它不包含对话内容。Anthropic 使用您发送的详细信息来归属请求、监控滥用行为、执行[使用政策](https://www.anthropic.com/legal/aup)，以及支持申请和访问受信任访问计划。Anthropic 不会验证这些详细信息。

Anthropic 根据[隐私政策](https://www.anthropic.com/legal/privacy)处理用户配置文件。[功能资格表](https://platform.claude.com/docs/zh-CN/manage-claude/api-and-data-retention#feature-eligibility)说明了 Anthropic 保留用户配置文件数据的时长。

发送多少信息由您决定。例如，此 [`POST /v1/user_profiles`](https://platform.claude.com/docs/zh-CN/api/user_profiles/create) 请求仅发送终端客户的名称：

```json
{
  "name": "Ana García"
}
```

每个字段都是可选的，因此您也可以改为发送一个空 JSON 对象 `{}`。如果没有 `access_type`，该请求会为使用您产品的终端客户创建一个 [`application` 用户配置文件](https://platform.claude.com/docs/zh-CN/manage-claude/user-profiles/attribute-requests#decide-who-gets-a-profile)。更完整的请求会添加其他详细信息：

```json
{
  "name": "Ana García",
  "external_user_details": {
    "entity_type": "individual",
    "country": "ES",
    "reference_id": "user-4821",
    "onboarded_at": "2026-03-15T10:00:00Z",
    "account_status": "active",
    "email_hash": "8fac453d04351152e705c17d1ce2a0f079400e2a0edf662e97d803427fd608c9"
  },
  "metadata": {
    "plan": "pro"
  }
}
```

每个请求都会返回带有 `uprof_` ID 的用户配置文件，如[示例响应](https://platform.claude.com/docs/zh-CN/manage-claude/user-profiles/attribute-requests#send-the-create-request)所示。有关这些字段的规则，请参阅[向 Anthropic 提供哪些终端客户信息](https://platform.claude.com/docs/zh-CN/manage-claude/user-profiles/attribute-requests#what-to-tell-anthropic-about-an-end-customer)。

## 何时使用

如果您运营平台或网关，或转售 API 访问权限，请使用用户配置文件。您为终端客户发送的请求都会归入您的组织。您自己的使用量不需要用户配置文件。
