JSONPlaceholder test documentation (0.1.0)

Download OpenAPI specification:Download

Free fake API for testing and prototyping

post

Single piece of content posted by users

GET a single post

Get a post by unique post ID

path Parameters
id
required
number

ID of the post

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "body": "string",
  • "userId": 0
}

UPDATE a post

Update a post by unique post ID

path Parameters
id
required
number

ID of the post

Request Body schema: application/json
required
id
number

ID of the post

title
string

Title of the post

body
string

Body of the post

userId
number

ID of the user who created the post

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "body": "string",
  • "userId": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "body": "string",
  • "userId": 0
}

DELETE a post

Delete a post by unique post ID

path Parameters
id
required
number

ID of the post

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "body": "string",
  • "userId": 0
}

posts

Relating to any or all posts made by users

GET all posts.

Retrieves all available posts

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "body": "string",
  • "userId": 0
}

CREATE a new post

Creates a new post for the user

Request Body schema: application/json
required
id
number

ID of the post

title
string

Title of the post

body
string

Body of the post

userId
number

ID of the user who created the post

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "body": "string",
  • "userId": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "body": "string",
  • "userId": 0
}