> ## 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. 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://core.prod.gnosispay.com/user-api/openapi.json post /user
openapi: 3.1.0
info:
  title: User Service
  version: 0.0.0
servers: []
security: []
tags:
  - name: Health
  - name: Auth
  - name: User
  - name: Cards
  - name: Phone
  - name: PCI
  - name: Terms
  - name: Source of Funds
paths:
  /user:
    post:
      tags:
        - User
      summary: Register User
      description: >-
        Register a new user with email OTP verification and create a profile.
        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.
      operationId: User_registerUser
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterUserRequest'
      responses:
        '201':
          description: >-
            The request has succeeded and a new resource has been created as a
            result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterUserSuccess'
        '400':
          description: >-
            Discriminated 400 body shared with the auth POST routes:
            `validation`

            (decoder / request constraints) or `business` (INVALID_OTP /
            OTP_EXPIRED).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthBadRequest'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
        '409':
          description: The request conflicts with the current state of the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterUserConflict'
        '502':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterUserBadGateway'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    RegisterUserRequest:
      type: object
      required:
        - email
        - otp
      properties:
        email:
          type: string
          format: email
        otp:
          type: string
          minLength: 6
          maxLength: 6
        shareToken:
          type: string
          description: Optional Sumsub share token for reusable KYC
    RegisterUserSuccess:
      type: object
      required:
        - userId
        - accessToken
      properties:
        userId:
          type: string
        accessToken:
          type: string
    AuthBadRequest:
      type: object
      oneOf:
        - $ref: '#/components/schemas/AuthValidationError'
        - $ref: '#/components/schemas/AuthBusinessError'
      discriminator:
        propertyName: kind
        mapping:
          validation:
            $ref: '#/components/schemas/AuthValidationError'
          business:
            $ref: '#/components/schemas/AuthBusinessError'
      description: >-
        Discriminated 400 body for auth POST routes. The `kind` field is
        additive

        and not a breaking change. Clients can keep reading `success` and
        `error`.
    Unauthorized:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    RegisterUserConflict:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    RegisterUserBadGateway:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    AuthValidationError:
      type: object
      required:
        - kind
        - success
        - error
      properties:
        kind:
          type: string
          enum:
            - validation
        success:
          type: boolean
          enum:
            - false
        error:
          $ref: '#/components/schemas/ValidationErrorDetail'
      description: Validation failure on auth routes (decoder / request constraints).
    AuthBusinessError:
      type: object
      required:
        - kind
        - success
        - error
      properties:
        kind:
          type: string
          enum:
            - business
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
      description: Domain/business failure on auth routes (returned by handlers).
    ValidationErrorDetail:
      type: object
      required:
        - name
        - message
      properties:
        name:
          type: string
          enum:
            - ValidationError
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````