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

# Register a new user

> Register a new user



## OpenAPI

````yaml post /auth/register
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /auth/register:
    parameters: []
    post:
      tags:
        - User
      summary: Register a new user
      description: Register a new user
      operationId: registerUser
      parameters: []
      requestBody:
        description: The new User resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User.RegisterUserRequest-UserRegister'
          text/html:
            schema:
              $ref: '#/components/schemas/User.RegisterUserRequest-UserRegister'
        required: true
      responses:
        '201':
          description: User resource created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
            text/html:
              schema:
                $ref: '#/components/schemas/User'
          links: {}
        '400':
          description: Invalid input
        '422':
          description: Unprocessable entity
      deprecated: false
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X POST \
             /auth/register \
             --header "Content-Type: application/json" \
             --header "Authorization: Bearer <token>" \
             --data '{
                "email": "",
                "password": "********",
                "repeatPassword": "********"
            }'
components:
  schemas:
    User.RegisterUserRequest-UserRegister:
      type: object
      description: ''
      deprecated: false
      required:
        - email
        - password
        - repeatPassword
      properties:
        email:
          format: email
          writeOnly: true
          externalDocs:
            url: https://schema.org/email
          type: string
        password:
          minLength: 8
          pattern: ^(.*[!@#$%^&*()\-_=+{};:,<.>].*)$
          writeOnly: true
          example: '********'
          type: string
        repeatPassword:
          writeOnly: true
          example: '********'
          type:
            - string
            - 'null'
    User:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: 01F9Z3ZJXZQZJZJZJZJZJZJZJZ
          type: string
        firstName:
          minLength: 2
          maxLength: 255
          readOnly: true
          description: The firstname of the user
          example: John
          type: string
        lastName:
          minLength: 2
          maxLength: 255
          readOnly: true
          description: The lastname of the user
          example: Doe
          type: string
        email:
          format: email
          externalDocs:
            url: https://schema.org/email
          type: string
        password:
          minLength: 8
          pattern: ^(.*[!@#$%^&*()\-_=+{};:,<.>].*)$
          writeOnly: true
          example: '********'
          type: string
        repeatPassword:
          writeOnly: true
          example: '********'
          type:
            - string
            - 'null'
        defaultAccount:
          type:
            - string
            - 'null'
          format: uuid
          example: https://example.com/
        socialLogins:
          writeOnly: true
          type: array
          items:
            $ref: '#/components/schemas/UserSocialLogin'
        createdAt:
          type: string
          format: date-time
        accounts:
          writeOnly: true
          type: array
          items:
            type: string
            format: uuid
            example: https://example.com/
        confirmToken:
          readOnly: true
          type:
            - string
            - 'null'
        confirmTokenValidUntil:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
        updatedAt:
          readOnly: true
          description: The date and time when the resource was last updated.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        confirmed:
          readOnly: true
          type: boolean
        userIdentifier:
          readOnly: true
          type: string
        passwordEqual:
          readOnly: true
          type: boolean
        completed:
          readOnly: true
          type: boolean
        name:
          readOnly: true
          type: string
        superAdmin:
          readOnly: true
          type: boolean
        passwordRecoveryTokenExpired:
          readOnly: true
          type: boolean
        resetPasswordToken:
          readOnly: true
          type:
            - string
            - 'null'
        resetPasswordTokenExpiresAt:
          readOnly: true
          type:
            - string
            - 'null'
          format: date-time
      required:
        - firstName
        - lastName
        - email
        - password
        - repeatPassword
    UserSocialLogin:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          type: string
        user:
          type: string
          format: uuid
          example: https://example.com/
        provider:
          type: string
        providerId:
          type: string
        createdAt:
          readOnly: true
          description: The date and time when the resource was created.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
        updatedAt:
          readOnly: true
          description: The date and time when the resource was last updated.
          example: '2021-01-01T00:00:00+00:00'
          type: string
          format: date-time
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````