Update a post
| Time | Status | User Agent | |
|---|---|---|---|
| Make a request to see history. |
URL Expired
The URL for this request expired after 30 days.
Post Schema
Fields:
postId: string (required)
A post id.authorId: string | null
The id of the user who is the author (official writer) of the post. If not given, the user id of the user making the request is set as authorId.channelId: string (required)
The id of the channel where the post belongs to.state: string (enum) (required)
The state of the post. The post can be in 4 different states:DRAFTThis is a personal draft.SHARED_DRAFTThis is a shared draft with the editors of the channel.REVIEWThis is when it is being reviewed.PUBLISHEDThis is when the post is published. It cannot revert to any other state from here.
Allowed:
PUBLISHEDSHARED_DRAFTDRAFTREVIEWlayout: string (enum) (required)
The layout of the post. It can be either:POSTThis is a standard post.ARTICLEThis is an article layout.
Allowed:
POSTARTICLEannouncement: boolean (required)
True if the post is an announcement. False if not.content: html | null
The content of the post.commentsDisabled: boolean | null
Defaults to false. States whether the comments are disabled for this post.mentionedIds: array of strings
An array of user ids that are being mentioned in the post.hashtags: array of strings
An array of hashtags attached to the post.attachments: array of objects | null
The array of attachments in the post.title: string | null
The title of the article.subTitle: string | null
The subtitle of the article.heroPosition: string | null
The position of the hero inside the article. The accepted values areBEFOREorAFTER.hero: object
The hero used in articles.
Example API Request
curl --request PUT \
--url https://api.happeo.com/posts/postId \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"state": "PUBLISHED",
"layout": "POST",
"announcement": true,
"commentsDisabled": false
}'
Response
{
"status": "200",
"message": "Updated about 1 year ago"
}