创建内部文档
POST /apiv2/internal_knowledge_posts.json
调用权限
agent
请求参数
Name | Type | Required | Description |
---|---|---|---|
title | string | yes | 标题 |
content | string | yes | 文档内容 |
category_id | integer | yes | 所属的内部文档分区 |
uploadFiles | object | no | 上传的附件 |
上传文档附件
在创建或者更新文档时,可以给文档上传附件。首先需要调用 Attachments API 里的上传附件接口, 成功后会返回附件token,然后将token添加到uploadFiles数组里,这样创建文档在保存时就能把附件给关联上。
{ "content": "with attachments", "uploadFiles": ["00154af5872418a7792dda", ...] }
curl 示例
curl https://{subdomain}.kf5.com/apiv2/internal_knowledge_posts.json \ -H "Content-Type: application/json" -d '{"post": {"title": "this is post title","content": "this is content","category_id":123, "uploadFiles":["00154f57388ef86589b76a23d30cd7f"]}}' \ -v -u {email_address}:{password} -X POST
返回示例
Status: 200 OK{ "error": 0, "message": ""}