Posts

Posts are the core content of your blog - the very reason Waldium exists is so you can create, manage, and publish high-quality blog posts. On this page, we will dive into the different post endpoints you can use to manage posts programmatically. We will look at how to create, generate, retrieve, publish, and delete posts.


POST/v1/posts

Create a post

This endpoint allows you to create a new blog post with custom content. You can create posts with your own content, metadata, and formatting.

Required attributes

  • Name
    title
    Type
    string
    Description

    The title of the blog post.

Optional attributes

  • Name
    description
    Type
    string
    Description

    Brief description of the post.

  • Name
    content
    Type
    string
    Description

    Main body of the post (Markdown supported).

  • Name
    category
    Type
    string
    Description

    Post category.

  • Name
    tags
    Type
    array
    Description

    Array of tags.

  • Name
    authorId
    Type
    string
    Description

    Author's ID.

  • Name
    isDraft
    Type
    boolean
    Description

    Post status: true for draft, false for published.

Request

POST
/v1/posts
curl -X POST https://api.blogwald.com/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Getting Started with Blogging",
    "description": "A beginner'\''s guide to blogging",
    "content": "# Getting Started with Blogging\n\nBlogging is a great way to share your thoughts...",
    "category": "Technology",
    "tags": ["blogging", "beginner", "guide"],
    "isDraft": true
  }'

Response

{
  "success": true,
  "data": {
    "message": "Post created successfully",
    "post": {
      "id": "9c166d00-0921-406c-9b68-8409710223e2",
      "slug": "getting-started-with-blogging",
      "title": "Getting Started with Blogging",
      "description": "A beginner's guide to blogging",
      "category": "Technology",
      "tags": ["blogging", "beginner", "guide"],
      "authorId": null,
      "isDraft": true,
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:30:00.000Z"
    },
    "site": {
      "id": "site_123",
      "name": "Your Site Name"
    }
  }
}

POST/v1/posts/generate

Generate a post

This endpoint allows you to generate an AI-powered blog post using your knowledge base. This creates high-quality, contextual content based on your uploaded knowledge and specified parameters.

Required attributes

  • Name
    topic
    Type
    string
    Description

    The topic for the blog post.

Optional attributes

  • Name
    style
    Type
    string
    Description

    Writing style: "professional", "casual", "technical", "creative", "academic".

  • Name
    length
    Type
    string
    Description

    Post length: "short", "medium", "long".

  • Name
    tone
    Type
    string
    Description

    Writing tone: "informative", "persuasive", "conversational", "authoritative".

  • Name
    includeExamples
    Type
    boolean
    Description

    Whether to include examples in the content.

  • Name
    targetAudience
    Type
    string
    Description

    Target audience for the content.

Request

POST
/v1/posts/generate
curl -X POST https://api.blogwald.com/api/v1/posts/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "The Future of AI in Content Marketing",
    "style": "professional",
    "length": "medium",
    "tone": "informative",
    "includeExamples": true,
    "targetAudience": "marketing professionals"
  }'

Response

{
  "message": "Post generated successfully",
  "post": {
    "id": "post_123",
    "slug": "future-of-ai-content-marketing",
    "title": "The Future of AI in Content Marketing",
    "description": "Short summary...",
    "category": "Technology",
    "tags": ["AI", "Marketing"],
    "authorId": "auth_123",
    "isDraft": false,
    "createdAt": "2025-08-08T04:32:21.956Z",
    "updatedAt": "2025-08-08T04:32:21.956Z"
  },
  "site": {
    "id": "site_123",
    "name": "Your Site Name"
  },
  "timestamp": "2025-08-08T04:32:21.956Z",
  "api": {
    "version": "v1",
    "status": "active"
  }
}

GET/v1/posts/:id

Retrieve a post

This endpoint allows you to retrieve a single post by providing its ID. Refer to the list at the top of this page to see which properties are included with post objects.

Request

GET
/v1/posts/9c166d00-0921-406c-9b68-8409710223e2
curl https://api.blogwald.com/api/v1/posts/9c166d00-0921-406c-9b68-8409710223e2 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "message": "Post retrieved successfully",
    "post": {
      "id": "9c166d00-0921-406c-9b68-8409710223e2",
      "slug": "getting-started-with-blogging",
      "title": "Getting Started with Blogging",
      "description": "A beginner's guide to blogging",
      "category": "Technology",
      "tags": ["blogging", "beginner", "guide"],
      "cta": null,
      "authorId": null,
      "isDraft": true,
      "createdAt": "2024-01-15T10:30:00.000Z",
      "updatedAt": "2024-01-15T10:30:00.000Z"
    },
    "site": {
      "id": "site_123",
      "name": "Your Site Name"
    }
  }
}

PUT/v1/posts/:id

Publish a post

This endpoint allows you to publish or unpublish a blog post by toggling its draft status. This endpoint automatically toggles the current draft status:

  • If post is a draft → Publishes it (sets isDraft to false)
  • If post is published → Makes it a draft (sets isDraft to true)

This endpoint does not require a request body.

Request

PUT
/v1/posts/9c166d00-0921-406c-9b68-8409710223e2
curl -X PUT https://api.blogwald.com/api/v1/posts/9c166d00-0921-406c-9b68-8409710223e2 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "message": "Post published successfully",
    "post": {
      "id": "9c166d00-0921-406c-9b68-8409710223e2",
      "title": "Getting Started with Blogging",
      "isDraft": false,
      "updatedAt": "2024-01-15T10:30:00.000Z"
    }
  }
}

DELETE/v1/posts/:id

Delete a post

This endpoint allows you to delete a blog post from your site. This action is permanent and cannot be undone. Note: This will also delete any associated data like analytics, comments, etc.

Request

DELETE
/v1/posts/9c166d00-0921-406c-9b68-8409710223e2
curl -X DELETE https://api.blogwald.com/api/v1/posts/9c166d00-0921-406c-9b68-8409710223e2 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "message": "Post deleted successfully",
    "postId": "9c166d00-0921-406c-9b68-8409710223e2"
  }
}

Was this page helpful?