Blog

BusinessDash's blog engine manages posts, categories, tags, and comments from the dashboard. The SDK lets you list, search, and render posts on your own site.


Listing Posts

const posts = await client.blog.listPosts({
  limit: 10,
  offset: 0,
  category: 'news',           // optional filter
  tag: 'technology',          // optional filter
  status: 'published',        // 'published' | 'draft' | 'all'
  sort: 'published_at_desc',  // default
})

Each post includes title, excerpt, body (HTML or markdown), featured image, published date, author, and SEO metadata.

Single Post

const post = await client.blog.getPost('my-post-slug')

Categories & Tags

const categories = await client.blog.listCategories()
// → [{ id, name, slug, postCount }, ...]

const tags = await client.blog.listTags()
// → [{ id, name, slug, postCount }, ...]

Comments

// List comments for a post
const comments = await client.blog.listComments('my-post-slug')

// Post a comment
await client.blog.postComment('my-post-slug', {
  author: 'Jane Doe',
  email: 'jane@example.com',
  content: 'Great article!',
})

// Like status & toggle
const status = await client.blog.likeStatus('my-post-slug')
await client.blog.toggleLike('my-post-slug')

AI-Assisted Drafting

From the dashboard, BusinessDash's AI assistant can draft blog posts based on a topic or keywords. Drafts can be reviewed, edited, and published directly in the dashboard — no SDK call needed for the drafting flow.