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

> ## Agent Instructions
> HEVN accounts are non-custodial in both products. Self-serve (the General tab): the person who owns the email holds the only key and signs for themselves. Whitelabel (the Whitelabel and REST API tabs): the integrator's customer creates and owns their account through Sign in with HEVN, a HEVN-hosted popup on the integrator's site; the integrator's backend holds a developer key, operates linked accounts and books their payouts, and the account holder approves every payout in that popup. The developer key signs only for the integrator's own wallet; it never signs a client's money.
> Use HEVN's terms exactly. A rail is a bank route a client can request. A virtual account (bnk_) is an opened rail. Account details are what a payer needs in order to wire money, and arrive in a field named requisites. A client is a customer's own account linked to the integrator through Sign in with HEVN (POST /dapi/v1/connect/sessions, then POST /dapi/v1/clients/link); there is no API call that creates one. The business behind it is the integrator's customer. A contact is a saved destination; a beneficiary is the party at the far end of a fiat payout. Every departure of money is a payout, to a bank account or to a wallet alike.
> Never name a banking partner. Say 'a licensed banking partner'.
> There are no published fee rates, spreads or minimums. Prices come from a quote on a specific payment; direct pricing questions to HEVN rather than inventing numbers.
> The whitelabel API is at /dapi/v1 and takes a developer-key session plus an X-Hevn-Account header. Developer keys have an IP allowlist and no scopes. Remote transfers are at /api/v1/remote_spend_limit and take a remote transfer key (rsl_) in X-Api-Key, bounded by an onchain spend permission the account holder grants. They are different credentials and neither works on the other surface. The HEVN CLI is discontinued.

# Upload a document

> Stores a file and answers the `doc_…` id the verification document references as `uploadId`. Uploading the same bytes in the same slot twice answers the first id.



## OpenAPI

````yaml /openapi.json post /documents
openapi: 3.1.0
info:
  title: HEVN Platform API
  description: >-
    HEVN's account, verification and money-movement API. Verification follows a
    submission workflow: save applicant info and documents, inspect outstanding
    requirements, then explicitly complete the submission to send an immutable
    snapshot for review. Completing a submission is separate from editing it.
  version: 1.0.0
servers: []
security: []
tags:
  - name: auth
    description: Authenticate an integration and issue short-lived account sessions.
  - name: accounts
    description: Create and manage business or individual customer accounts.
  - name: verification
    description: >-
      Collect business-applicant and related-individual information, inspect
      requirements, and complete a verification submission for review.
  - name: documents
    description: Upload verification and payment evidence for later reference by id.
  - name: virtual accounts
    description: Discover payment methods and create persistent receiving account details.
  - name: transfers
    description: Quote, create, authorize and track incoming or outgoing transfers.
  - name: contacts
    description: Create saved contacts and inspect their available payment channels.
  - name: transactions
    description: Read and export the account ledger.
  - name: escrow
    description: Create, authorize and reconcile on-chain escrow agreements.
  - name: sandbox
    description: Emulate funding and lifecycle events in the sandbox environment.
