> ## Documentation Index
> Fetch the complete documentation index at: https://qg.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create User

> Register a new user in the system

## Create User

This endpoint allows you to register a new user in the system.

### Request Body

The request body should contain the user's details in JSON format. This includes a username, password, and email address. The fields are required, and the password must be securely formatted.

```json theme={null}
{
  "username": "user123",
  "password": "securepassword",
  "email": "user123@example.com"
}
```


## OpenAPI

````yaml POST /api/register/
openapi: 3.0.1
info:
  title: Post-Quantum Cryptography API
  description: >-
    API for post-quantum cryptographic operations, including key generation and
    encryption
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: http://localhost:8000
security:
  - bearerAuth: []
paths:
  /api/register/:
    post:
      tags:
        - Authentication
      summary: Register new user
      description: Register a new user in the system
      operationId: registerUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserRegistration'
      responses:
        '201':
          description: User created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Invalid input data
        '422':
          description: Unprocessable Entity
        '500':
          description: Internal server error
components:
  schemas:
    UserRegistration:
      type: object
      required:
        - username
        - password
        - email
      properties:
        username:
          type: string
        password:
          type: string
          format: password
        email:
          type: string
          format: email
    User:
      type: object
      properties:
        id:
          type: integer
        username:
          type: string
        email:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````