Update User Information

PATCH /users/{userId}

Update the information of an existing user.

Path parameters

  • userId integer Required

    Id of an existing user.

application/json

Body

Patch user properties to update.

  • firstName string
  • lastName string
  • email string

    If a new email is given, the user's email verified property will be set to false.

  • dateOfBirth string

Responses

  • 200 application/json

    User Updated

    Hide response attributes Show response attributes object
    • id integer Required

      Unique identifier for the given user.

    • firstName string Required
    • lastName string Required
    • email string(email) Required
    • dateOfBirth string(date)
    • emailVerified boolean Required

      Set to true if the user's email has been verified.

    • createDate string(date)

      The date that the user was created.

  • 404

    User Not Found

  • 409

    Email Already Taken

PATCH /users/{userId}
curl \
 --request PATCH 'http://localhost:3000/users/{userId}' \
 --header "Content-Type: application/json" \
 --data '{"firstName":"Rebecca"}'
Request examples
{
  "firstName": "Rebecca"
}
{
  "email": "rebecca@gmail.com"
}
{
  "lastName": "Baker",
  "dateOfBirth": "1985-10-02"
}
Response examples (200)
{
  "id": 13,
  "email": "rebecca@gmail.com",
  "lastName": "Baker",
  "firstName": "Rebecca",
  "createDate": "2019-08-24",
  "dateOfBirth": "1985-10-02",
  "emailVerified": false
}