> ## 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 a PDF document from markdown

> Render an uploaded markdown file into a stored HEVN-generated PDF.



## OpenAPI

````yaml /openapi.json post /api/v1/documents/create
openapi: 3.1.0
info:
  title: HEVN API
  description: Backend API for HEVN mobile neobank
  version: 0.1.2
servers: []
security: []
paths:
  /api/v1/documents/create:
    post:
      tags:
        - documents
      summary: Create a PDF document from markdown
      description: Render an uploaded markdown file into a stored HEVN-generated PDF.
      operationId: create_document_api_v1_documents_create_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/MarkdownDocumentCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentDraftInfo'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    MarkdownDocumentCreateRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: Human-readable document title.
          default: Generated document
        originName:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Originname
          description: >-
            Human-readable final filename with spaces and extension, for example
            'Mutual NDA - Client Inc and HEVN Inc.pdf'. Do not use snake_case or
            slug text.
        documentType:
          $ref: '#/components/schemas/DocumentType'
          description: Stored HEVN document type.
          default: other
        context:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Context
          description: Document context stored with the document row.
          default: hevn_generated
        title:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Title
          description: Optional render title. Defaults to name.
        markdownBase64:
          type: string
          title: Markdownbase64
          description: Base64-encoded UTF-8 markdown file content.
        outputFormat:
          $ref: '#/components/schemas/DocumentOutputFormat'
          description: Generated document file format.
          default: pdf
      type: object
      required:
        - markdownBase64
      title: MarkdownDocumentCreateRequest
      description: >-
        Upload markdown, render it through safe document blocks, and store a
        file.
    DocumentDraftInfo:
      properties:
        id:
          type: string
          title: Id
        type:
          $ref: '#/components/schemas/DocumentType'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        originName:
          anyOf:
            - type: string
            - type: 'null'
          title: Originname
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        issueDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Issuedate
        expiryDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Expirydate
        content:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Content
        dakotaId:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Document Id
        signature:
          anyOf:
            - $ref: '#/components/schemas/DocumentSignatureInfo'
            - type: 'null'
          description: >-
            Signing state for a HEVN-generated document. ``null`` when the
            document carries no signature blocks, so a plain upload stays plain.
            A stored document is not a signed one — read the state.
      type: object
      required:
        - id
        - type
      title: DocumentDraftInfo
      description: Document info in response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DocumentType:
      type: string
      enum:
        - certificate_of_incorporation
        - formation_document
        - articles_of_incorporation
        - power_of_attorney
        - corporate_structure
        - company_registry_extract
        - corporate_registry_extract
        - shareholder_registry
        - director_structure
        - proof_of_address
        - utility_bill
        - annual_financial_statements
        - articles_of_association
        - audit_report
        - bank_reference_letter
        - bank_statement
        - banking_details
        - birth_certificate
        - business_license
        - business_plan
        - certificate_of_good_standing
        - crypto_statement
        - credit_report
        - criminal_record_check
        - cv_resume
        - driving_license
        - education_certificate
        - financial_projections
        - investment_statement
        - insurance_policy
        - lease_agreement
        - list_of_authorized_signatories
        - marriage_certificate
        - national_id
        - 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
        - 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
        - income_verification_letter
        - source_of_funds
        - 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
      description: Open internal document type; providers map it to their own taxonomy.
    DocumentOutputFormat:
      type: string
      enum:
        - pdf
        - docx
      title: DocumentOutputFormat
    DocumentSignatureInfo:
      properties:
        state:
          $ref: '#/components/schemas/DocumentSignatureState'
        signatureRequestId:
          anyOf:
            - type: string
            - type: 'null'
          title: Signaturerequestid
        signerEmails:
          items:
            type: string
          type: array
          title: Signeremails
        lastSignerEmail:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastsigneremail
        testMode:
          type: boolean
          title: Testmode
          default: false
      type: object
      required:
        - state
      title: DocumentSignatureInfo
      description: Typed view of the ``content["hellosign"]`` block for API responses.
    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
    DocumentSignatureState:
      type: string
      enum:
        - draft
        - sent
        - viewed
        - partially_signed
        - signed
        - declined
        - canceled
        - expired
        - invalid
      title: DocumentSignatureState
      description: >-
        Where one generated document stands with the signing provider.


        A document that exists is not a document that is signed: the UI has to
        tell

        a fresh draft from one waiting on a signer from a completed one.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````