项目API接口
1. 文章发布 /news_create

文章发布 POST:/news_create

完整地址,POST: https://openapi.diycms.com/webhook/news_create

POST JSON 参数说明

{
    "env": "debug", // String 环境变量 debug(测试) 或 prod(正式)
    "data": {
        "title": "发布信息的标题",// String
        "cover": [ // [String] 
            // "https://s.coze.cn/t/-VRx1HuazdQ/",   // 使用远程连接
            // "6881a77774ca11a0707bb623"           // 使用项目附件ID
        ],
        "category_id": [ "65e69394bb3150a771ae1e22" ], // [String] 分类ID,支持多个分类
        "author": "DiyCMS", // String 作者
        "source": "AI生成", // String 来源标注
        "publish_time": 1698893737, // i64 发布时间
        "platforms": [// [String] 发布到那些平台
            "all"
            // "weapp",
            // "h5"
        ],
        "intro": "使用AI工具与项目通讯,实现自动发布内容",// String 简介信息
        // 你可以使用其中一种格式:markdown 或 html 
        "content": {// html 内容
            "type":"html",// String
            "content":"<h3>标题</h3><p>这是一段&nbsp;<em>斜体</em>&nbsp;文字。</p>" // String
        }
        // "content": { // markdown 内容
        //     "type":"md",
        //     "content":"# 标题\n\n这是一段 *斜体* 文字。"
        // }
        
    },
    "logs": {
        "type": "json",// String 日志格式,注意转义以便后期处理
        "log": "{\"code\": \"ok\",\"message\": \"日志测试成功\"}" // String  日志内容
    }
}
 

响应信息

{
	"code": "ok",
	"message": "success",
	"payload": {
		"data_id": "68c12f9d6b80a679648006bb",
		"log_id": "68c12f9d6b80a679648006bd"
	}
}