---
title: "Send a commercial document by email"
method: POST
path: "/api/external/v2/commercial_documents/{id}/send_by_email"
tags: ["Commercial Documents"]
---

# Send a commercial document by email

`POST /api/external/v2/commercial_documents/{id}/send_by_email`

## Request

- Base URL: `https://app.pennylane.com`
- URL: `https://app.pennylane.com/api/external/v2/commercial_documents/{id}/send_by_email`
- Auth: OAuth 2
  - Authorization code: `https://app.pennylane.com/oauth/authorize`
  - Token URL: `https://app.pennylane.com/oauth/oauth/token` scopes: `commercial_documents:all`

This endpoint allows you to send a commercial document by email to your customer.
This requires that the PDF file for that document has been generated
(this process can take a few minutes), so if you just created
the commercial document in our system, we may return a 409 error. You should
retry the request in a few minutes - if you receive a 204 response, that means
that the email is on its way.

The subject and body come from the company's default billing email template
for the customer's billing language, unless `email_template_id` is set.
A proforma uses the invoice template.
A shipping order or a purchasing order uses the quote template.

For more information about email sending, please
read \[this guide\](https://pennylane.readme.io/v2.0/docs/sending-documents-by-email).


> ℹ️
> This endpoint requires the following scope: `commercial_documents:all`

## Path parameters

- `id` integer, required

## Headers

- `X-Company-Id` string

## Request body

- object
  - `recipients` string[]: Email recipients. If empty, the email will be sent to the recipient email addresses specified for the customer of this commercial document.
  - `email_template_id` integer: Billing email template to use for this send. It must belong to the company and match the template kind for this document (`billing_email_invoice` for a proforma, `billing_email_quote` for a shipping order or a purchasing order). Its locale does not have to match the customer's billing language. Subject, body, cc and bcc then come from that template. When omitted, the company's default template for the customer's billing language is used. In that case only the subject and body are applied.

## Response `204`

Commercial document is being sent by email

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: Access to this resource forbidden
- `404`: The resource was not found
- `409`: Conflict with the current state of the target resource, such as when trying to create a resource that already exists.
- `422`: Unprocessable content

## Changes

- **2026-11-03** `871f863307e5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pennylane/apis/company-v2/changes/api/external/v2/commercial_documents/:id/send_by_email/post.md)

---

[API](https://skmtc.dev/pennylane/apis/company-v2.md) - [All operations](https://skmtc.dev/pennylane/apis/company-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/pennylane/apis/company-v2/revisions/871f863307e5?raw)
