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

# Send invoice emails

> Send a specific email (`email_type`) to the customer for up to 50 invoices in a single request. Invoices whose status doesn't match the requested email are skipped. Returns a per-invoice result.



## OpenAPI

````yaml post /v1/invoices/send-email
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/invoices/send-email:
    post:
      tags:
        - Invoices
      summary: Send invoice emails
      description: >-
        Send a specific email (`email_type`) to the customer for up to 50
        invoices in a single request. Invoices whose status doesn't match the
        requested email are skipped. Returns a per-invoice result.
      operationId: sendInvoiceEmails
      requestBody:
        description: Send invoice emails payload
        content:
          application/json:
            schema:
              type: object
              properties:
                email_type:
                  type: string
                  enum:
                    - invoice_ready
                    - invoice_settled
                    - invoice_errored
                    - credit_note_settled
                  description: >-
                    The email to send. The invoice's status must resolve to this
                    email, otherwise it is skipped with reason
                    `email_type_mismatch`.


                    - `invoice_ready`: The to-pay invoice email (for `to_pay`,
                    `partially_paid`, `late` invoices).

                    - `invoice_settled`: The paid-invoice email (for `paid`
                    invoices).

                    - `invoice_errored`: The failed-payment email (for `error`
                    invoices with a payment method).

                    - `credit_note_settled`: The credit-note email (for paid
                    refunds).
                  example: invoice_ready
                ids:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 50
                  description: >-
                    IDs of the invoices to send the email for. Between 1 and 50
                    per request, and must be unique.
                  example:
                    - inv_1eTaiytfA0i2Va
                    - inv_1eTaiytfA0i2Vb
              required:
                - email_type
                - ids
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        invoice_id:
                          type: string
                          description: ID of the invoice this result refers to.
                          example: inv_1eTaiytfA0i2Va
                        status:
                          type: string
                          enum:
                            - queued
                            - ignored
                            - not_found
                            - error
                          description: >-
                            Outcome of the send request for this invoice.


                            - `queued`: The email was queued for delivery to the
                            customer.

                            - `ignored`: No email was sent (see `reason`).

                            - `not_found`: No invoice with this ID exists for
                            your account.

                            - `error`: The send failed for this invoice; other
                            invoices in the batch are unaffected. Safe to retry
                            this ID.
                          example: queued
                        reason:
                          type: string
                          enum:
                            - no_email
                            - invoice_not_settled
                            - invoice_not_errored
                            - invoice_amount_is_zero
                            - invoice_status_is_not_to_pay
                            - invoice_number_pending
                            - electronic_invoice_not_completed
                            - payment_method_defined
                            - payment_method_not_defined
                            - email_settings_disabled
                            - no_available_customer_action
                            - no_transaction_error
                            - no_payment_method_error
                            - email_type_mismatch
                          description: >-
                            Reason the email was not sent. Only present when
                            `status` is `ignored`.
                          example: no_email
                      required:
                        - invoice_id
                        - status
                    description: >-
                      Per-invoice outcome, in the same order as the requested
                      `ids`.
                required:
                  - results
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````