> ## 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.

# 更新项目

> 更新现有项目的名称和/或描述

```
PUT /openapi/memorylake/api/v1/projects/{id}
```

更新现有项目的名称和/或描述。

<Note>
  **所需权限：** [`project:modify`](/features/team-collaboration/permission-reference#编辑项目设置) · `instance`
</Note>

### 路径参数

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

### 请求体

<ParamField body="name" type="string">
  更新后的项目名称（1-255 个字符）
</ParamField>

<ParamField body="description" type="string">
  更新后的项目描述（最多 2000 个字符）
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT 'https://app.memorylake.cn/openapi/memorylake/api/v1/projects/proj-a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6' \
    -H 'Authorization: Bearer sk_xxxxxx' \
    -H 'Content-Type: application/json' \
    -d '{
      "name": "My Updated Project",
      "description": "Updated project description"
    }'
  ```
</RequestExample>

### 响应

<ResponseField name="data" type="object">
  <Expandable title="项目对象">
    <ResponseField name="id" type="string">项目唯一标识</ResponseField>
    <ResponseField name="name" type="string">更新后的项目名称</ResponseField>
    <ResponseField name="description" type="string">更新后的项目描述</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,
    "message": "Project updated successfully",
    "data": {
      "id": "proj-a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
      "name": "My Updated Project",
      "description": "Updated project description",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-20T14:45:00Z"
    }
  }
  ```
</ResponseExample>
