---
title: "创建内容"
method: POST
path: "/content/do-create"
tags: ["前台-内容"]
---

# 创建内容

`POST /content/do-create`

客户端AJAX提交，客户端

## Request body

- DefineContentApiDoCreateReq
  - `brief` string — 摘要
  - `categoryId` integer — 栏目ID
  - `content` string — 内容
  - `referer` string — 内容来源，例如github/gitee
  - `tags` string[] — 标签名称列表，以JSON存储
  - `thumb` string — 缩略图
  - `title` string — 标题
  - `type` string — 内容模型

## Response `200`

请求结果

- DefineContentServiceCreateRes
  - `content_id` integer

## Changes

- **2020-11-23** `5360f0b5286c` — 2 info
  - api tag `前台-内容` added
  - api tag `内容` removed
- **2020-11-10** `2f2843724d00` — 1 info
  - endpoint added
- **2020-10-30** `71161e2ef517` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/gogf/apis/goframe-api/changes/content/do-create/post.md)

---

[API](https://skmtc.dev/gogf/apis/goframe-api.md) · [All operations](https://skmtc.dev/gogf/apis/goframe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gogf/goframe-api/revisions/5360f0b5286c/schema)
