Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

ahunt0/bpa-tutorial-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

API Documentation

Auth

Register User

Endpoint: POST /api/v1/auth/register

Description: This endpoint is used to register a new user.

Request Body:

Field Type Description
Username String The username of the new user.
Email String The email of the new user.
Password String The password of the new user.
FirstName String The first name of the new user.
LastName String The last name of the new user.

Example Request:

{
    "Username": "johndoe",
    "Email": "johndoe@example.com",
    "Password": "password123",
    "FirstName": "John",
    "LastName": "Doe"
}

Responses:

  • 201 Created: If the user is successfully created. The response body will contain a message and the created user's details.
{
  "message": "User created",
  "user": {
    "Username": "johndoe",
    "Email": "johndoe@example.com",
    "FirstName": "John",
    "LastName": "Doe"
    // Other user fields...
  }
}
  • 400 Bad Request: If the username or email is already taken. The response body will contain a message.
{
  "message": "Username or email already taken"
}
  • 500 Internal Server Error: If there's an error on the server. The response body will contain a message.
{
  "message": "Internal Server Error"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published