版本:202506
创建文章
POST/openapi/2025-06/articles
使用提供的详情创建新文章。
请求
- application/json
- 请求体
- 示例
请求体必填
article object必填
文章
titlestring必填
文章标题,标题为必填项,长度须在 1 到 100 个字符之间
可选值: <= 100 个字符
excerptstring
文章摘要/预览文本,摘要为可选项,最多 255 个字符
可选值: <= 255 个字符
contentstring
文章完整内容
publishedboolean
文章是否已发布
published_atstring
发布时间
handlestring
文章的 URL 友好标识符
authorstring
作者名称
seo_titlestring
自定义 SEO 标题
seo_descriptionstring
SEO meta 描述
seo_keywordsstring[]
SEO 关键词
blog_idsstring[]
关联博客/集合的 ID 列表
image object
精选图片对象,含 URL
srcstring
图片 URL
widthint32
宽度
heightint32
高度
{
"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
- 数据结构
- 示例
数据结构
codestring
错误码
messagestring
错误信息
data object
article object
文章
idstring
文章 ID
titlestring
文章标题
excerptstring
文章内容的简短摘要或预览
contentstring
文章完整内容
image object
与文章关联的图片,包含 src、width、height 和 alt 属性
srcstring
图片 URL
widthint32
宽度
heightint32
高度
pathstring
路径
publishedboolean
文章是否已发布
handlestring
文章的 URL 友好标识符
seo_titlestring
自定义 SEO 标题
seo_descriptionstring
SEO meta 描述
seo_keywordsstring[]
SEO 关键词
authorstring
文章作者
published_atstring
文章发布时间,ISO 8601 格式
blog_idsstring[]
该文章所属博客的 ID
created_atstring
文章创建时间,ISO 8601 格式
updated_atstring
文章最后更新时间,ISO 8601 格式
{
"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"
}
}
}