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

# Create contact

> Create a new contact for the current user.



## OpenAPI

````yaml /openapi.json post /api/v1/user/contact
openapi: 3.1.0
info:
  title: HEVN API
  description: Backend API for HEVN mobile neobank
  version: 0.1.2
servers:
  - url: https://api.hevn.finance
    description: Production
security: []
paths:
  /api/v1/user/contact:
    post:
      tags:
        - User
      summary: Create contact
      description: Create a new contact for the current user.
      operationId: create_contact_api_v1_user_contact_post
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContactCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ContactCreateRequest:
      properties:
        name:
          type: string
          maxLength: 200
          minLength: 1
          title: Name
          default: ''
        currency:
          anyOf:
            - type: string
              maxLength: 4
              minLength: 3
            - type: 'null'
          title: Currency
          description: Currency override
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        crypto:
          anyOf:
            - $ref: '#/components/schemas/ContactCryptoInput'
            - type: 'null'
        account:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/OnchainAccountInput'
                - $ref: '#/components/schemas/EmailAccountInput'
                - $ref: '#/components/schemas/SepaAccountInput'
                - $ref: '#/components/schemas/SwiftAccountInput'
                - $ref: '#/components/schemas/AchAccountInput'
                - $ref: '#/components/schemas/UaeAccountInput'
            - type: 'null'
          title: Account
          description: Account details
        iban:
          anyOf:
            - $ref: '#/components/schemas/IBANAccountDetails-Input'
            - $ref: '#/components/schemas/USExternalAccountDetails-Input'
            - $ref: '#/components/schemas/SwiftAccountDetails-Input'
            - type: 'null'
          title: Iban
          description: Bank account details in the same format as /banks ibanData
        address:
          anyOf:
            - $ref: '#/components/schemas/UserAddress'
            - type: 'null'
        relationship:
          $ref: >-
            #/components/schemas/app__schemas__routers__user__contact__ContactRelationship
          default: external
      type: object
      title: ContactCreateRequest
      description: Request to create a contact.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ContactCryptoInput:
      properties:
        chain:
          $ref: '#/components/schemas/OneClickChain'
        token:
          type: string
          title: Token
        address:
          type: string
          title: Address
      type: object
      required:
        - chain
        - token
        - address
      title: ContactCryptoInput
      description: Crypto contact input.
    OnchainAccountInput:
      properties:
        accountType:
          type: string
          const: onchain
          title: Accounttype
          default: onchain
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        walletAddress:
          type: string
          title: Walletaddress
        chainId:
          $ref: '#/components/schemas/OneClickChain'
        currency:
          type: string
          title: Currency
      type: object
      required:
        - walletAddress
        - chainId
        - currency
      title: OnchainAccountInput
      description: Onchain wallet contact input.
    EmailAccountInput:
      properties:
        accountType:
          type: string
          const: email
          title: Accounttype
          default: email
        email:
          type: string
          title: Email
      type: object
      required:
        - email
      title: EmailAccountInput
      description: Email contact input.
    SepaAccountInput:
      properties:
        accountHolderType:
          $ref: '#/components/schemas/AlignAccountHolderType'
        accountHolderFirstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderfirstname
        accountHolderLastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderlastname
        accountHolderBusinessName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderbusinessname
        accountType:
          type: string
          const: sepa
          title: Accounttype
          default: sepa
        iban:
          type: string
          title: Iban
        bic:
          anyOf:
            - type: string
            - type: 'null'
          title: Bic
        country:
          type: string
          title: Country
        currency:
          type: string
          title: Currency
          default: EUR
        bankName:
          type: string
          title: Bankname
        relationship:
          anyOf:
            - $ref: '#/components/schemas/app__schemas__base__ContactRelationship'
            - type: 'null'
      type: object
      required:
        - accountHolderType
        - iban
        - country
        - bankName
      title: SepaAccountInput
      description: SEPA bank contact input.
    SwiftAccountInput:
      properties:
        accountHolderType:
          $ref: '#/components/schemas/AlignAccountHolderType'
        accountHolderFirstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderfirstname
        accountHolderLastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderlastname
        accountHolderBusinessName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderbusinessname
        accountType:
          type: string
          const: swift
          title: Accounttype
          default: swift
        bic:
          type: string
          title: Bic
        bankName:
          type: string
          title: Bankname
        accountNumber:
          type: string
          title: Accountnumber
        country:
          type: string
          title: Country
        currency:
          type: string
          title: Currency
          default: USD
        bankAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Bankaddress
        routingNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Routingnumber
        relationship:
          anyOf:
            - $ref: '#/components/schemas/app__schemas__base__ContactRelationship'
            - type: 'null'
      type: object
      required:
        - accountHolderType
        - bic
        - bankName
        - accountNumber
        - country
      title: SwiftAccountInput
      description: SWIFT bank contact input.
    AchAccountInput:
      properties:
        accountHolderType:
          $ref: '#/components/schemas/AlignAccountHolderType'
        accountHolderFirstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderfirstname
        accountHolderLastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderlastname
        accountHolderBusinessName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderbusinessname
        accountType:
          type: string
          enum:
            - ach
            - fedwire
          title: Accounttype
          default: ach
        bankName:
          type: string
          title: Bankname
          default: ''
        accountNumber:
          type: string
          title: Accountnumber
        routingNumber:
          type: string
          title: Routingnumber
        country:
          type: string
          title: Country
        currency:
          type: string
          title: Currency
          default: USD
        relationship:
          anyOf:
            - $ref: '#/components/schemas/app__schemas__base__ContactRelationship'
            - type: 'null'
          default: resident_transfer_between_accounts
      type: object
      required:
        - accountHolderType
        - accountNumber
        - routingNumber
        - country
      title: AchAccountInput
      description: ACH bank contact input.
    UaeAccountInput:
      properties:
        accountHolderType:
          $ref: '#/components/schemas/AlignAccountHolderType'
        accountHolderFirstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderfirstname
        accountHolderLastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderlastname
        accountHolderBusinessName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderbusinessname
        accountType:
          type: string
          const: uaefts
          title: Accounttype
          default: uaefts
        bankName:
          type: string
          title: Bankname
        currency:
          type: string
          title: Currency
          default: AED
        accountHolderAddress:
          anyOf:
            - $ref: '#/components/schemas/UserAddress'
            - type: 'null'
        ibanNumber:
          type: string
          title: Ibannumber
        bic:
          anyOf:
            - type: string
            - type: 'null'
          title: Bic
        relationship:
          anyOf:
            - $ref: '#/components/schemas/app__schemas__base__ContactRelationship'
            - type: 'null'
      type: object
      required:
        - accountHolderType
        - bankName
        - ibanNumber
      title: UaeAccountInput
      description: UAE FTS bank contact input.
    IBANAccountDetails-Input:
      properties:
        bankName:
          type: string
          title: Bankname
        bankAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Bankaddress
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        accountHolderType:
          $ref: '#/components/schemas/AlignAccountHolderType'
        accountHolderFirstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderfirstname
        accountHolderLastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderlastname
        accountHolderBusinessName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderbusinessname
        accountHolderAddress:
          anyOf:
            - $ref: '#/components/schemas/UserAddress'
            - type: 'null'
        relationship:
          anyOf:
            - $ref: '#/components/schemas/app__schemas__base__ContactRelationship'
            - type: 'null'
        paymentReference:
          anyOf:
            - type: string
            - type: 'null'
          title: Paymentreference
        accountType:
          type: string
          enum:
            - sepa
            - uaefts
          title: Accounttype
          default: sepa
        ibanNumber:
          type: string
          title: Ibannumber
        bic:
          anyOf:
            - type: string
            - type: 'null'
          title: Bic
      type: object
      required:
        - bankName
        - accountHolderType
        - ibanNumber
      title: IBANAccountDetails
      description: IBAN (SEPA) external account.
    USExternalAccountDetails-Input:
      properties:
        bankName:
          type: string
          title: Bankname
        bankAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Bankaddress
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        accountHolderType:
          $ref: '#/components/schemas/AlignAccountHolderType'
        accountHolderFirstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderfirstname
        accountHolderLastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderlastname
        accountHolderBusinessName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderbusinessname
        accountHolderAddress:
          anyOf:
            - $ref: '#/components/schemas/UserAddress'
            - type: 'null'
        relationship:
          anyOf:
            - $ref: '#/components/schemas/app__schemas__base__ContactRelationship'
            - type: 'null'
        paymentReference:
          anyOf:
            - type: string
            - type: 'null'
          title: Paymentreference
        accountType:
          type: string
          enum:
            - ach
            - fedwire
          title: Accounttype
          default: ach
        us:
          $ref: '#/components/schemas/USAccountDetails'
      type: object
      required:
        - bankName
        - accountHolderType
        - us
      title: USExternalAccountDetails
      description: US domestic (ACH) external account.
    SwiftAccountDetails-Input:
      properties:
        bankName:
          type: string
          title: Bankname
        bankAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Bankaddress
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        accountHolderType:
          $ref: '#/components/schemas/AlignAccountHolderType'
        accountHolderFirstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderfirstname
        accountHolderLastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderlastname
        accountHolderBusinessName:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountholderbusinessname
        accountHolderAddress:
          anyOf:
            - $ref: '#/components/schemas/UserAddress'
            - type: 'null'
        relationship:
          anyOf:
            - $ref: '#/components/schemas/app__schemas__base__ContactRelationship'
            - type: 'null'
        paymentReference:
          anyOf:
            - type: string
            - type: 'null'
          title: Paymentreference
        accountType:
          type: string
          const: swift
          title: Accounttype
          default: swift
        swift:
          $ref: '#/components/schemas/SwiftDetails'
      type: object
      required:
        - bankName
        - accountHolderType
        - swift
      title: SwiftAccountDetails
      description: SWIFT (international wire) external account.
    UserAddress:
      properties:
        streetAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Streetaddress
        addressLine2:
          anyOf:
            - type: string
            - type: 'null'
          title: Addressline2
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
        country:
          anyOf:
            - $ref: '#/components/schemas/CountryCode'
            - type: 'null'
        zip:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip
      type: object
      title: UserAddress
      description: >-
        Address schema for user.


        Canonical field names: street_address, address_line_2, city, state,
        country, zip.

        Accepts legacy Align/IBAN field names (street_line_1, street_line_2,
        postal_code)

        for backward compatibility with existing JSONB data.
    app__schemas__routers__user__contact__ContactRelationship:
      type: string
      enum:
        - self
        - external
      title: ContactRelationship
      description: Relationship between the current user and the contact.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    OneClickChain:
      type: string
      enum:
        - eth
        - bsc
        - avax
        - op
        - arb
        - pol
        - sol
        - base
        - gnosis
        - tron
        - xrp
        - zec
        - doge
        - ltc
        - btc
        - cardano
        - bera
        - sui
        - near
        - near_intents
        - xlayer
        - plasma
        - ton
        - stellar
        - monad
        - starknet
        - aptos
        - adi
        - bch
      title: OneClickChain
      description: 1click chain codes.
    AlignAccountHolderType:
      type: string
      enum:
        - individual
        - business
      title: AlignAccountHolderType
      description: Account holder type.
    app__schemas__base__ContactRelationship:
      type: string
      enum:
        - charity
        - commercial_investment
        - corporate_card
        - credit_card
        - dividend
        - family
        - financial_services
        - good_sold
        - goods_bought
        - government
        - insurance
        - intergroup_transfer
        - intra_group_dividends
        - information_technology
        - leasing
        - loan_charges
        - merchant_settlement
        - mobile_wallet
        - none
        - non_resident_transfer_between_accounts
        - pension
        - personal_expenses
        - prepaid_cards
        - professional
        - rental
        - resident_transfer_between_accounts
        - salaries
        - telecommunications
        - travel
        - utility_bill
      title: ContactRelationship
      description: >-
        Unified contact relationship / transfer purpose.


        Values match Align AlignTransferPurpose (the more granular set).

        Mapped to Swipelux AccountHolderRelationship via
        ``swipelux_relationship``.
    USAccountDetails:
      properties:
        accountNumber:
          type: string
          title: Accountnumber
        routingNumber:
          type: string
          title: Routingnumber
      type: object
      required:
        - accountNumber
        - routingNumber
      title: USAccountDetails
      description: US domestic account details (ACH).
    SwiftDetails:
      properties:
        accountNumber:
          type: string
          title: Accountnumber
        routingNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Routingnumber
        bic:
          type: string
          title: Bic
      type: object
      required:
        - accountNumber
        - bic
      title: SwiftDetails
      description: SWIFT (international wire) account details.
    CountryCode:
      type: string
      enum:
        - AF
        - AX
        - AL
        - DZ
        - AS
        - AD
        - AO
        - AI
        - AQ
        - AG
        - AR
        - AM
        - AW
        - AU
        - AT
        - AZ
        - BS
        - BH
        - BD
        - BB
        - BY
        - BE
        - BZ
        - BJ
        - BM
        - BT
        - BO
        - BQ
        - BA
        - BW
        - BV
        - BR
        - IO
        - BN
        - BG
        - BF
        - BI
        - CV
        - KH
        - CM
        - CA
        - KY
        - CF
        - TD
        - CL
        - CN
        - CX
        - CC
        - CO
        - KM
        - CG
        - CD
        - CK
        - CR
        - CI
        - HR
        - CU
        - 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
        - HM
        - VA
        - HN
        - HK
        - HU
        - IS
        - IN
        - ID
        - IR
        - IQ
        - IE
        - IM
        - IL
        - IT
        - JM
        - JP
        - JE
        - JO
        - KZ
        - KE
        - KI
        - KP
        - KR
        - KW
        - KG
        - LA
        - LV
        - LB
        - LS
        - LR
        - LY
        - LI
        - LT
        - LU
        - MO
        - MG
        - MW
        - MY
        - MV
        - ML
        - MT
        - MH
        - MQ
        - MR
        - MU
        - YT
        - MX
        - FM
        - MD
        - MC
        - MN
        - ME
        - MS
        - MA
        - MZ
        - MM
        - NA
        - NR
        - NP
        - NL
        - NC
        - NZ
        - NI
        - NE
        - NG
        - NU
        - NF
        - MK
        - MP
        - 'NO'
        - OM
        - PK
        - PW
        - PS
        - PA
        - PG
        - PY
        - PE
        - PH
        - PN
        - PL
        - PT
        - PR
        - QA
        - RE
        - RO
        - RU
        - RW
        - BL
        - SH
        - KN
        - LC
        - MF
        - PM
        - VC
        - WS
        - SM
        - ST
        - SA
        - SN
        - RS
        - SC
        - SL
        - SG
        - SX
        - SK
        - SI
        - SB
        - SO
        - ZA
        - GS
        - SS
        - ES
        - LK
        - SD
        - SR
        - SJ
        - SE
        - CH
        - SY
        - TW
        - TJ
        - TZ
        - TH
        - TL
        - TG
        - TK
        - TO
        - TT
        - TN
        - TR
        - TM
        - TC
        - TV
        - UG
        - UA
        - AE
        - GB
        - US
        - UM
        - UY
        - UZ
        - VU
        - VE
        - VN
        - VG
        - VI
        - WF
        - EH
        - YE
        - ZM
        - ZW
      title: CountryCode
      description: ISO 3166-1 alpha-2 country codes.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      x-default: Bearer <token>

````