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

# Send invoice

> Mark an invoice as sent and deliver it to the customer. The optional request body lets the caller override individual fields of the email (Subject, PreviewText, GreetingLine, or OpeningBody Markdown) per send; any field omitted is resolved from the catalogue using the organisation's DefaultInvoiceMessageTone and industry. Pass an empty body (or no body) to send the catalogue-resolved email as-is.



## OpenAPI

````yaml /api-reference/openapi.json post /invoices/{id}/send
openapi: 3.1.1
info:
  title: Dolfin API
  description: >-
    Dolfin API for AR & AP. Authenticate using the `x-dolfin-api-key` header
    with the API key distributed to your organisation.
  version: v1
servers:
  - url: https://api.dolfinai.co
    description: Production
security:
  - {}
tags:
  - name: Webhooks
  - name: Users
  - name: TaxRates
  - name: Suppliers
  - name: Supplier Credit Notes
  - name: Bills
  - name: SpendCategories
  - name: Payables
  - name: RecurringInvoices
  - name: Receivables
  - name: Purchase Orders
  - name: Products
  - name: Payments
  - name: Invoices
  - name: Organisations
  - name: Members
  - name: MCP
  - name: Matching
  - name: Invoice Reminders
  - name: Industries
  - name: Gmail
  - name: Delivery Notes
  - name: Customers
  - name: Currencies
  - name: Credit Notes
  - name: Clients
  - name: ClientInvites
  - name: BankPayments
  - name: Bank details
  - name: Auth
  - name: ApprovalPolicies
  - name: ApiKeys
  - name: Agent
