Create an empty post (draft)

Create a new post as a draft with POST /posts. Only lang and slug are required.

Creates a new post. Posts are always created as a draft. To show it on your blog, publish it separately. You can create an empty draft with just lang and slug, or send the title and content along with it.

 

Request

Item Value
Method · path POST /posts
Permission Write only (write) or higher

 

Request fields

Field Type Required Description
lang string Required on create Language code. Two lowercase letters (ko, en, ja …). Can't be changed later
slug string Required on create Post URL. Lowercase letters, numbers, and hyphens, up to 255 characters. Must be unique within the language and can't be changed after publishing. author and preview can't be used
externalId string Optional The post's ID in your own system. Letters, numbers, and . _ : -, up to 100 characters. Unique within the language
title string Optional Title. Up to 500 characters. Needed to publish
summary string Optional Summary. Up to 1,024 characters
content string Optional Content (Markdown). Up to 100,000 characters. Needed to publish
thumbnail string Optional Cover image URL. http:// or https://
tags string[] Optional Tags
categories string[] Optional List of category codes
author string Optional Author slug. If omitted, the key's default author is used
readTimes number Optional Estimated reading time (minutes)
showAuthor boolean Optional Whether to show the author bio below the post
  • If you leave out author, the post is created under the key's default author.
  • If you leave out categories, the categories of a recent post in the same language may be applied. To set only the categories you want, send them when you create the post (send [] for none).
  • If the externalId is already in use, you get 409. If you need a request you can safely resend with the same ID, use Sync a post by externalId.

 

Examples

Create an empty draft:

curl -X POST https://api-open.weekerp.com/blog/v1/posts \
  -H "Authorization: Bearer wk_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "lang": "en", "slug": "spring-tips" }'

Create a post with a title and content:

curl -X POST https://api-open.weekerp.com/blog/v1/posts \
  -H "Authorization: Bearer wk_live_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "lang": "en",
    "slug": "spring-tips",
    "title": "5 Spring tips",
    "summary": "Spring tips we use every day",
    "content": "# Spring tips\n\nThe first tip is...",
    "tags": ["spring", "java"],
    "categories": ["engineering"]
  }'

 

Response

You get 201 with the created post.

{
  "id": "0193a1f2-7c4e-7b8a-9d10-3f2c1b0a9e87",
  "externalId": null,
  "lang": "en",
  "slug": "spring-tips",
  "status": "draft",
  "title": "5 Spring tips",
  "summary": "Spring tips we use every day",
  "content": "# Spring tips\n\nThe first tip is...",
  "thumbnail": null,
  "tags": ["spring", "java"],
  "categories": ["engineering"],
  "author": { "slug": "minjun", "name": "Minjun Kim" },
  "readTimes": null,
  "showAuthor": true,
  "publishedAt": null,
  "createdAt": "2026-11-14T03:04:05.123456Z",
  "updatedAt": "2026-11-14T03:04:05.123456Z"
}

status is one of draft, scheduled, or published.

 

Content rules

Content is Markdown. You can use headings (#), lists, tables, links, images, quotes, and code blocks.

  • Headings (#) in the content build the table of contents. If the same heading text appears twice, the post isn't saved, so make each heading slightly different.
  • Tags such as <script>, <style>, and <form>, attributes such as onclick=, and javascript: links aren't saved. To show HTML as an example, wrap it in a code block or inline code.

 

Common errors

HTTP code Fix
400 post_slug_invalid slug is missing or in the wrong format
400 lang_invalid Send lang as two lowercase letters
400 post_author_required The key has no default author. Add author
400 post_category_invalid A category code doesn't exist. Check the category list
400 post_content_unsafe The content contains executable HTML. message shows which part
400 post_duplicated_toc_id Two headings in the content have the same text
409 post_slug_duplicated The same slug already exists in that language
409 post_external_id_duplicated The same externalId already exists in that language
429 daily_post_limit_exceeded You've used today's new post limit. Try again tomorrow

For the full list of errors, see Error format in Publish posts with the blog API.

 

Next steps