Skip to content

Quick Publish

  • Endpoint Path: /api/v2/editor/{type}/quick-publish
  • Method: POST
  • Request: multipart/form-data

Headers Optional Parameter

Parameter NamePublic Mode (Required)Private Mode (Required)
X-Fresns-Aidrequiredrequired
X-Fresns-Aid-Tokenrequiredrequired
X-Fresns-Uidrequiredrequired
X-Fresns-Uid-Tokenrequiredrequired

Rest Params

Parameter NameTypeRequiredDescription
typeStringrequiredpost or comment

Body Params

Parameter NameTypeRequiredPost DescriptionComment Description
postQuotePidStringoptionalQuoted post PID
Not required
Post-specific
postGidStringoptionalGroup
post_editor_group_required
If required by configuration, this parameter must also be provided
Post-specific
postTitleStringoptionalTitle
post_editor_title_required
If required by configuration, this parameter must also be provided
Post-specific
postIsCommentDisabledBooleanNOWhether comments are disabledPost-specific
postIsCommentPrivateBooleanNOWhether the comment is private
Visible only to the comment author and post author
Post-specific
commentPidStringoptionalComment-specificComment on which post, required
commentCidStringoptionalComment-specificEmpty means comment on post
Value means reply to this comment
contentStringoptionalContent
Insert the file in the content in the format [file:{fid}]
isMarkdownBooleanoptionalIs content in MD format
isAnonymousBooleanoptionalIs it anonymous
mapStringoptionalLocation information: compress Object information into a string parameter
extendsStringoptionalExtended content: compress Array information into a string parameter
archivesStringoptionalExtended parameters: compress Array information into a string parameter
imageFileoptionalImage fileImage file

Request Description

  • Skip the draft logic and publish content directly. Published content does not save drafts (logs).
  • Support direct upload of a single image file through the interface.
  • map, extends, archives Reference update draft API

Return

json
{
    "code": 0,
    "message": "ok",
    "data": {
        "type": "String / post or comment",
        "draftId": "Number / Draft ID", // If not a draft, then null
        "fsid": "String / Official content's pid or cid" // If not official content, then null
    }
}

Released under the Apache-2.0 License