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

# Send Superbill

> Persist the Super Bill payload and email the rendered HTML to the patient.

Recipient is always the patient's email on file — the request body cannot
override it, which removes the obvious abuse vector (using the system to
send branded mail to attacker-chosen addresses).

The payload is saved before the email goes out so the patient's copy
can never diverge from `charge.meta["superbill"]`. If the user clicks
Send without explicitly saving first, the in-editor edits still land on
the charge and on charge_items.



## OpenAPI

````yaml post /billing/charge/{charge_id}/send-superbill
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /billing/charge/{charge_id}/send-superbill:
    post:
      tags:
        - Charges
      summary: Send Superbill
      description: >-
        Persist the Super Bill payload and email the rendered HTML to the
        patient.


        Recipient is always the patient's email on file — the request body
        cannot

        override it, which removes the obvious abuse vector (using the system to

        send branded mail to attacker-chosen addresses).


        The payload is saved before the email goes out so the patient's copy

        can never diverge from `charge.meta["superbill"]`. If the user clicks

        Send without explicitly saving first, the in-editor edits still land on

        the charge and on charge_items.
      operationId: send_superbill_billing_charge__charge_id__send_superbill_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: charge_id
          in: path
          required: true
          schema:
            type: string
            title: Charge Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendSuperbillRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: boolean
                title: >-
                  Response Send Superbill Billing Charge  Charge Id  Send
                  Superbill Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SendSuperbillRequest:
      properties:
        payload:
          $ref: '#/components/schemas/SuperbillPayload'
        bodyHtml:
          type: string
          title: Bodyhtml
      type: object
      required:
        - payload
        - bodyHtml
      title: SendSuperbillRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SuperbillPayload:
      properties:
        services:
          items:
            $ref: '#/components/schemas/SuperbillServiceLine'
          type: array
          title: Services
        serviceDetails:
          $ref: '#/components/schemas/SuperbillServiceDetails'
        insurance:
          $ref: '#/components/schemas/SuperbillInsuranceInput'
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        includeCodeSummary:
          type: boolean
          title: Includecodesummary
          default: true
      type: object
      required:
        - services
        - serviceDetails
        - insurance
      title: SuperbillPayload
      description: >-
        Full superbill document state — what staff fills in + what was
        autofilled.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SuperbillServiceLine:
      properties:
        chargeItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Chargeitemid
        included:
          type: boolean
          title: Included
          default: true
        billingCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Billingcode
        billingCodeDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Billingcodedescription
        modifiers:
          items:
            type: string
          type: array
          title: Modifiers
          default: []
        icd10Codes:
          items:
            type: string
          type: array
          title: Icd10Codes
          default: []
        ndcCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Ndccode
        placeOfService:
          anyOf:
            - type: string
            - type: 'null'
          title: Placeofservice
        startDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Startdate
        endDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Enddate
        quantity:
          type: number
          title: Quantity
          default: 1
        quantityLabel:
          type: string
          enum:
            - QUANTITY
            - UNITS
          title: Quantitylabel
          default: QUANTITY
        billedChargeCents:
          type: integer
          title: Billedchargecents
          default: 0
      type: object
      title: SuperbillServiceLine
      description: |-
        One service row on the superbill — sent back when sending/exporting.

        `charge_item_id` is the durable link back to the originating ChargeItems
        row when a line was seeded from a charge item. Lines added inline in the
        editor (with no backing charge item) leave it None. Saves use this id to
        denormalize per-line codes back onto the right row; position is unsafe
        because adding / removing lines in the editor shifts the indexes.
    SuperbillServiceDetails:
      properties:
        renderingProviderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Renderingproviderid
        renderingProviderName:
          anyOf:
            - type: string
            - type: 'null'
          title: Renderingprovidername
        renderingProviderNpi:
          anyOf:
            - type: string
            - type: 'null'
          title: Renderingprovidernpi
        billingProviderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Billingproviderid
        billingProviderName:
          anyOf:
            - type: string
            - type: 'null'
          title: Billingprovidername
        billingProviderNpi:
          anyOf:
            - type: string
            - type: 'null'
          title: Billingprovidernpi
        tin:
          anyOf:
            - type: string
            - type: 'null'
          title: Tin
        otherProviderName:
          anyOf:
            - type: string
            - type: 'null'
          title: Otherprovidername
        placeOfService:
          anyOf:
            - type: string
            - type: 'null'
          title: Placeofservice
        facilityName:
          anyOf:
            - type: string
            - type: 'null'
          title: Facilityname
        startDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Startdate
        endDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Enddate
        hospitalAdmitDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Hospitaladmitdate
        dateOfInjury:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Dateofinjury
        priorAuthNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Priorauthnumber
      type: object
      title: SuperbillServiceDetails
    SuperbillInsuranceInput:
      properties:
        coverageType:
          anyOf:
            - type: string
            - type: 'null'
          title: Coveragetype
        payerName:
          anyOf:
            - type: string
            - type: 'null'
          title: Payername
        planName:
          anyOf:
            - type: string
            - type: 'null'
          title: Planname
        planType:
          anyOf:
            - type: string
            - type: 'null'
          title: Plantype
        insuranceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Insuranceid
        groupId:
          anyOf:
            - type: string
            - type: 'null'
          title: Groupid
        effectiveDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Effectivedate
        eligibilityNote:
          anyOf:
            - type: string
            - type: 'null'
          title: Eligibilitynote
        claimsAddress:
          anyOf:
            - type: string
            - type: 'null'
          title: Claimsaddress
        guarantorName:
          anyOf:
            - type: string
            - type: 'null'
          title: Guarantorname
      type: object
      title: SuperbillInsuranceInput

````