Skip to main content
POST
Create a post
Overview
  • Creates a new post. JSONPlaceholder fakes creation and responds with a new id.
  • Great for demonstrating request bodies, validation, and response handling without needing a backend.
Request body
  • userId (number, required): The author id.
  • title (string, required): Title for the post.
  • body (string, required): The content.
Example usage
Response notes
  • Status 201: Returns the post object with a generated id.
  • JSONPlaceholder does not persist data; subsequent GETs won’t include this post.
Tips
  • Use this alongside GET /posts to illustrate the difference between mocked creation and read-only data.

Body

application/json
userId
integer
required
title
string
required
body
string
required

Response

201 - application/json

Created post (mocked)

userId
integer
id
integer
title
string
body
string