POST /v1/auth/register

Create new user

application/json

Body

User existence checker request body

  • firstname string | null

    firstname

  • lastname string | null

    lastname

  • email string Required

    email

  • password string Required

    password

Responses

  • 200 application/json

    successful operation

    Hide response attributes Show response attributes object
    • user object Required

      User schema

      Hide user attributes Show user attributes object
      • id string Required

        id

      • firstname string | null Required

        Firstname

      • lastname string | null Required

        Lastname

      • email string Required

        User email

      • emailVerifiedAt string | null Required

        User email verified at

    • token string Required

      Access Token

POST /v1/auth/register
curl \
 --request POST 'https://api-dev.classmanager.io/v1/auth/register' \
 --header "Content-Type: application/json" \
 --data '{"firstname":"John","lastname":"Doe","email":"john@example.com","password":"********"}'
Request examples
{
  "firstname": "John",
  "lastname": "Doe",
  "email": "john@example.com",
  "password": "********"
}
Response examples (200)
{
  "user": {
    "id": "usr_123123123123",
    "firstname": "John",
    "lastname": "Doe",
    "email": "new Email(john@example.com)",
    "emailVerifiedAt": "2023-11-08 14:05:51"
  },
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"
}