Post API โ
Get Post List โ
prolog
GET API_BASE/lists/:channel_slug/posts?offset=:offset&limit=:limit&public=:public
Parameters โ
Parameter | Type | Description |
---|---|---|
channel_slug | string | The slug of the channel |
offset | number | The offset of the post list |
limit | number | The limit of the post list |
public | number | 1: 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 โ
Parameter | Type | Description |
---|---|---|
channel_slug | string | The slug of the channel |
post_id | number | The id of the post |
Response โ
json
{
"data": PostObject,
"ts": 1723923923
}
Create Post โ
prolog
POST API_BASE/lists/:channel_slug/posts
Parameters โ
Parameter | Type | Description |
---|---|---|
channel_slug | string | The 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 โ
Parameter | Type | Description |
---|---|---|
channel_slug | string | The slug of the channel |
post_slug | string | The 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.