paths:
  /documents:
    post:
      tags:
        - documents
      summary: Upload a document
      description: >-
        Stores a file and answers the `doc_…` id the verification document
        references as `uploadId`. Uploading the same bytes in the same slot
        twice answers the first id.
      operationId: upload_document_documents_post
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Your own key for this write, `^[A-Za-z0-9._:-]{1,128}$`. A retry
              with the same key replays the first answer; the same key with a
              different request is refused.
            examples:
              - po-inv-2026-114
            title: Idempotency-Key
          description: >-
            Your own key for this write, `^[A-Za-z0-9._:-]{1,128}$`. A retry
            with the same key replays the first answer; the same key with a
            different request is refused.
        - name: X-Hevn-Account
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              The client account to act for, as a `cl_…` id. Omit it to act as
              yourself.
            examples:
              - cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41
            title: X-Hevn-Account
          description: >-
            The client account to act for, as a `cl_…` id. Omit it to act as
            yourself.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentUploadRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResponse'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    DocumentUploadRequest:
      properties:
        slot:
          $ref: '#/components/schemas/DocumentType'
          description: Verification requirement this file satisfies.
        content:
          type: string
          minLength: 1
          title: Content
          description: Base64-encoded document bytes.
        fileName:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Filename
          description: Original file name including its extension.
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
          description: Human-readable document name.
      additionalProperties: false
      type: object
      required:
        - slot
        - content
      title: DocumentUploadRequest
    DocumentResponse:
      properties:
        id:
          type: string
          pattern: ^(?:doc_)?[A-Za-z0-9._:\-]{1,216}$
          title: Id
          description: Stable public identifier for this document.
          examples:
            - doc_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41
        slot:
          $ref: '#/components/schemas/DocumentType'
          description: Verification requirement this document satisfies.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Human-readable document name.
        fileName:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
          description: Original file name including its extension.
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
          description: UTC timestamp when the document was created.
      type: object
      required:
        - id
        - slot
      title: DocumentResponse
    PlatformErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/PlatformErrorBody'
          description: Public error body.
      type: object
      required:
        - error
      title: PlatformErrorResponse
    DocumentType:
      type: string
      enum:
        - certificate_of_incorporation
        - certificate_of_registration
        - formation_document
        - articles_of_incorporation
        - power_of_attorney
        - corporate_structure
        - org_structure_chart
        - company_registry_extract
        - corporate_registry_extract
        - shareholder_registry
        - cap_table
        - director_structure
        - proof_of_address
        - utility_bill
        - aml_policy
        - annual_financial_statements
        - articles_of_association
        - audit_report
        - independent_aml_audit_report
        - identity_verification_attestation
        - institutional_investor_documentation
        - audited_financial_statement
        - bank_reference_letter
        - bank_verification_letter
        - bank_statement
        - banking_details
        - birth_certificate
        - business_license
        - operating_license
        - business_plan
        - certificate_of_good_standing
        - corporate_resolution
        - proof_of_registered_address
        - proof_of_operating_address
        - crypto_statement
        - credit_report
        - criminal_record_check
        - cv_resume
        - driving_license
        - education_certificate
        - financial_projections
        - investment_statement
        - insurance_policy
        - lease_agreement
        - marriage_certificate
        - national_id
        - national_id_front
        - national_id_back
        - operating_agreement
        - partnership_agreement
        - professional_license
        - regulatory_license
        - reference_letter
        - register_of_members
        - residence_permit
        - shareholding_structure
        - shareholders_agreement
        - social_security_document
        - source_of_funds_declaration
        - tax_identification_document
        - ein_letter
        - tax_certificate
        - tax_compliance_form
        - tax_returns
        - payslip
        - pitch_deck
        - savings_statement
        - trade_references
        - vat_registration
        - vendor_contracts
        - visa
        - wealth_statement
        - contract
        - invoice
        - loan_agreement
        - subscription_agreement
        - safe_agreement
        - convertible_note
        - promissory_note
        - marketing_material
        - employment_contract
        - authorization_to_act
        - authority_to_bind
        - ubo_declaration
        - income_verification_letter
        - source_of_funds
        - flow_of_funds
        - payroll_register
        - investment_agreement
        - source_of_wealth
        - supporting_document
        - memorandum
        - passport_front
        - passport_back
        - id_card_front
        - id_card_back
        - drivers_license_front
        - drivers_license_back
        - residence_permit_front
        - residence_permit_back
        - other
      title: DocumentType
    PlatformErrorBody:
      properties:
        code:
          $ref: '#/components/schemas/PlatformErrorCode'
          description: Stable machine-readable error code.
        message:
          type: string
          title: Message
          description: Human-readable explanation safe to show to an end user.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: Structured context for this error, when available.
      type: object
      required:
        - code
        - message
      title: PlatformErrorBody
    PlatformErrorCode:
      type: string
      enum:
        - invalid_request
        - validation_failed
        - invalid_cursor
        - invalid_id
        - idempotency_key_invalid
        - idempotency_key_reused
        - unauthenticated
        - token_expired
        - forbidden
        - not_found
        - method_not_allowed
        - conflict
        - gone
        - payload_too_large
        - rate_limited
        - provider_unavailable
        - database_unavailable
        - internal_error
        - invalid_credentials
        - request_expired
        - challenge_not_found
        - challenge_consumed
        - challenge_expired
        - signature_invalid
        - key_not_registered
        - signer_not_attached
        - wallet_not_linked
        - approval_consumed
        - approval_expired
        - approval_mismatch
        - signing_policy_refused
        - login_unavailable
        - login_mode_unavailable
        - developer_key_not_found
        - developer_key_already_exists
        - account_header_invalid
        - account_scope_conflict
        - account_not_found
        - account_forbidden
        - account_read_only
        - account_not_controlled
        - contact_not_found
        - quote_not_submitted
        - quote_not_fundable
        - funding_mode_unsupported
        - funding_token_unsupported
        - insufficient_funds
        - smart_wallet_not_deployed
        - wallet_owner_unverified
        - already_funded
        - payment_slot_consumed
        - funding_in_progress
        - funding_attempt_expired
        - contact_changed
        - user_operation_rejected
        - user_operation_unavailable
        - transfer_policy_denied
        - client_creation_not_enabled
        - client_not_found
        - link_code_invalid
        - link_code_expired
        - client_already_linked
        - redirect_uri_not_allowed
        - payout_not_awaiting_signature
        - verification_not_applicable
        - profile_locked
        - contact_not_payable
        - contact_chain_unsupported
        - contact_token_unsupported
        - contact_payment_details_invalid
        - amount_below_minimum
        - amount_above_maximum
        - amount_precision_unsupported
        - payout_not_found
        - payout_not_fundable
        - quote_expired
        - bundler_rejected
        - bundler_unavailable
        - contact_details_invalid
        - contact_in_use
        - kyb_incomplete
        - kyb_documents_processing
        - kyb_roster_conflict
        - kyb_subject_conflict
        - document_not_found
        - document_type_unsupported
        - invalid_enum_value
        - entity_not_found
        - escrow_not_found
        - escrow_action_not_found
        - escrow_not_operated_by_you
        - escrow_state_changed
        - action_in_flight
        - simulation_failed
        - stale_nonce
        - amount_out_of_range
        - amount_not_allowed
        - window_closed
        - token_not_supported
        - receiver_not_a_client
        - rail_not_found
        - rail_not_available
        - payin_not_available
        - payin_expired
        - payin_not_found
        - transaction_not_found
        - account_unavailable
        - account_not_supported
        - swap_not_found
        - swap_route_unavailable
        - swap_not_confirmable
        - intent_not_signable
        - sandbox_amount_limit_exceeded
        - sandbox_faucet_balance_too_high
      title: PlatformErrorCode
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.