Create a post
Endpoint examples
Create Post
Creates a new post (JSONPlaceholder fakes creation and returns an object with an id).
POST
Create a post
Overview
Response notes
- 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.
- userId (number, required): The author id.
- title (string, required): Title for the post.
- body (string, required): The content.
- Status 201: Returns the post object with a generated id.
- JSONPlaceholder does not persist data; subsequent GETs won’t include this post.
- Use this alongside GET /posts to illustrate the difference between mocked creation and read-only data.