Skip to content

Quick Publish

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

Headers Optional Parameter

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

Path Variables

KeyTypeRequiredDescription
typeStringrequiredpost or comment

Form-data Params

KeyTypeRequiredDescription
commentPidStringoptionalComment-Only Comment on this post
commentCidStringoptionalComment-Only Reply to this comment
quotePidStringoptionalPost-Only Quoted Post ID
gidStringoptionalPost-Only Group
titleStringoptionalPost-Only Title
contentStringoptionalContent
Insert the file in the content in the format [file:{fid}]
isMarkdownBooleanoptionalContent in MD format
isAnonymousBooleanoptionalAnonymous
commentPolicyNumberoptionalPost-Only Who can comment?
1 Everyone 2 People you follow 3 People you follow or verified 4 No one is allowed 5 Only users you mention
commentPrivateBooleanoptionalPost Are all comments private
Comment Is this comment private
Private is only visible to the author of the comment and the author of the post.
gtidStringoptionalGeotag ID
locationInfoStringoptionalLocation Info Object to String
archivesStringoptionalArchive Parameter Array to String
extendsStringoptionalExtend Content Array to String
imageFileoptionalImage file

Request Description

  • Skip the draft logic and publish content directly. Published content does not save drafts (histories).
  • Support direct upload of a single image file through the interface.
  • When published, the location information locationInfo is not used, even if it has a gtid value.
  • locationInfo, archives, extends Reference update draft API

Return

json
{
    "code": 0,
    "message": "ok",
    "data": {
        "type": "String / post or comment",
        "did": "String / 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