You can support this site from as little as $1 a month on Patreon.

The support pays for site hosting and the expansion of this content.

In addition, Patreon Supporters gain access to exclusive online video training courses and ebooks.

Join Now

How to complete the challenge POST /todos (422)

Issue a POST request to /todos with syntactically valid JSON that fails todo validation.

For this challenge, send doneStatus as a string rather than a boolean:

{
  "title": "create new todo",
  "doneStatus": "bob",
  "description": "created via API Challenges"
}

The response should be 422 Unprocessable Content because the request body can be parsed, but the todo data is not valid.

{
  "errorMessages": [
    "Failed Validation: doneStatus should be BOOLEAN"
  ]
}

Remember to include your X-CHALLENGER header so the challenge is tracked.

Try it now