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

Add a user

POSThttps://api.testingapis.com/api/User/addUserSign in to see this endpoint's URL

Request body

Optional. application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml. Model: User. The user to add. Its userId is ignored and replaced with a random ID.

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

Responses

200
OK
201
User created.

Example

Request
curl -X POST "https://api.testingapis.com/api/User/addUser" \
  -H "Content-Type: application/json" \
  -d '{"name": "Priya Sharma", "email": "priya@example.com", "job": "QA Engineer", "city": "Pune"}' \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response201 Created
{
  "message": "User created successfully",
  "data": {
    "userId": 697,
    "name": "Priya Sharma",
    "email": "priya@example.com",
    "job": "QA Engineer",
    "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.