- 账户相关
- 稿件相关
- 管理相关
- 杂项
- OAuth 2.0
投递新稿件
POST
/v1/post/post-new
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
uuid
string
稿件唯一id
text
string
文字内容
images
array[string]
图片
anon
boolean
是否匿名
示例
{
"uuid": "xxxxxxx", // 稿件唯一id
"text": "xxxx", // 文字内容
"images": [ // 图片
"imagekey0",
"imagekey1"
],
"anon": false // 是否匿名
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/post/post-new' \
--header 'Content-Type: application/json' \
--data-raw '{
"uuid": "xxxxxxx", // 稿件唯一id
"text": "xxxx", // 文字内容
"images": [ // 图片
"imagekey0",
"imagekey1"
],
"anon": false // 是否匿名
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
id
integer
稿件id
示例
{
"code": 0,
"msg": "ok",
"data": {
"id": 10
}
}