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

# Create a new User account

> Creates a new User account in the system. The email must be unique across all Users.
    Returns the created User object with all fields except the password.
    
    Note: If billingDetails are provided, ensure the countryCode is valid and postalCode is included for required countries.



## OpenAPI

````yaml /api-reference/api-docs.yaml post /v0/users/create
openapi: 3.1.0
info:
  title: Fungies API v0
  version: 0.3.5
servers:
  - url: https://api.fungies.io
security: []
tags:
  - name: discounts
    description: Discounts related endpoints
  - name: keys
    description: Offer product keys related endpoints
  - name: orders
    description: Orders related endpoints
  - name: payments
    description: Payments related endpoints
  - name: offers
    description: Offers related endpoints
  - name: products
    description: Products related endpoints
  - name: subscriptions
    description: Subscriptions related endpoints
  - name: users
    description: Users related endpoints
  - name: variants
    description: Product variants related endpoints
  - name: plans
    description: Product plans related endpoints
  - name: elements
    description: Elements related endpoints
paths:
  /v0/users/create:
    post:
      tags:
        - users
      summary: Create a new User account
      description: >-
        Creates a new User account in the system. The email must be unique
        across all Users.
            Returns the created User object with all fields except the password.
            
            Note: If billingDetails are provided, ensure the countryCode is valid and postalCode is included for required countries.
      operationId: PostV0UsersCreate
      requestBody:
        description: POST /v0/users/create Request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostV0UsersCreateRequestBody'
      responses:
        '200':
          description: POST /v0/users/create Positive response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostV0UsersCreatePositiveResponse'
        '400':
          description: POST /v0/users/create Negative response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostV0UsersCreateNegativeResponse'
              examples:
                example1:
                  value:
                    status: error
                    error:
                      message: Sample error message
      security:
        - APIKEY_1: []
          APIKEY_2: []
