Skip to content

Latest commit

 

History

History
67 lines (64 loc) · 1.04 KB

Signup.md

File metadata and controls

67 lines (64 loc) · 1.04 KB

Signup

Request

Method

POST

Headers

{
    "Access": "application/json",
    "Content-Type": "application/json"
}

Body:

// Type JSON String
{
    "user": {
        "fname": "User's First Name",
        "lname": "User's Last Name",
        "username": "User's Username",
        "mail": "User's E-Mail",
        "password": "User's Password",
    }
}

Response

Code 409: Already in use

Username AND Mail are already in registred:

Body:
{
    "alreadyInUse": "both",
    "error": "Both Username and Email are already registred"
}

Only user name is already in user:

Body:
{
    "alreadyInUse": "username",
    "error": "Username already in use"
}

Only user name is already in user:

Body:
{
    "alreadyInUse": "mail",
    "error": "Email already registred"
}

Code 500: Internal Server error

Body:

{
    "error": "Internal server error"
}

Code 200: Success

Body:

{
    "message": "Successfully Register"
}