> ## 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 a list of invoices, asynchronously in batch. An invoice whose status doesn't resolve to the requested email is skipped. Results can be tracked via webhooks with the `invoice.batch.email_succeeded`, `invoice.batch.email_skipped` and `invoice.batch.email_failed` events.



## 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:
        - Invoicing > Documents
      summary: Send invoice emails
      description: >-
        Send a specific email (`email_type`) to the customer for a list of
        invoices, asynchronously in batch. An invoice whose status doesn't
        resolve to the requested email is skipped. Results can be tracked via
        webhooks with the `invoice.batch.email_succeeded`,
        `invoice.batch.email_skipped` and `invoice.batch.email_failed` events.
      operationId: sendInvoiceEmails
      requestBody:
        description: Send invoice emails payload
        content:
          application/json:
            schema:
              type: object
              properties:
                batch_id:
                  type: string
                  description: >-
                    ID of the batch, supplied by you. Echoed back in the
                    response and on the emitted webhook events. Generated if
                    omitted.
                  example: batch_1eTaiytfA0i2Va
                email_type:
                  type: string
                  enum:
                    - invoice_ready
                    - invoice_settled
                    - invoice_errored
                    - credit_note_ready
                    - 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_ready`: The issued-credit-note email (for
                    `to_pay`, `partially_paid` refunds).

                    - `credit_note_settled`: The credit-note email (for paid
                    refunds).
                  example: invoice_ready
                ids:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 10000
                  description: >-
                    IDs of the invoices to send the email for. Processed
                    asynchronously; each outcome is reported via webhook events.
                  example:
                    - inv_1eTaiytfA0i2Va
                    - inv_1eTaiytfA0i2Vb
              required:
                - email_type
                - ids
      responses:
        '202':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  batch_id:
                    type: string
                    description: >-
                      ID of the batch request. Use it to correlate the
                      `invoice.batch.email_succeeded`,
                      `invoice.batch.email_skipped` and
                      `invoice.batch.email_failed` webhook events.
                    example: batch_1eTaiytfA0i2Va
                required:
                  - batch_id
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.