Posts

Create a blog post for the authenticated website.

post/api/v1/posts

Request

  • Base URL
    https://api.unicornplatform.com
  • Auth
    HTTP bearer

Request body

headlinestring required
metaTitlestring

Defaults to headline when omitted.

metaDescriptionstring
thumbnailUrlstring
htmlstring required
slugstring required

Single URL segment, without slashes, query string, or fragment.

directorystring

Post directory. Omit it to use the active blog directory; use another directory such as /news for alternate folders.

publishedboolean
createdAtstring date-time

Optional published/created timestamp to preserve imported content dates.

Example request

{
  "headline": "How to build a landing page",
  "html": "<p>Post content</p>",
  "slug": "my-post",
  "directory": "/blog"
}

Response

Post was created.

idstring required
headlinestring required
metaTitlestring required
metaDescriptionstring required
thumbnailUrlstring required
htmlstring

Present when includeHtml is true, and included by default for detail endpoints.

slugstring required
directorystring required
pathstring required
urlstring required
publishedboolean required
createdAtstring date-time required
updatedAtstring date-time required

Example response

{
  "id": "post_abc123def",
  "slug": "my-post",
  "directory": "/blog",
  "path": "/blog/my-post",
  "url": "https://example.com/blog/my-post"
}

Changes

No recorded changes to this operation across all 1 revision of this API.