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

# Send estimate by email

> Sends the estimate by email to the provided address, or to the recipient contact's email if no address is provided.

If `email` is omitted, the estimate is sent to the recipient contact's primary email address. Each delivery attempt is logged on the estimate and surfaced in the `emailDeliveries` array of subsequent responses.


## OpenAPI

````yaml POST /v1/estimates/{estimateId}/send
openapi: 3.1.0
info:
  title: infinity.swiss Open API
  version: '1.0'
  summary: ''
servers:
  - url: https://api.infinity.swiss
security:
  - apiKey: []
paths:
  /v1/estimates/{estimateId}/send:
    parameters:
      - schema:
          type: string
        name: estimateId
        in: path
        description: The id of the estimate to send.
        required: true
    post:
      tags: []
      summary: Send estimate by email
      description: >-
        Sends the estimate by email to the provided address, or to the recipient
        contact's email if no address is provided.
      operationId: send-estimate-v1
      requestBody:
        description: Optional email override and description.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendInput'
      responses:
        '200':
          description: The estimate was sent successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  estimate:
                    $ref: '#/components/schemas/Estimate'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorised'
        '404':
          $ref: '#/components/responses/CustomerInvoiceNotFound'
components:
  schemas:
    SendInput:
      title: SendInput
      type: object
      description: Request body for sending a document by email.
      properties:
        email:
          type: string
          format: email
          description: >-
            Optional override of the recipient address. If not provided, the
            recipient contact's primary email is used.
        description:
          type: string
          maxLength: 2000
          description: Optional message to include in the email body.
    Estimate:
      title: Estimate
      type: object
      description: The full representation of an estimate (quote).
      allOf:
        - $ref: '#/components/schemas/InvoiceCommonFields'
        - type: object
          required:
            - status
          properties:
            status:
              $ref: '#/components/schemas/QuoteStatus'
            signingPerson:
              type: string
              description: Name of the person who signed the accepted estimate.
            signedAt:
              type: string
              format: date-time
              description: ISO 8601 timestamp when the estimate was signed.
            invoicesFromQuote:
              type: array
              description: >-
                Ids of any invoices that were created by converting this
                estimate.
              items:
                type: string
    InvoiceCommonFields:
      title: InvoiceCommonFields
      type: object
      description: Response fields shared between invoices and estimates.
      required:
        - id
        - isDraft
        - number
        - organisation
        - template
        - openingDate
        - dueDate
        - positions
        - totalAmount
        - totalNetAmount
        - totalVatDebt
      properties:
        id:
          type: string
          description: A unique hex identifier for the document.
          readOnly: true
        isDraft:
          type: boolean
        number:
          type: string
          description: >-
            The formatted document number. May be empty for drafts that have not
            yet been issued.
        organisation:
          type: string
          description: The id of the owning organisation.
          readOnly: true
        template:
          type: string
          description: The id of the template used to render the document.
        recipient:
          type: string
          description: The id of the contact this document is addressed to.
        customRecipientText:
          type: string
        title:
          type: string
        openingDate:
          type: string
          format: date
        dueDate:
          type: string
          format: date
        payableInDays:
          type: integer
        introductoryText:
          type: string
        closingText:
          type: string
        positions:
          type: array
          items:
            $ref: '#/components/schemas/InvoicePosition'
        totalAmount:
          type: integer
          description: Total gross amount in cents (e.g. 12030 = 120.30).
        totalNetAmount:
          type: integer
          description: Total net amount in cents.
        totalVatDebt:
          type: integer
          description: Total VAT debt in cents.
        amountMode:
          $ref: '#/components/schemas/AmountMode'
        language:
          $ref: '#/components/schemas/InvoiceLanguage'
        originalCurrency:
          type: string
          minLength: 3
          maxLength: 3
          description: >-
            ISO 4217 currency code for the original document currency. Omitted
            for documents in the primary accounting currency.
        exchangeRate:
          type: number
          description: >-
            Exchange rate from the original currency to the primary accounting
            currency, if applicable.
        columns:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceColumn'
        emailDeliveries:
          type: array
          description: Log of any email delivery attempts for this document.
          items:
            $ref: '#/components/schemas/EmailDelivery'
        publicPdfUrl:
          type: string
          description: >-
            A public URL for downloading the rendered PDF without
            authentication. May be omitted while the URL is being generated.
    QuoteStatus:
      title: QuoteStatus
      type: string
      description: The lifecycle status of an estimate.
      enum:
        - open
        - accepted
        - rejected
    InvoicePosition:
      title: InvoicePosition
      description: >-
        A single position on an invoice or estimate. Discriminated by the `type`
        field.
      oneOf:
        - $ref: '#/components/schemas/ProductPosition'
        - $ref: '#/components/schemas/DiscountPosition'
        - $ref: '#/components/schemas/TextPosition'
        - $ref: '#/components/schemas/SubtotalPosition'
      discriminator:
        propertyName: type
        mapping:
          product:
            $ref: '#/components/schemas/ProductPosition'
          discount:
            $ref: '#/components/schemas/DiscountPosition'
          text:
            $ref: '#/components/schemas/TextPosition'
          subtotal:
            $ref: '#/components/schemas/SubtotalPosition'
    AmountMode:
      title: AmountMode
      type: string
      description: >-
        Whether position amounts are entered gross (including VAT) or net
        (excluding VAT).
      enum:
        - gross
        - net
    InvoiceLanguage:
      title: InvoiceLanguage
      type: string
      description: The language used to render the document.
      enum:
        - de
        - en
        - fr
        - it
    InvoiceColumn:
      title: InvoiceColumn
      description: A column that can be shown on the rendered invoice or estimate.
      type: string
      enum:
        - quantity
        - unit
        - articleNumber
        - name
        - date
        - vatDebt
        - vatRate
        - singleAmount
        - totalAmount
        - discountRate
        - positionNumber
        - customTextColumn1
        - customTextColumn2
        - customTextColumn3
    EmailDelivery:
      title: EmailDelivery
      type: object
      description: A record of an attempt to send the document by email.
      required:
        - recipientEmail
        - status
        - timestamp
      properties:
        recipientEmail:
          type: string
          format: email
          description: The address the document was sent to.
        status:
          type: string
          description: The delivery status reported by the email provider.
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the delivery was recorded.
    ProductPosition:
      title: ProductPosition
      type: object
      description: >-
        A standard billable line item with a quantity, single amount, and contra
        account. Most invoice and estimate positions are of this type.
      required:
        - type
        - name
        - singleAmount
        - quantity
        - contraAccount
      properties:
        type:
          type: string
          enum:
            - product
          description: Discriminator for the position type.
        id:
          type: string
          description: >-
            Server-assigned identifier for the position. Present on responses;
            omit when creating.
          readOnly: true
        name:
          type: string
          maxLength: 256
          description: The name of the product or service for this position.
        singleAmount:
          type: integer
          description: >-
            The unit amount in cents. May be expressed gross or net depending on
            the document's `amountMode`.
          example: 12000
        quantity:
          type: number
          description: The number of units billed for this position.
          example: 2
        contraAccount:
          type: integer
          minimum: 1000
          maximum: 9999
          description: >-
            The contra account number this position books against (typically a
            revenue account).
        unit:
          type: string
          maxLength: 4
          description: Optional unit, e.g. `h`, `kg`, `pcs`.
        taxCode:
          $ref: '#/components/schemas/TaxCode'
        articleNumber:
          type: string
          maxLength: 48
          description: Optional article or SKU number to display alongside the position.
        description:
          type: string
          maxLength: 2000
          description: Optional multi-line description of the position.
        date:
          type: string
          maxLength: 12
          description: Optional free-text date column for the position, e.g. service date.
        discountRate:
          type: number
          minimum: 0
          maximum: 100
          description: Optional per-position discount rate in percent.
        customTextColumns:
          $ref: '#/components/schemas/CustomTextColumns'
        totalAmount:
          type: integer
          readOnly: true
          description: >-
            The total amount of this position (gross), in cents. Computed by the
            server.
        vatDebt:
          type: integer
          readOnly: true
          description: The VAT debt for this position, in cents. Computed by the server.
        originalCurrency:
          type: string
          minLength: 3
          maxLength: 3
          readOnly: true
          description: >-
            The 3-character ISO 4217 currency code in which this position was
            originally entered, if different from the primary accounting
            currency.
        exchangeRate:
          type: number
          readOnly: true
          description: The exchange rate used to convert the original currency amount.
    DiscountPosition:
      title: DiscountPosition
      type: object
      description: >-
        A discount line that reduces the sum of the preceding positions either
        by a percentage or by an absolute amount.
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - discount
        id:
          type: string
          readOnly: true
        percentage:
          type: number
          minimum: 0
          maximum: 100
          description: >-
            A percentage discount applied to the preceding positions. Exactly
            one of `percentage` or `amount` must be set.
        amount:
          type: integer
          minimum: 0
          description: >-
            An absolute discount amount in cents. Exactly one of `percentage` or
            `amount` must be set.
        discountText:
          type: string
          maxLength: 256
          description: Optional display text for the discount, e.g. "Rabatt".
    TextPosition:
      title: TextPosition
      type: object
      description: >-
        A non-billable text line that is rendered between positions for
        organisation or commentary.
      required:
        - type
        - content
      properties:
        type:
          type: string
          enum:
            - text
        id:
          type: string
          readOnly: true
        content:
          type: string
          maxLength: 2000
          description: The text content to render.
        style:
          type: string
          enum:
            - normal
            - headline
            - fine-print
          description: The visual style of the text line.
    SubtotalPosition:
      title: SubtotalPosition
      type: object
      description: >-
        A line that renders the running subtotal of all preceding positions,
        optionally with a custom label.
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - subtotal
        id:
          type: string
          readOnly: true
        label:
          type: string
          maxLength: 128
          description: Optional label for the subtotal line.
    TaxCode:
      title: TaxCode
      description: >-
        A VAT tax code. See [Liste der
        MWST-Codes](https://docs.infinity.swiss/de/docs/accounting/vat/tax-codes)
        for details. The empty string indicates no VAT.
      oneOf:
        - type: string
          enum:
            - ''
        - type: string
          enum:
            - UN81
            - UN77
            - UR26
            - UR25
            - US38
            - US37
            - UO81
            - UO77
            - BZB81
            - BZB77
            - BZM81
            - BZM77
            - VM81
            - VM38
            - VM26
            - VB81
            - VB38
            - VB26
            - VM77
            - VM37
            - VM25
            - VB77
            - VB37
            - VB25
            - ES81
            - ES26
            - ES77
            - ES25
            - UNO
            - UEX
            - ULA
            - ZOLLM
            - ZOLLB
    CustomTextColumns:
      title: CustomTextColumns
      type: object
      description: Optional values for the three custom text columns on a product position.
      properties:
        customTextColumn1:
          type: string
          maxLength: 64
        customTextColumn2:
          type: string
          maxLength: 64
        customTextColumn3:
          type: string
          maxLength: 64
  responses:
    BadRequest:
      description: >-
        A bad request is thrown if the request payload is malformed or fails
        validation.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
            properties:
              code:
                type: string
                description: |-
                  The specific error code for this request. May be:
                  - `general/missing-fields`
                  - `general/malformed-request`
                  - `general/invalid-date`
                  - `general/input-too-long`
                  - `general/zero-or-negative-amount-not-allowed`
              invalidFields:
                type: array
                description: A list of the fields which were invalid, if applicable.
                items:
                  type: string
    Unauthorised:
      description: >-
        An unauthorised request was submitted. You may be using an incorrect or
        expired API token, or are attempting to access a document outside of the
        scope of the token.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                x-stoplight:
                  id: 08hkw8ukmi2lp
                description: Specific error code
          examples:
            Unauthorised request:
              value:
                code: general/unauthorised
    CustomerInvoiceNotFound:
      description: >-
        No invoice or estimate with the given id could be found in this
        organisation. Also returned when the id refers to the other kind of
        document, e.g. an estimate id on an invoice endpoint.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                description: Specific error code.
          examples:
            Not found:
              value:
                code: customer-invoice/not-found
  securitySchemes:
    apiKey:
      name: x-api-token
      type: apiKey
      in: header
      description: >-
        API token for authentication. Obtain from your Infinity account
        settings.

````