Skip to content

Post API โ€‹

Get Post List โ€‹

prolog
GET API_BASE/lists/:channel_slug/posts?offset=:offset&limit=:limit&public=:public

Parameters โ€‹

ParameterTypeDescription
channel_slugstringThe slug of the channel
offsetnumberThe offset of the post list
limitnumberThe limit of the post list
publicnumber1: public posts, 0: all posts

Response โ€‹

json
{
  "data": {
    "pagination": {
      "total": 100,
      "offset": 0,
      "next_offset": 20,
      "limit": 20
    },
    "items": [PostObject, ...]
  },
  "ts": 1723923923
}

Get Post โ€‹

prolog
GET API_BASE/lists/:channel_slug/posts/:post_id

Parameters โ€‹

ParameterTypeDescription
channel_slugstringThe slug of the channel
post_idnumberThe id of the post

Response โ€‹

json
{
  "data": PostObject,
  "ts": 1723923923
}

Create Post โ€‹

prolog
POST API_BASE/lists/:channel_slug/posts

Parameters โ€‹

ParameterTypeDescription
channel_slugstringThe slug of the channel

Request Body โ€‹

json
{
  "slug": "post-slug",
  "cover_image_url": "https://...",
  "title": "Post Title",
  "summary": "...",
  "content": "...",
  "datetime": "2025-04-19T00:00:00Z",
  "first_published_at": "2025-04-19T00:00:00Z",
  "tags": "tag1,tag2,tag3",
  "theme": "light"
}

Response โ€‹

json
{
  "data": PostObject,
  "ts": 1723923923
}

Update Post โ€‹

prolog
PUT API_BASE/lists/:channel_slug/posts/:post_slug

Parameters โ€‹

ParameterTypeDescription
channel_slugstringThe slug of the channel
post_slugstringThe slug of the post

Request Body โ€‹

Same as Create Post.

Response โ€‹

Same as Create Post.

Publish Post โ€‹

prolog
PUT API_BASE/lists/:channel_slug/posts/:post_slug/publish

Parameters โ€‹

Same as Update Post.

Response โ€‹

Same as Update Post.

Unpublish Post โ€‹

prolog
PUT API_BASE/lists/:channel_slug/posts/:post_slug/unpublish

Same as Publish Post.

Send Post โ€‹

prolog
PUT API_BASE/lists/:channel_slug/posts/:post_slug/deliver

Parameters โ€‹

Same as Publish Post.

Response โ€‹

Same as Publish Post.