Skip to content

Sign up endpoint

David Alejandro Molano Vásquez edited this page Feb 9, 2020 · 3 revisions

Sign-Up

This endpoint permits user sign-up. Accepts only POST requests.

To create a user the request must provide the fields:

  • Email: The email of the user registering. Will be used for authentication.
  • Password: The password for the account that it´s being created.
  • Rol: The rol of the user registering. Could be Student or Teacher.

The table below details how to use the endpoint:

URL /api/signup
HTTP Method POST
URL Params None
Data Params
{"email": [string],"password": [alphanumeric],"rol": [ string ]}
Success Response
Code: 201
{"id":[id_of_created_user]}
Error Response
Code: 400
{"Error": "User with given email address already exists"}
Error Response
Code: 400
{"Error": "Request is missing required fields"}
Error Response
Code: 500
{"Error": "Something went wrong"}
Clone this wiki locally