---
title: "Register a new user"
method: POST
path: "/user/register"
tags: ["User"]
---

# Register a new user

`POST /user/register`

## Request

- Base URL: `https://api.insided.com`
- URL: `https://api.insided.com/user/register`
- Auth: OAuth 2 (client credentials, token URL `/oauth2/token`)

Returns a Json User. The profile_field option in the request body provides a way to add profile fields to the registration. The key refers to an existing profile field id. Note that profile fields can be set as mandatory registration fields.

## Request body

- object
  - `data` UserRegisterRequest
    - `email` string, required
    - `username` string, required: Username must be unique. It must be between 3 to 30 characters long. It can only contain alphanumeric characters, spaces and the following special characters: . ' - _
    - `password` string, required: Password must be at least 6 characters long, it can not contain white space, and it shouldn't consist of one repeated character
    - `user_role` string[]: If specified, must contain exactly one main role, and may contain custom roles.
    - `profile_field` object
    - `sso` object

## Response `200`

Successful response

- object
  - `user` UserRegisteredResponse
    - `userid` integer
    - `email` string
    - `username` string
    - `rank` string
    - `joindate` integer
    - `sso` object

## Other responses

- `400`: Validation error
- `404`: Not Found
- `500`: Unexpected error

---

[API](https://skmtc.dev/insided/apis/user-api.md) · [All operations](https://skmtc.dev/insided/apis/user-api/llms.txt) · [OpenAPI document](https://skmtc.dev/insided/apis/user-api/revisions/d5cbe609c9e7?raw)
