> ## 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.

# Save KYB draft

> Save KYB draft data locally. Documents must be uploaded separately via POST /kyb/draft/documents.



## OpenAPI

````yaml /openapi.json put /api/v1/kyb/b2b/kyb/draft
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/kyb/b2b/kyb/draft:
    put:
      tags:
        - B2B
        - kyb
      summary: Save KYB draft
      description: >-
        Save KYB draft data locally. Documents must be uploaded separately via
        POST /kyb/draft/documents.
      operationId: save_kyb_draft_package_alias_api_v1_kyb_b2b_kyb_draft_put
      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/KybDraftRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    KybDraftRequest:
      properties:
        businessData:
          anyOf:
            - $ref: '#/components/schemas/BusinessUserCreateRequest-Input'
            - type: 'null'
        documentIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Documentids
        shareholders:
          anyOf:
            - items:
                $ref: '#/components/schemas/FiatShareholder'
              type: array
            - type: 'null'
          title: Shareholders
      type: object
      title: KybDraftRequest
      description: >-
        Draft request. Documents are uploaded separately via POST
        /kyb/draft/documents.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BusinessUserCreateRequest-Input:
      properties:
        phone:
          anyOf:
            - type: string
              maxLength: 20
            - type: 'null'
          title: Phone
        contactInfo:
          anyOf:
            - type: string
            - type: 'null'
          title: Contactinfo
        jurisdiction:
          anyOf:
            - $ref: '#/components/schemas/CountryCode'
            - type: 'null'
        entityType:
          anyOf:
            - $ref: '#/components/schemas/FiatEntityType'
            - type: 'null'
        entityTypeDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Entitytypedescription
        entityName:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Entityname
        tradeName:
          anyOf:
            - type: string
            - type: 'null'
          title: Tradename
        registrationNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Registrationnumber
        incorporationDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Incorporationdate
        taxNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Taxnumber
        businessDescription:
          anyOf:
            - type: string
              minLength: 10
            - type: 'null'
          title: Businessdescription
        businessType:
          anyOf:
            - $ref: '#/components/schemas/FiatBusinessType'
            - type: 'null'
        verifierRole:
          anyOf:
            - $ref: '#/components/schemas/FiatVerifierRole'
            - type: 'null'
        businessTypeDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Businesstypedescription
        websites:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Websites
        phoneNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Phonenumber
        address:
          anyOf:
            - $ref: '#/components/schemas/FiatBusinessAddress'
            - type: 'null'
        sourceOfFunds:
          anyOf:
            - $ref: '#/components/schemas/FiatSourceOfFunds'
            - type: 'null'
        sourceOfFundDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceoffunddescription
        expectedMonthlyVolumeUsd:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Expectedmonthlyvolumeusd
        purposeOfFunds:
          anyOf:
            - $ref: '#/components/schemas/FiatPurposeOfFunds'
            - type: 'null'
        purposeOfFundsDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Purposeoffundsdescription
        flowOfFundsDescription:
          anyOf:
            - type: string
              minLength: 10
            - type: 'null'
          title: Flowoffundsdescription
        sanctionedCountryOperations:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Sanctionedcountryoperations
        highRiskActivities:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Highriskactivities
        operatingCountries:
          anyOf:
            - items:
                $ref: '#/components/schemas/CountryCode'
              type: array
            - type: 'null'
          title: Operatingcountries
        handlesCustomerFunds:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Handlescustomerfunds
        complianceScreeningDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Compliancescreeningdescription
        estimatedAnnualRevenue:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          title: Estimatedannualrevenue
        depositMethods:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Depositmethods
      type: object
      title: BusinessUserCreateRequest
      description: >-
        Request schema for creating/updating a business user (all fields
        optional for partial updates).
    FiatShareholder:
      properties:
        localId:
          type: string
          title: Localid
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
        birthDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Birthdate
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        taxId:
          anyOf:
            - type: string
            - type: 'null'
          title: Taxid
        ownershipPercentage:
          anyOf:
            - type: number
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Ownershippercentage
        hasControl:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Hascontrol
        isSigner:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Issigner
        isDirector:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Isdirector
        address:
          anyOf:
            - $ref: '#/components/schemas/FiatShareholderAddress'
            - type: 'null'
        identityDocuments:
          anyOf:
            - items:
                $ref: '#/components/schemas/FiatIdentityDocument'
              type: array
            - type: 'null'
          title: Identitydocuments
        documentIds:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Documentids
        swipeluxId:
          anyOf:
            - type: string
            - type: 'null'
          title: Swipeluxid
      type: object
      required:
        - localId
      title: FiatShareholder
      description: Shareholder data stored in business_data JSONB.
    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
    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.
    FiatEntityType:
      type: string
      enum:
        - llc
        - corporation
        - s_corporation
        - c_corporation
        - partnership
        - limited_partnership
        - sole_proprietorship
        - nonprofit
        - trust
        - cooperative
        - dao
        - foundation
        - other
      title: FiatEntityType
      description: Business entity type.
    FiatBusinessType:
      type: string
      enum:
        - technology
        - finance
        - healthcare
        - retail
        - e_commerce
        - manufacturing
        - real_estate
        - consulting
        - hospitality
        - education
        - transportation
        - entertainment
        - agriculture
        - construction
        - professional_services
        - crypto_web3
        - other
      title: FiatBusinessType
      description: Business industry type.
    FiatVerifierRole:
      type: string
      enum:
        - officer
        - employer
        - accountant
        - agent
      title: FiatVerifierRole
      description: KYB verifier role.
    FiatBusinessAddress:
      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: FiatBusinessAddress
      description: Business address.
    FiatSourceOfFunds:
      type: string
      enum:
        - business_revenue
        - investment
        - loan
        - personal_savings
        - third_party_funds
        - grant
        - other
      title: FiatSourceOfFunds
      description: Source of funds.
    FiatPurposeOfFunds:
      type: string
      enum:
        - operations
        - payroll
        - vendor_payments
        - investment
        - treasury_management
        - international_transfers
        - other
      title: FiatPurposeOfFunds
      description: Purpose of funds.
    FiatShareholderAddress:
      properties:
        streetAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Streetaddress
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        country:
          anyOf:
            - $ref: '#/components/schemas/CountryCode'
            - type: 'null'
        zip:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip
      type: object
      title: FiatShareholderAddress
      description: Shareholder address.
    FiatIdentityDocument:
      properties:
        type:
          anyOf:
            - $ref: '#/components/schemas/FiatIdentityDocumentType'
            - type: 'null'
        issuingCountry:
          anyOf:
            - $ref: '#/components/schemas/CountryCode'
            - type: 'null'
        number:
          anyOf:
            - type: string
            - type: 'null'
          title: Number
      type: object
      title: FiatIdentityDocument
      description: Identity document for shareholder.
    FiatIdentityDocumentType:
      type: string
      enum:
        - passport
        - id_card
        - drivers_license
        - driver_license
        - residence_permit
        - government_id
        - state_or_provincial_id
        - visa
      title: FiatIdentityDocumentType
      description: Identity document type.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      x-default: Bearer <token>

````