**版本：202601**

# 更新文章

**PUT** `/openapi/2026-01/articles/:id`

通过文章 ID 更新现有文章的详细信息。

## 请求

**Path参数**

- `id` string (required)

  文章 ID

**application/json**

**请求体 | 示例**

**请求体 (required)**

- `article` object (required)

  文章

  - `title` string

    文章标题，标题为可选项，最多 100 个字符

    **可选值：** `<= 100 个字符`
  - `excerpt` string

    文章摘要/预览文本，摘要为可选项，最多 255 个字符

    **可选值：** `<= 255 个字符`
  - `content` string

    文章完整内容
  - `published` boolean

    文章是否已发布
  - `published_at` string

    发布时间
  - `handle` string

    文章的 URL
  - `author` string

    作者名称
  - `seo_title` string

    自定义 SEO 标题
  - `seo_description` string

    SEO meta 描述
  - `seo_keywords` string[]

    SEO 关键词
  - `blog_ids` string[]

    关联博客/集合的 ID 列表
  - `image` object

    精选图片对象

    - `src` string

      图片 URL
    - `width` int32

      宽度
    - `height` int32

      高度

```json
{
  "article": {
    "title": "string",
    "excerpt": "string",
    "content": "string",
    "published": true,
    "published_at": "string",
    "handle": "string",
    "author": "string",
    "seo_title": "string",
    "seo_description": "string",
    "seo_keywords": [
      "string"
    ],
    "blog_ids": [
      "string"
    ],
    "image": {
      "src": "string",
      "width": 0,
      "height": 0
    }
  }
}
```

## 响应

**200**

OK

**application/json**

**数据结构 | 示例**

**数据结构**

- `code` string

  错误码
- `message` string

  错误信息
- `data` object

  - `article` object

    文章

    - `id` string

      文章 ID
    - `title` string

      文章标题
    - `excerpt` string

      文章内容的简短摘要或预览
    - `content` string

      文章完整内容
    - `image` object

      与文章关联的图片，包含 src、width、height 和 alt 属性

      - `src` string

        图片 URL
      - `width` int32

        宽度
      - `height` int32

        高度
      - `path` string

        路径
    - `published` boolean

      文章是否已发布
    - `handle` string

      文章的 URL 友好标识符
    - `seo_title` string

      自定义 SEO 标题
    - `seo_description` string

      SEO meta 描述
    - `seo_keywords` string[]

      SEO 关键词
    - `author` string

      文章作者
    - `published_at` string

      文章发布时间，ISO 8601 格式
    - `blog_ids` string[]

      该文章所属博客的 ID
    - `created_at` string

      文章创建时间，ISO 8601 格式
    - `updated_at` string

      文章最后更新时间，ISO 8601 格式

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "article": {
      "id": "string",
      "title": "string",
      "excerpt": "string",
      "content": "string",
      "image": {
        "src": "string",
        "width": 0,
        "height": 0,
        "path": "string"
      },
      "published": true,
      "handle": "string",
      "seo_title": "string",
      "seo_description": "string",
      "seo_keywords": [
        "string"
      ],
      "author": "string",
      "published_at": "string",
      "blog_ids": [
        "string"
      ],
      "created_at": "string",
      "updated_at": "string"
    }
  }
}
```
