v1

latestOpenAPI 3.0.12026-07-1715846.6 KB
Posts

Create post

Creates a new blog post.

post/api/v1/posts

Request body

titlestring required
slugstring required
contentstring required
summarystring
thumbnailstring
category_idinteger required
sub_category_idinteger
meta_titlestring
meta_descriptionstring
keywordsstring
og_imagestring
status'draft' | 'published'
is_publicboolean
is_featuredboolean
is_pinnedboolean

Example request

{
  "title": "Getting Started with Go",
  "slug": "getting-started-with-go",
  "content": "# Introduction\n\nThis is a blog post...",
  "summary": "Learn the basics of Go programming",
  "category_id": 1,
  "sub_category_id": 2,
  "keywords": "go,programming,tutorial"
}

Response

Post created successfully

statusboolean
messagestring

Example response

{
  "status": true,
  "message": "Post retrieved successfully",
  "data": {
    "id": 1,
    "title": "Getting Started with Go",
    "slug": "getting-started-with-go",
    "content": "# Introduction\n\nThis is a blog post...",
    "summary": "Learn the basics of Go programming",
    "thumbnail": "https://example.com/image.jpg",
    "category_id": 1,
    "sub_category_id": 2,
    "keywords": "go,programming,tutorial",
    "status": "published",
    "is_public": true,
    "created_by": 1,
    "view_count": 100,
    "version": 1
  }
}