Skip to content

Email the invoice

POST
/invoices/{id}/send
curl --request POST \
--url https://api.brrndops.com/v1/invoices/inv_8f3c0e7e-5d2a-4c1b-9f43-2c1d0a9b7e11/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 7f1c0f54-3a2b-4d5e-8f9a-0b1c2d3e4f5a' \
--data '{ "to": "hello@example.com" }'

Emails the PDF to customer.email, or to to if given, and moves an open invoice to sent. Draft invoices must be opened first. In sandbox no email is sent; the status still changes so you can test your flow.

id
required
string
Example
inv_8f3c0e7e-5d2a-4c1b-9f43-2c1d0a9b7e11
Idempotency-Key
string
<= 255 characters
Example
7f1c0f54-3a2b-4d5e-8f9a-0b1c2d3e4f5a

A unique string (1–255 printable ASCII characters) that makes retries safe.

Media typeapplication/json
object
to

Send to this address instead of the customer’s.

string format: email
Examplegenerated
{
"to": "hello@example.com"
}

The invoice after sending.

Media typeapplication/json
object
id
string
object
string
Allowed value: invoice
livemode
boolean
number
string
status
string
Allowed values: draft open sent paid deleted
currency
string
customer
object
name
string | null
<= 255 characters
email
string | null format: email
phone
string | null
<= 50 characters
address
string | null
<= 1000 characters
country_code

ISO 3166-1 alpha-2

string | null
issuer
object
name
string | null
<= 255 characters
email
string | null format: email
phone
string | null
<= 50 characters
address
string | null
<= 1000 characters
country_code

ISO 3166-1 alpha-2

string | null
line_items
Array<object>
object
id
string
object
string
Allowed value: line_item
description
string
quantity
integer
unit_amount
integer
amount

Quantity × unit_amount.

integer
subtotal
integer
tax_percent
number
tax_amount
integer
discount_percent
number
discount_amount
integer
total

Subtotal + tax_amount − discount_amount.

integer
issue_date
string format: date
due_date
string format: date
payment_terms
string | null
payment_details
object | null
template
string
branding
object
primary_color
string
secondary_color
string
font_family
string
<= 100 characters
logo_url

Must be https.

string | null format: uri
external_ref
string | null
metadata
object
key
additional properties
string
created_at
string format: date-time
updated_at
string format: date-time
Example
{
"id": "inv_8f3c0e7e-5d2a-4c1b-9f43-2c1d0a9b7e11",
"object": "invoice",
"number": "INV-001",
"status": "draft",
"customer": {
"country_code": "NG"
},
"issuer": {
"country_code": "NG"
},
"line_items": [
{
"id": "li_…",
"object": "line_item"
}
],
"branding": {
"primary_color": "#2388ff",
"secondary_color": "#f7f8fc"
}
}

The request was invalid: a missing or malformed field (param says which), an unknown field, or a rule such as a disallowed status change.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: authentication_error permission_error invalid_request_error rate_limit_error quota_error api_error
code
required
string
message
required
string
param

The request field the error relates to.

string
request_id
string
Example
{
"error": {
"type": "authentication_error",
"code": "parameter_missing"
}
}

Missing, invalid, expired or revoked API key.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: authentication_error permission_error invalid_request_error rate_limit_error quota_error api_error
code
required
string
message
required
string
param

The request field the error relates to.

string
request_id
string
Example
{
"error": {
"type": "authentication_error",
"code": "parameter_missing"
}
}

The key lacks the required scope (insufficient_scope), or the business isn’t verified yet (account_not_verified, production keys only).

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: authentication_error permission_error invalid_request_error rate_limit_error quota_error api_error
code
required
string
message
required
string
param

The request field the error relates to.

string
request_id
string
Example
{
"error": {
"type": "authentication_error",
"code": "parameter_missing"
}
}

No such resource in this account and environment.

Media typeapplication/json
object
error
required
object
type
required
string
Allowed values: authentication_error permission_error invalid_request_error rate_limit_error quota_error api_error
code
required
string
message
required
string
param

The request field the error relates to.

string
request_id
string
Example
{
"error": {
"type": "authentication_error",
"code": "parameter_missing"
}
}