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

Update a todo

PUThttps://api.testingapis.com/api/Todos/{id}

Parameters 1

NameTypeDescription
idrequiredpath · integer (int32)Todo ID.

Request body

Optional. application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml. Model: Todo. The new field values.

Example body
{
  "userId": 101,
  "title": "Review pull request #42",
  "completed": false,
  "priority": "high",
  "dueDate": "2025-07-20"
}

Responses

200
Updated; returns { message, data }.
404
The todo does not exist.
500
Unexpected server error.

Example

Request
curl -X PUT "https://api.testingapis.com/api/Todos/31" \
  -H "Content-Type: application/json" \
  -d '{"userId": 101, "title": "Review pull request #42", "completed": false, "priority": "high", "dueDate": "2025-07-20"}'
Response200 OK
{
  "message": "Todo updated successfully",
  "data": {
    "id": 31,
    "userId": 101,
    "title": "Review pull request #42",
    "completed": false,
    "priority": "high",
    "dueDate": "2025-07-20"
  }
}