Create New User

POST /user

Create a new user.

application/json

Body

Post the necessary fields for the API to create a new user.

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

Responses

  • 200 application/json

    User Created

    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.

  • 400

    Missing Required Information

  • 409

    Email Already Taken

POST /user
curl \
 --request POST 'http://localhost:3000/user' \
 --header "Content-Type: application/json" \
 --data '{"email":"bob.fellow@gmail.com","lastName":"Fellow","firstName":"Bob","dateOfBirth":"1996-08-24"}'
Request example
{
  "email": "bob.fellow@gmail.com",
  "lastName": "Fellow",
  "firstName": "Bob",
  "dateOfBirth": "1996-08-24"
}
Response examples (200)
{
  "id": 12,
  "email": "bob.fellow@gmail.com",
  "lastName": "Fellow",
  "firstName": "Bob",
  "createDate": "2020-11-18",
  "dateOfBirth": "1996-08-24",
  "emailVerified": false
}