Skip to main content
POST
/
v1
/
invoices
/
send-email
Send invoice emails
curl --request POST \
  --url https://api.hyperline.co/v1/invoices/send-email \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email_type": "invoice_ready",
  "ids": [
    "inv_1eTaiytfA0i2Va",
    "inv_1eTaiytfA0i2Vb"
  ]
}
'
{
  "results": [
    {
      "invoice_id": "inv_1eTaiytfA0i2Va",
      "status": "queued",
      "reason": "no_email"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Send invoice emails payload

email_type
enum<string>
required

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).
Available options:
invoice_ready,
invoice_settled,
invoice_errored,
credit_note_settled
Example:

"invoice_ready"

ids
string[]
required

IDs of the invoices to send the email for. Between 1 and 50 per request, and must be unique.

Required array length: 1 - 50 elements
Example:
["inv_1eTaiytfA0i2Va", "inv_1eTaiytfA0i2Vb"]

Response

200 - application/json
results
object[]
required

Per-invoice outcome, in the same order as the requested ids.