Skip to content

Blog ​

The blog helpers call the Flowless post API (/api/v1/posts) and the post-type API (/api/v1/post-types). Password-protected posts use the X-Post-Password request header.

Server routes are documented in the Flowless Blog operations.

TypeScript, React, and React Native ​

@pubflow/core exposes createPubflow().blog. @pubflow/react and @pubflow/react-native expose the same methods from useBlog(). @pubflow/flowfull-client exposes them from client.blog.

typescript
const posts = await client.blog.listPosts({ page: 1, limit: 10, status: 'published' });
const post = await client.blog.getPost('hello-world', { lang: 'en' });
await client.blog.createPost({ title: 'Hello', body: 'First post', status: 'draft' });
await client.blog.publishPost(post.data.id);
await client.blog.uploadFeaturedImage(post.data.id, file);
tsx
const blog = useBlog();
const categories = await blog.listCategories();

Posts ​

listPosts, createPost, getPost, getPostById, updatePost, deletePost, publishPost, unpublishPost, schedulePost, restorePost, getAuthor, uploadFeaturedImage, deleteFeaturedImage

Categories and tags ​

listCategories, createCategory, createCategoryBulk, updateCategory, deleteCategory, listTags, createTag, createTagBulk, updateTag, deleteTag

Comments, reactions, and bookmarks ​

listComments, createComment, updateComment, deleteComment, moderateComment, getReactions, react, bookmark, removeBookmark, listBookmarks, trackView, getStats

Translations and sitemap ​

listTranslations, createTranslation, updateTranslation, deleteTranslation, getSitemap

getSitemap returns XML, not the JSON envelope.

Post types ​

listPostTypes, getPostType, getPostTypeSchema, getPostTypeStats, createPostType, updatePostType, deletePostType

Posts of a type are listed with listPosts({ type: 'article' }).

Go ​

go
posts, err := client.Blog.ListPosts(map[string]any{"status": "published"})
_, err = client.Blog.CreatePost(map[string]any{"title": "Hello", "body": "First post"})

Method names match the TypeScript helpers in PascalCase: GetPost, PublishPost, CreateCategoryBulk, ListPostTypes, GetSitemap, and the rest of the surface above.

Python ​

Sync and async clients both expose blog():

python
posts = client.blog().list_posts({"status": "published"})
client.blog().create_post({"title": "Hello", "body": "First post"})
python
posts = await client.blog().list_posts({"status": "published"})

Python methods use snake_case (get_post_by_id, create_category_bulk, upload_featured_image, list_post_types).