paths:
  /invoices/{id}/send:
    post:
      tags:
        - Invoices
      summary: Send invoice
      description: >-
        Mark an invoice as sent and deliver it to the customer. The optional
        request body lets the caller override individual fields of the email
        (Subject, PreviewText, GreetingLine, or OpeningBody Markdown) per send;
        any field omitted is resolved from the catalogue using the
        organisation's DefaultInvoiceMessageTone and industry. Pass an empty
        body (or no body) to send the catalogue-resolved email as-is.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/SendInvoiceOverrides'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceResponse'
        '400':
          description: Invoice.CustomerMissingEmail — the customer has no email address
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: >-
            Organisation.InsufficientRole — caller's organisation role is below
            the level this action requires
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: >-
            Invoice.NotFound — no invoice with that id for this organisation


            Organisation.NotFound — the organisation does not exist or could not
            be resolved
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: >-
            Invoice.CommandFailed — the invoice command was rejected by the saga
            (state conflict)


            Invoice.NotSendable — invoice is not in Draft status
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '422':
          description: >-
            Invoice.RecipientInactive — the recipient address is suppressed at
            the email provider
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '502':
          description: Invoice.EmailSendFailed — the email provider rejected the send
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    SendInvoiceOverrides:
      type: object
      properties:
        tone:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/InvoiceTone'
              description: >-
                Resolves the catalogue with this tone instead of the
                organisation's default for this send only. When null, the
                organisation's DefaultInvoiceMessageTone is used.
        subject:
          type:
            - 'null'
            - string
          description: >-
            Overrides the catalogue-resolved email Subject. When null, catalogue
            resolves.
        previewText:
          type:
            - 'null'
            - string
          description: >-
            Overrides the catalogue-resolved inbox preview text (the line that
            previews next to the subject in most clients). When null, catalogue
            resolves.
        greetingLine:
          type:
            - 'null'
            - string
          description: >-
            Overrides the catalogue-resolved greeting line (e.g. "Hi Acme,").
            When null, catalogue resolves.
        openingBodyMarkdown:
          type:
            - 'null'
            - string
          description: >-
            Overrides the catalogue-resolved opening body. Markdown; rendered to
            HTML at send time. When null, catalogue resolves.
        reminders:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/InvoiceReminderOffset'
          description: >-
            Override the organisation's DefaultReminderOffsets for this send.
            null (or field omitted): use the organisation's default list. []:
            schedule no reminders for this send. Populated: schedule exactly
            these offsets, overriding the organisation default. Each offset is
            resolved relative to the invoice's DueDate; offsets that would
            resolve to a past time are skipped silently.
    InvoiceResponse:
      required:
        - currency
      type: object
      properties:
        id:
          type: string
          format: uuid
        organisationId:
          type: string
          format: uuid
        customerId:
          type: string
          format: uuid
        documentNumber:
          type:
            - 'null'
            - string
        currency:
          type: string
          description: ISO 4217 currency code (e.g. GBP, USD, EUR)
        issueDate:
          type: string
          format: date-time
        dueDate:
          type:
            - 'null'
            - string
          format: date-time
        status:
          $ref: '#/components/schemas/InvoiceState'
        subTotal:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        taxAmount:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        totalAmount:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        amountPaid:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          description: Total payments received against this invoice.
          format: double
        amountCredited:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          description: Total of issued credit notes applied to this invoice.
          format: double
        outstanding:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          description: >-
            Remaining balance: TotalAmount - payments received - issued credit
            notes.
          format: double
        recurringScheduleId:
          type:
            - 'null'
            - string
          description: >-
            Set when this invoice was generated from a recurring schedule; null
            for hand-made invoices.
          format: uuid
        recurringOccurrenceNumber:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        memo:
          type:
            - 'null'
            - string
        createdAt:
          type: string
          format: date-time
        createdBy:
          type:
            - 'null'
            - string
          format: uuid
        updatedAt:
          type: string
          format: date-time
        updatedBy:
          type:
            - 'null'
            - string
          format: uuid
        paymentUrl:
          type:
            - 'null'
            - string
        customer:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomerResponse'
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceLineItemResponse'
    ProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
    InvoiceTone:
      enum:
        - Friendly
        - Direct
        - Formal
    InvoiceReminderOffset:
      enum:
        - OneWeekBefore
        - TwoDaysBefore
        - OnDueDate
        - TwoDaysAfter
        - OneWeekAfter
    InvoiceState:
      enum:
        - Draft
        - Sent
        - Paid
        - Void
        - PartiallyPaid
        - Credited
    CustomerResponse:
      required:
        - name
      type: object
      properties:
        id:
          type: string
          format: uuid
        organisationId:
          type: string
          format: uuid
        name:
          type: string
        email:
          type:
            - 'null'
            - string
        phone:
          type:
            - 'null'
            - string
        taxNumber:
          type:
            - 'null'
            - string
        addressLine1:
          type:
            - 'null'
            - string
        addressLine2:
          type:
            - 'null'
            - string
        city:
          type:
            - 'null'
            - string
        state:
          type:
            - 'null'
            - string
        postalCode:
          type:
            - 'null'
            - string
        country:
          type:
            - 'null'
            - string
          description: ISO 3166-1 alpha-2 country code (e.g. GB, US, DE)
        createdAt:
          type: string
          format: date-time
        createdBy:
          type:
            - 'null'
            - string
          format: uuid
        updatedAt:
          type: string
          format: date-time
        updatedBy:
          type:
            - 'null'
            - string
          format: uuid
    InvoiceLineItemResponse:
      required:
        - description
      type: object
      properties:
        id:
          type: string
          format: uuid
        productId:
          type: string
          format: uuid
        productName:
          type:
            - 'null'
            - string
        taxRateId:
          type:
            - 'null'
            - string
          format: uuid
        taxRateSnapshot:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TaxRateSnapshotResponse'
              description: >-
                Frozen copy of the tax rate as applied when the invoice was
                sent. Read-only — no tool can modify a sent invoice's tax.
                Present on Sent/Paid/Void invoices, null on Draft.
        description:
          type: string
        quantity:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        unitPrice:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        taxAmount:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        subTotal:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
    TaxRateSnapshotResponse:
      required:
        - code
        - name
        - source
      type: object
      properties:
        code:
          type: string
        name:
          type: string
        rate:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
          type:
            - number
            - string
          format: double
        source:
          type: string
        sourceId:
          type:
            - 'null'
            - string
          format: uuid
        snapshottedAt:
          type: string
          format: date-time

````