> ## Documentation Index
> Fetch the complete documentation index at: https://gnosispay-feat-v2-docs.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.

A wallet address may hold at most one user across all partners.

Failure codes carried in `error`: `INVALID_OTP` / `OTP_EXPIRED` (400),
`USER_ALREADY_EXISTS` / `USER_REGISTRATION_IN_PROGRESS` (409),
`PROFILE_CREATION_FAILED` (502), and `INTERNAL_ERROR` (500, returned on the
shared error response).



## 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:
  - url: https://core.prod.gnosispay.com/user-api
    description: Production
    variables: {}
  - url: https://core.sandbox.gnosispay.in/user-api
    description: Sandbox
    variables: {}
security: []
tags:
  - name: Auth
  - name: User
  - name: Terms
  - name: Source of Funds
  - name: Phone
  - name: User Account
  - name: Cards
  - name: User Movements
  - name: KYC
  - name: PCI
  - name: Health
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.


        A wallet address may hold at most one user across all partners.


        Failure codes carried in `error`: `INVALID_OTP` / `OTP_EXPIRED` (400),

        `USER_ALREADY_EXISTS` / `USER_REGISTRATION_IN_PROGRESS` (409),

        `PROFILE_CREATION_FAILED` (502), and `INTERNAL_ERROR` (500, returned on
        the

        shared error response).
      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: >-
            Conflict on registration. `error` is one of:

            - `USER_ALREADY_EXISTS` - the wallet address is already registered.
            A wallet

            may hold at most one user across all partners, so this is also
            returned

            when the address belongs to another partner. Terminal: do not retry.

            - `USER_REGISTRATION_IN_PROGRESS` - another in-flight request is
            registering this

            same wallet. Retryable: retrying once it settles either succeeds or

            returns `USER_ALREADY_EXISTS`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterUserConflict'
        '502':
          description: >-
            Upstream failure creating the KYC profile. `error` is

            `PROFILE_CREATION_FAILED`. The OTP is not consumed, so the request
            can be

            retried with the same code.
          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
      description: >-
        Conflict on registration. `error` is one of:

        - `USER_ALREADY_EXISTS` - the wallet address is already registered. A
        wallet

        may hold at most one user across all partners, so this is also returned

        when the address belongs to another partner. Terminal: do not retry.

        - `USER_REGISTRATION_IN_PROGRESS` - another in-flight request is
        registering this

        same wallet. Retryable: retrying once it settles either succeeds or

        returns `USER_ALREADY_EXISTS`.
    RegisterUserBadGateway:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
      description: >-
        Upstream failure creating the KYC profile. `error` is

        `PROFILE_CREATION_FAILED`. The OTP is not consumed, so the request can
        be

        retried with the same code.
    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

````