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

Update a user's name, email, job and city

PUThttps://api.testingapis.com/api/User/update/{id}Sign in to see this endpoint's URL

Parameters 1

NameTypeDescription
idrequiredpath · integer (int32)User ID.

Request body

Optional. application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml. Model: User. New name, email, job and city.

Example body
{"name": "Priya S.", "email": "priya@example.com", "job": "QA Lead", "city": "Pune"}

Responses

200
User updated.
404
No user with that ID.

Example

Request
curl -X PUT "https://api.testingapis.com/api/User/update/204" \
  -H "Content-Type: application/json" \
  -d '{"name": "Priya S.", "email": "priya@example.com", "job": "QA Lead", "city": "Pune"}' \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "message": "User updated successfully",
  "data": {
    "userId": 204,
    "name": "Priya S.",
    "email": "priya@example.com",
    "job": "QA Lead",
    "city": "Pune"
  }
}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.