---
title: "Register user"
method: POST
path: "/users/register"
tags: ["🔐 Authentication"]
---

# Register user

`POST /users/register`

The API endpoint allows users to register or signup to create their accounts.

## Request body

- object
  - `email` string
  - `password` string
  - `role` string
  - `username` string

## Response `201`

Register user

- object
  - `data` object
    - `user` object
      - `__v` number
      - `_id` string
      - `avatar` object
        - `_id` string
        - `localPath` string
        - `url` string
      - `createdAt` string
      - `email` string
      - `isEmailVerified` boolean
      - `loginType` string
      - `role` string
      - `updatedAt` string
      - `username` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/versions/a9f3a290e4dc/schema)
