| Time | Status | User Agent |  |
| :-- | :-- | :-- | :-- |
| Make a request to see history. |

#### URL Expired

The URL for this request expired after 30 days.

### The Body Sent When Creating or Updating a Post

The request body for creating or updating a post.

- **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.

- `DRAFT` This is a personal draft.
  - `SHARED_DRAFT` This is when it is a shared draft with the editors of the channel.
  - `REVIEW` This is when it is being reviewed.
  - `PUBLISHED` This is when the post is published. It cannot revert to any other state from here.

Allowed:  
  `PUBLISHED``SHARED_DRAFT``DRAFT``REVIEW`

- **layout**  
  string  
  *enum*  
  *required*  
  The layout of the post. It can be either:

- `POST` This is a standard post.
  - `ARTICLE` This is an article layout.

Allowed:  
  `POST``ARTICLE`

- **announcement**  
  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 are `BEFORE` or `AFTER`.

- **hero**  
  object  
  The hero used in articles.

# ``200      A Post resource object.

Updated about 1 year ago

* * *

### Sample Request

```
curl --request POST \
     --url https://api.happeo.com/posts \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "state": "PUBLISHED",
  "layout": "POST",
  "announcement": true,
  "commentsDisabled": false
}
'
```

### Sample Response

```application/json
{
  "status": 200,
  "message": "Updated about 1 year ago"
}
```

* * *
