TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Create a todo

POSThttps://api.testingapis.com/api/Todos

Request body

Optional. application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml. Model: Todo. The new todo. Any client-supplied ID is replaced.

Example body
{
  "userId": 101,
  "title": "Buy milk",
  "completed": false,
  "priority": "low",
  "dueDate": "2026-10-15"
}

Responses

200
OK
201
Created; returns { message, data } with the generated ID.
400
title is missing.
500
Unexpected server error.

Example

Request
curl -X POST "https://api.testingapis.com/api/Todos" \
  -H "Content-Type: application/json" \
  -d '{"userId": 101, "title": "Buy milk", "completed": false, "priority": "low", "dueDate": "2026-10-15"}'
Response201 Created
{
  "message": "Todo created successfully",
  "data": {
    "id": 34,
    "userId": 101,
    "title": "Buy milk",
    "completed": false,
    "priority": "low",
    "dueDate": "2026-10-15"
  }
}