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

# Register User

> Register a new user with email OTP verification and create a profile in core api. You receive a new JWT access token with user id that you can use to authenticate requests to the API. Optionally provide a shareToken for Sumsub reusable KYC.



## OpenAPI

````yaml https://gp-auth-module.prod.gnosispay.com/openapi.json post /user
openapi: 3.0.0
info:
  version: 1.0.0
  title: SIWE Authentication API
  description: Sign In With Ethereum authentication service
servers:
  - url: https://gp-auth-module.prod.gnosispay.com
    description: API server
security: []
paths:
  /user:
    post:
      tags:
        - User
      summary: Register User
      description: >-
        Register a new user with email OTP verification and create a profile in
        core api. You receive a new JWT access token with user id that you can
        use to authenticate requests to the API. Optionally provide a shareToken
        for Sumsub reusable KYC.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterUserRequest'
      responses:
        '201':
          description: User registered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterUserSuccess'
        '400':
          description: Bad request - Invalid OTP or expired OTP
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationOrError'
        '401':
          description: Unauthorized - Invalid JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict - user already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Bad Gateway - profile creation failed in core API
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - Bearer: []
components:
  schemas:
    RegisterUserRequest:
      type: object
      properties:
        email:
          type: string
          format: email
        otp:
          type: string
          minLength: 6
          maxLength: 6
        shareToken:
          type: string
          description: Optional Sumsub share token for reusable KYC
      required:
        - email
        - otp
    RegisterUserSuccess:
      type: object
      properties:
        userId:
          type: string
          format: uuid
        accessToken:
          type: string
      required:
        - userId
        - accessToken
    ValidationOrError:
      anyOf:
        - $ref: '#/components/schemas/ValidationError'
        - $ref: '#/components/schemas/Error'
    Error:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
      required:
        - success
        - error
    ValidationError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            name:
              type: string
              enum:
                - ValidationError
            message:
              type: string
          required:
            - name
            - message
      required:
        - success
        - error

````