components:
  schemas:
    PostV0UsersCreateRequestBody:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Email of the user.
          examples:
            - test@example.com
        password:
          type:
            - string
            - 'null'
          minLength: 8
          maxLength: 72
          pattern: '[!"#$%&''()*+,-./:;<=>?@[\\\]^_`{|}~0-9]'
          description: |-
            User password used for logging in to the Store application.
              Password must contain at least one special character, one number and one uppercase letter.
              Password must be between 8 and 72 characters long.
          examples:
            - Password123!
        username:
          type:
            - string
            - 'null'
          minLength: 1
          description: Username of the User.
          examples:
            - test-user
        internalId:
          type:
            - string
            - 'null'
          minLength: 1
          description: |-
            A custom identifier for external system integration. This ID:
                    - Can be used to link users with external systems
                    - Will be included in all webhook notifications
                    - Is optional but recommended for system integration
          examples:
            - abcd-1234-5678-90ab-cdef-1234-5678-90ab
        billingDetails:
          type: object
          properties:
            type:
              type: string
              enum:
                - individual
                - company
            countryCode:
              type: string
              enum:
                - AF
                - AX
                - AL
                - DZ
                - AD
                - AO
                - AI
                - AQ
                - AG
                - AR
                - AM
                - AW
                - AU
                - AT
                - AZ
                - BS
                - BH
                - BD
                - BB
                - BY
                - BE
                - BZ
                - BJ
                - BM
                - BT
                - BO
                - BA
                - BW
                - BV
                - BR
                - IO
                - VG
                - BN
                - BG
                - BF
                - BI
                - KH
                - CM
                - CA
                - CV
                - BQ
                - KY
                - CF
                - TD
                - CL
                - CN
                - CO
                - KM
                - CG
                - CD
                - CK
                - CR
                - CI
                - HR
                - CW
                - CY
                - CZ
                - DK
                - DJ
                - DM
                - DO
                - EC
                - EG
                - SV
                - GQ
                - ER
                - EE
                - SZ
                - ET
                - FK
                - FO
                - FJ
                - FI
                - FR
                - GF
                - PF
                - TF
                - GA
                - GM
                - GE
                - DE
                - GH
                - GI
                - GR
                - GL
                - GD
                - GP
                - GU
                - GT
                - GG
                - GN
                - GW
                - GY
                - HT
                - HN
                - HK
                - HU
                - IS
                - IN
                - ID
                - IQ
                - IE
                - IM
                - IL
                - IT
                - JM
                - JP
                - JE
                - JO
                - KZ
                - KE
                - KI
                - XK
                - KW
                - KG
                - LA
                - LV
                - LB
                - LS
                - LR
                - LY
                - LI
                - LT
                - LU
                - MO
                - MG
                - MW
                - MY
                - MV
                - ML
                - MT
                - MQ
                - MR
                - MU
                - YT
                - MX
                - MD
                - MC
                - MN
                - ME
                - MS
                - MA
                - MZ
                - MM
                - NA
                - NR
                - NP
                - NL
                - NC
                - NZ
                - NI
                - NE
                - NG
                - NU
                - MK
                - 'NO'
                - OM
                - PK
                - PS
                - PA
                - PG
                - PY
                - PE
                - PH
                - PN
                - PL
                - PT
                - PR
                - QA
                - RE
                - RO
                - RU
                - RW
                - WS
                - SM
                - ST
                - SA
                - SN
                - RS
                - SC
                - SL
                - SG
                - SX
                - SK
                - SI
                - SB
                - SO
                - ZA
                - GS
                - KR
                - SS
                - ES
                - LK
                - BL
                - SH
                - KN
                - LC
                - MF
                - PM
                - VC
                - SD
                - SR
                - SJ
                - SE
                - CH
                - TW
                - TJ
                - TZ
                - TH
                - TL
                - TG
                - TK
                - TO
                - TT
                - TN
                - TR
                - TM
                - TC
                - TV
                - UG
                - UA
                - AE
                - GB
                - US
                - UY
                - UZ
                - VU
                - VA
                - VE
                - VN
                - WF
                - EH
                - YE
                - ZM
                - ZW
            firstName:
              type: string
              minLength: 1
            lastName:
              type: string
              minLength: 1
            companyName:
              type: string
              minLength: 1
            dialCode:
              type: string
              minLength: 1
            phoneNumber:
              type: string
              minLength: 1
            address:
              type: string
              minLength: 1
            addressLine2:
              type: string
              minLength: 1
            city:
              type: string
              minLength: 1
            postalCode:
              type: string
              minLength: 1
            state:
              type: string
              minLength: 1
            taxId:
              type: string
              enum:
                - al_tin_albania
                - ad_nrt_andorra
                - ao_tin_angola
                - ar_cuit_argentina
                - am_tin_armenia
                - aw_tin_aruba
                - au_abn_australia
                - au_arn_australia
                - eu_vat_austria
                - az_tin_azerbaijan
                - bs_tin_bahamas
                - bh_vat_bahrain
                - bd_bin_bangladesh
                - bb_tin_barbados
                - by_tin_belarus
                - eu_vat_belgium
                - bj_ifu_benin
                - bo_tin_bolivia
                - ba_tin_bosnia_and_herzegovina
                - br_cnpj_brazil
                - br_cpf_brazil
                - bg_uic_bulgaria
                - eu_vat_bulgaria
                - bf_ifu_burkina_faso
                - kh_tin_cambodia
                - cm_niu_cameroon
                - ca_bn_canada
                - ca_gst_hst_canada
                - ca_pst_bc_canada
                - ca_pst_mb_canada
                - ca_pst_sk_canada
                - ca_qst_canada
                - cv_nif_cape_verde
                - cl_tin_chile
                - cn_tin_china
                - co_nit_colombia
                - cd_nif_congo_kinshasa
                - cr_tin_costa_rica
                - eu_vat_croatia
                - hr_oib_croatia
                - eu_vat_cyprus
                - eu_vat_czech_republic
                - eu_vat_denmark
                - do_rcn_dominican_republic
                - ec_ruc_ecuador
                - eg_tin_egypt
                - sv_nit_el_salvador
                - eu_vat_estonia
                - et_tin_ethiopia
                - eu_oss_vat_eu
                - eu_vat_finland
                - eu_vat_france
                - ge_vat_georgia
                - de_stn_germany
                - eu_vat_germany
                - eu_vat_greece
                - gn_nif_guinea
                - hk_br_hong_kong
                - eu_vat_hungary
                - hu_tin_hungary
                - is_vat_iceland
                - in_gst_india
                - id_npwp_indonesia
                - eu_vat_ireland
                - il_vat_israel
                - eu_vat_italy
                - jp_cn_japan
                - jp_rn_japan
                - jp_trn_japan
                - kz_bin_kazakhstan
                - ke_pin_kenya
                - kg_tin_kyrgyzstan
                - la_tin_laos
                - eu_vat_latvia
                - li_uid_liechtenstein
                - li_vat_liechtenstein
                - eu_vat_lithuania
                - eu_vat_luxembourg
                - my_frp_malaysia
                - my_itn_malaysia
                - my_sst_malaysia
                - eu_vat_malta
                - mr_nif_mauritania
                - mx_rfc_mexico
                - md_vat_moldova
                - me_pib_montenegro
                - ma_vat_morocco
                - np_pan_nepal
                - eu_vat_netherlands
                - nz_gst_new_zealand
                - ng_tin_nigeria
                - mk_vat_macedonia
                - no_vat_norway
                - no_voec_norway
                - om_vat_oman
                - pe_ruc_peru
                - ph_tin_philippines
                - eu_vat_poland
                - pl_nip_poland
                - eu_vat_portugal
                - eu_vat_romania
                - ro_tin_romania
                - ru_inn_russia
                - ru_kpp_russia
                - sa_vat_saudi_arabia
                - sn_ninea_senegal
                - rs_pib_serbia
                - sg_gst_singapore
                - sg_uen_singapore
                - eu_vat_slovakia
                - eu_vat_slovenia
                - si_tin_slovenia
                - za_vat_south_africa
                - kr_brn_south_korea
                - es_cif_spain
                - eu_vat_spain
                - lk_vat_sri_lanka
                - sr_fin_suriname
                - eu_vat_sweden
                - ch_uid_switzerland
                - ch_vat_switzerland
                - tw_vat_taiwan
                - tj_tin_tajikistan
                - tz_vat_tanzania
                - th_vat_thailand
                - tr_tin_turkey
                - ug_tin_uganda
                - ua_vat_ukraine
                - ae_trn_united_arab_emirates
                - eu_vat_united_kingdom
                - gb_vat_united_kingdom
                - us_ein_united_states
                - uy_ruc_uruguay
                - uz_tin_uzbekistan
                - uz_vat_uzbekistan
                - ve_rif_venezuela
                - vn_tin_vietnam
                - zm_tin_zambia
                - zw_tin_zimbabwe
            taxNumber:
              type: string
          description: |-
            Billing information used for payments and invoices.
              Following fields are required for the payments:
                - countryCode: ISO 3166-1 alpha-2 country code (e.g., "US", "GB")
                - postalCode: Required for specific countries (US, CA, UA, IN)
                
                For company accounts, set type to "company" and provide companyName, taxId and taxNumber.
                These fields will appear on generated invoices.
                
                All other fields are optional but recommended for a complete billing profile.
          examples:
            - type: company
              companyName: Acme Sp. z o.o.
              taxId: eu_vat_poland
              taxNumber: PL1234567890
              countryCode: PL
              firstName: Jan
              lastName: Kowalski
              dialCode: '+48'
              phoneNumber: '123456789'
              address: ul. Marszałkowska 1
              addressLine2: lok. 10
              city: Warsaw
              postalCode: 00-001
        paymentData:
          type: object
          properties:
            stripeCustomerId:
              type: string
            paypalCustomerId:
              type: string
          description: >-
            Pre-existing payment provider (Stripe/Paypal) customer IDs. Only
            provide this if:
                - You're migrating users from another system
                - You want to link existing Stripe/PayPal customers
                - You need to preserve payment history in provider's system
                
                This is typically handled automatically during the first payment.
          examples:
            - stripeCustomerId: cus_QzHuLRwfKfp2WX
              paypalCustomerId: KCE4828GQ37LL
      required:
        - email
    PostV0UsersCreatePositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: success
        data:
          type: object
          properties:
            user:
              type: object
              properties:
                object:
                  type: string
                  enum:
                    - user
                  default: user
                  description: Object type identifier. Always 'user' for user objects.
                id:
                  type: string
                  format: uuid
                  description: Unique identifier (UUID) for this user.
                username:
                  type:
                    - string
                    - 'null'
                  default: null
                  description: Username of the user, if set.
                email:
                  type:
                    - string
                    - 'null'
                  format: email
                  default: null
                details:
                  type:
                    - object
                    - 'null'
                  properties:
                    firstName:
                      type:
                        - string
                        - 'null'
                      default: null
                    lastName:
                      type:
                        - string
                        - 'null'
                      default: null
                    dialCode:
                      type:
                        - string
                        - 'null'
                      default: null
                    phoneNumber:
                      type:
                        - string
                        - 'null'
                      default: null
                    taxId:
                      type:
                        - string
                        - 'null'
                      enum:
                        - al_tin_albania
                        - ad_nrt_andorra
                        - ao_tin_angola
                        - ar_cuit_argentina
                        - am_tin_armenia
                        - aw_tin_aruba
                        - au_abn_australia
                        - au_arn_australia
                        - eu_vat_austria
                        - az_tin_azerbaijan
                        - bs_tin_bahamas
                        - bh_vat_bahrain
                        - bd_bin_bangladesh
                        - bb_tin_barbados
                        - by_tin_belarus
                        - eu_vat_belgium
                        - bj_ifu_benin
                        - bo_tin_bolivia
                        - ba_tin_bosnia_and_herzegovina
                        - br_cnpj_brazil
                        - br_cpf_brazil
                        - bg_uic_bulgaria
                        - eu_vat_bulgaria
                        - bf_ifu_burkina_faso
                        - kh_tin_cambodia
                        - cm_niu_cameroon
                        - ca_bn_canada
                        - ca_gst_hst_canada
                        - ca_pst_bc_canada
                        - ca_pst_mb_canada
                        - ca_pst_sk_canada
                        - ca_qst_canada
                        - cv_nif_cape_verde
                        - cl_tin_chile
                        - cn_tin_china
                        - co_nit_colombia
                        - cd_nif_congo_kinshasa
                        - cr_tin_costa_rica
                        - eu_vat_croatia
                        - hr_oib_croatia
                        - eu_vat_cyprus
                        - eu_vat_czech_republic
                        - eu_vat_denmark
                        - do_rcn_dominican_republic
                        - ec_ruc_ecuador
                        - eg_tin_egypt
                        - sv_nit_el_salvador
                        - eu_vat_estonia
                        - et_tin_ethiopia
                        - eu_oss_vat_eu
                        - eu_vat_finland
                        - eu_vat_france
                        - ge_vat_georgia
                        - de_stn_germany
                        - eu_vat_germany
                        - eu_vat_greece
                        - gn_nif_guinea
                        - hk_br_hong_kong
                        - eu_vat_hungary
                        - hu_tin_hungary
                        - is_vat_iceland
                        - in_gst_india
                        - id_npwp_indonesia
                        - eu_vat_ireland
                        - il_vat_israel
                        - eu_vat_italy
                        - jp_cn_japan
                        - jp_rn_japan
                        - jp_trn_japan
                        - kz_bin_kazakhstan
                        - ke_pin_kenya
                        - kg_tin_kyrgyzstan
                        - la_tin_laos
                        - eu_vat_latvia
                        - li_uid_liechtenstein
                        - li_vat_liechtenstein
                        - eu_vat_lithuania
                        - eu_vat_luxembourg
                        - my_frp_malaysia
                        - my_itn_malaysia
                        - my_sst_malaysia
                        - eu_vat_malta
                        - mr_nif_mauritania
                        - mx_rfc_mexico
                        - md_vat_moldova
                        - me_pib_montenegro
                        - ma_vat_morocco
                        - np_pan_nepal
                        - eu_vat_netherlands
                        - nz_gst_new_zealand
                        - ng_tin_nigeria
                        - mk_vat_macedonia
                        - no_vat_norway
                        - no_voec_norway
                        - om_vat_oman
                        - pe_ruc_peru
                        - ph_tin_philippines
                        - eu_vat_poland
                        - pl_nip_poland
                        - eu_vat_portugal
                        - eu_vat_romania
                        - ro_tin_romania
                        - ru_inn_russia
                        - ru_kpp_russia
                        - sa_vat_saudi_arabia
                        - sn_ninea_senegal
                        - rs_pib_serbia
                        - sg_gst_singapore
                        - sg_uen_singapore
                        - eu_vat_slovakia
                        - eu_vat_slovenia
                        - si_tin_slovenia
                        - za_vat_south_africa
                        - kr_brn_south_korea
                        - es_cif_spain
                        - eu_vat_spain
                        - lk_vat_sri_lanka
                        - sr_fin_suriname
                        - eu_vat_sweden
                        - ch_uid_switzerland
                        - ch_vat_switzerland
                        - tw_vat_taiwan
                        - tj_tin_tajikistan
                        - tz_vat_tanzania
                        - th_vat_thailand
                        - tr_tin_turkey
                        - ug_tin_uganda
                        - ua_vat_ukraine
                        - ae_trn_united_arab_emirates
                        - eu_vat_united_kingdom
                        - gb_vat_united_kingdom
                        - us_ein_united_states
                        - uy_ruc_uruguay
                        - uz_tin_uzbekistan
                        - uz_vat_uzbekistan
                        - ve_rif_venezuela
                        - vn_tin_vietnam
                        - zm_tin_zambia
                        - zw_tin_zimbabwe
                      default: null
                    taxNumber:
                      type:
                        - string
                        - 'null'
                      default: null
                    type:
                      type:
                        - string
                        - 'null'
                      enum:
                        - individual
                        - company
                      default: null
                    address:
                      type:
                        - string
                        - 'null'
                      default: null
                    addressLine2:
                      type:
                        - string
                        - 'null'
                      default: null
                    city:
                      type:
                        - string
                        - 'null'
                      default: null
                    postalCode:
                      type:
                        - string
                        - 'null'
                      default: null
                    companyName:
                      type:
                        - string
                        - 'null'
                      default: null
                    countryCode:
                      type:
                        - string
                        - 'null'
                      enum:
                        - AF
                        - AX
                        - AL
                        - DZ
                        - AD
                        - AO
                        - AI
                        - AQ
                        - AG
                        - AR
                        - AM
                        - AW
                        - AU
                        - AT
                        - AZ
                        - BS
                        - BH
                        - BD
                        - BB
                        - BY
                        - BE
                        - BZ
                        - BJ
                        - BM
                        - BT
                        - BO
                        - BA
                        - BW
                        - BV
                        - BR
                        - IO
                        - VG
                        - BN
                        - BG
                        - BF
                        - BI
                        - KH
                        - CM
                        - CA
                        - CV
                        - BQ
                        - KY
                        - CF
                        - TD
                        - CL
                        - CN
                        - CO
                        - KM
                        - CG
                        - CD
                        - CK
                        - CR
                        - CI
                        - HR
                        - CW
                        - CY
                        - CZ
                        - DK
                        - DJ
                        - DM
                        - DO
                        - EC
                        - EG
                        - SV
                        - GQ
                        - ER
                        - EE
                        - SZ
                        - ET
                        - FK
                        - FO
                        - FJ
                        - FI
                        - FR
                        - GF
                        - PF
                        - TF
                        - GA
                        - GM
                        - GE
                        - DE
                        - GH
                        - GI
                        - GR
                        - GL
                        - GD
                        - GP
                        - GU
                        - GT
                        - GG
                        - GN
                        - GW
                        - GY
                        - HT
                        - HN
                        - HK
                        - HU
                        - IS
                        - IN
                        - ID
                        - IQ
                        - IE
                        - IM
                        - IL
                        - IT
                        - JM
                        - JP
                        - JE
                        - JO
                        - KZ
                        - KE
                        - KI
                        - XK
                        - KW
                        - KG
                        - LA
                        - LV
                        - LB
                        - LS
                        - LR
                        - LY
                        - LI
                        - LT
                        - LU
                        - MO
                        - MG
                        - MW
                        - MY
                        - MV
                        - ML
                        - MT
                        - MQ
                        - MR
                        - MU
                        - YT
                        - MX
                        - MD
                        - MC
                        - MN
                        - ME
                        - MS
                        - MA
                        - MZ
                        - MM
                        - NA
                        - NR
                        - NP
                        - NL
                        - NC
                        - NZ
                        - NI
                        - NE
                        - NG
                        - NU
                        - MK
                        - 'NO'
                        - OM
                        - PK
                        - PS
                        - PA
                        - PG
                        - PY
                        - PE
                        - PH
                        - PN
                        - PL
                        - PT
                        - PR
                        - QA
                        - RE
                        - RO
                        - RU
                        - RW
                        - WS
                        - SM
                        - ST
                        - SA
                        - SN
                        - RS
                        - SC
                        - SL
                        - SG
                        - SX
                        - SK
                        - SI
                        - SB
                        - SO
                        - ZA
                        - GS
                        - KR
                        - SS
                        - ES
                        - LK
                        - BL
                        - SH
                        - KN
                        - LC
                        - MF
                        - PM
                        - VC
                        - SD
                        - SR
                        - SJ
                        - SE
                        - CH
                        - TW
                        - TJ
                        - TZ
                        - TH
                        - TL
                        - TG
                        - TK
                        - TO
                        - TT
                        - TN
                        - TR
                        - TM
                        - TC
                        - TV
                        - UG
                        - UA
                        - AE
                        - GB
                        - US
                        - UY
                        - UZ
                        - VU
                        - VA
                        - VE
                        - VN
                        - WF
                        - EH
                        - YE
                        - ZM
                        - ZW
                      default: null
                    state:
                      type:
                        - string
                        - 'null'
                      default: null
                  default: null
                internalId:
                  type:
                    - string
                    - 'null'
                  default: null
              required:
                - id
          required:
            - user
      required:
        - status
        - data
    PostV0UsersCreateNegativeResponse:
      type: object
      properties:
        status:
          type: string
          const: error
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - status
        - error
  securitySchemes:
    APIKEY_1:
      type: apiKey
      in: header
      name: x-fngs-public-key
    APIKEY_2:
      type: apiKey
      in: header
      name: x-fngs-secret-key

````