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

# 更新 Actor

> 更新 Actor 的显示名称、描述或元数据

```
PATCH /openapi/memorylake/api/v3/actors/{id}
```

更新单个 Actor。仅更改请求体中包含的字段；未包含的字段保持不变。

<Note>
  **所需权限：** `actor:modify`
</Note>

### 路径参数

<ParamField path="id" type="string" required>
  Actor ID
</ParamField>

### 请求体

<ParamField body="display_name" type="string">
  更新后的显示名称。
</ParamField>

<ParamField body="description" type="string">
  更新后的描述。
</ParamField>

<ParamField body="metadata" type="object">
  更新后的元数据。将替换整个元数据对象——如果您想保留现有键，请在发送前先在本地合并。
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH 'https://app.memorylake.cn/openapi/memorylake/api/v3/actors/act-a1b2c3d4e5f6' \
    -H 'Authorization: Bearer sk_xxxxxx' \
    -H 'Content-Type: application/json' \
    -d '{
      "display_name": "Alice Chen (VIP)",
      "metadata": {
        "tier": "enterprise",
        "region": "us-west",
        "account_manager": "bob@example.com"
      }
    }'
  ```
</RequestExample>

### 响应

<ResponseField name="data" type="object">
  <Expandable title="Actor">
    <ResponseField name="id" type="string">Actor ID</ResponseField>
    <ResponseField name="custom_id" type="string">调用方定义的外部标识符</ResponseField>
    <ResponseField name="actor_type" type="string">Actor 类型：`HUMAN` 或 `ASSISTANT`</ResponseField>
    <ResponseField name="display_name" type="string">人类可读的显示名称</ResponseField>
    <ResponseField name="description" type="string">Actor 描述</ResponseField>
    <ResponseField name="metadata" type="object">调用方定义的元数据</ResponseField>
    <ResponseField name="created_at" type="string">创建时间戳</ResponseField>
    <ResponseField name="updated_at" type="string">最后更新时间戳</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "data": {
      "id": "act-a1b2c3d4e5f6",
      "custom_id": "user-ext-001",
      "actor_type": "HUMAN",
      "display_name": "Alice Chen (VIP)",
      "description": "Primary end user for the mobile app",
      "metadata": {
        "tier": "enterprise",
        "region": "us-west",
        "account_manager": "bob@example.com"
      },
      "created_at": "2025-03-10T08:00:00Z",
      "updated_at": "2025-06-15T11:20:00Z"
    }
  }
  ```
</ResponseExample>
