Posts

Add a new post

post/posts/add

Request

  • Base URL
    https://dummyjson.com
  • URL
    https://dummyjson.com/posts/add
  • Auth
    none required

Query parameters

delayinteger

Artificial response delay in milliseconds (0–5000).

Request body

titlestring
bodystring
userIdinteger required
tagsstring[]

Example request

{
  "title": "His mother had always taught him",
  "body": "His mother had always taught him not to ever think of himself as better than others. He'd tried to live by this motto. He never looked down on those who were less fortunate or who had less money than him. But the stupidity of the group of people he was talking to made him change his mind.",
  "userId": 121,
  "tags": [
    "history"
  ],
  "reactions": {
    "likes": 192,
    "dislikes": 25
  }
}

Response

Created post

idinteger
titlestring
bodystring
tagsstring[]
viewsinteger
userIdinteger

Example response

{
  "id": 1,
  "title": "His mother had always taught him",
  "body": "His mother had always taught him not to ever think of himself as better than others. He'd tried to live by this motto. He never looked down on those who were less fortunate or who had less money than him. But the stupidity of the group of people he was talking to made him change his mind.",
  "tags": [
    "history"
  ],
  "reactions": {
    "likes": 192,
    "dislikes": 25
  },
  "views": 305,
  "userId": 121
}

Changes

No recorded changes to this operation across all 1 revision of this API.