---
title: "Sends an email for an entity"
method: POST
path: "/api/v1/emails"
tags: ["emails"]
---

# Sends an email for an entity

`POST /api/v1/emails`

## Request

- Base URL: `https://demo.invoiceninja.com`
- URL: `https://demo.invoiceninja.com/api/v1/emails`
- Auth: none declared. Required headers: `X-Requested-With`
- TypeScript: <https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/docs/api/v1/emails/post.ts> (a function with typed inputs; its response is checked against the schema)

Sends an email for an entity

## Headers

- `X-Requested-With` string, required

## Request body

- object
  - `subject` string: The email subject
  - `body` string: The email body
  - `entity` string, required: The entity name
  - `entity_id` string, required: The entity_id
  - `cc_email` string: The email address of a user to be CC'd on the email
  - `template` 'email_template_invoice' | 'email_template_quote' | 'email_template_credit' | 'email_template_payment' | 'email_template_payment_partial' | 'email_template_statement' | 'email_template_reminder1' | 'email_template_reminder2' | 'email_template_reminder3' | 'email_template_reminder_endless' | 'email_template_custom1' | 'email_template_custom2' | 'email_template_custom3' | 'email_template_purchase_order' | 'email_quote_template_reminder1', required: The template required

## Response `200`

success

- Template
  - `html` string: The template HTML

## Other responses

- `401`: Authentication error
- `403`: Authorization error
- `422`: Validation error
- `default`: Unexpected Error

## Changes

- **2024-12-16** `d5c45b441b72`: 14 breaking, 14 info
  - removed the enum value `credit` of the request property `template`
  - removed the enum value `custom1` of the request property `template`
  - removed the enum value `custom2` of the request property `template`
  - removed the enum value `custom3` of the request property `template`
  - …24 more
- **2024-11-23** `a80e474b5da3`: 1 breaking, 15 info
  - request property `template` was restricted to a list of enum values
  - added the new `credit` enum value to the request property `template`
  - added the new `custom1` enum value to the request property `template`
  - added the new `custom2` enum value to the request property `template`
  - …12 more
- **2024-06-06** `8e82a2bd77e0`: 1 breaking, 2 info
  - the response's body type changed from no type to `object` for status `default`
  - added the optional property `code` to the response with the `default` status
  - added the optional property `message` to the response with the `default` status
- **2024-06-05** `e61df65649e2`: 1 breaking, 2 warning
  - the response's body type changed from `object` to no type for status `default`
  - removed the optional property `code` from the response with the `default` status
  - removed the optional property `message` from the response with the `default` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/changes/api/v1/emails/post.md)

---

[API](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference.md) - [All operations](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/invoiceninja/apis/invoice-ninja-api-reference/revisions/bcda1f823746?raw)
