# Reference

You can also view the [API documentation](https://documenter.getpostman.com/view/460427/TVRj5o3E) in Postman.

## Send Email

<mark style="color:green;">`POST`</mark> `https://api.encharge.io/v1/emails/send`

Send transactional emails with Encharge.

#### Query Parameters

| Name  | Type   | Description            |
| ----- | ------ | ---------------------- |
| token | string | Your Encharge API key. |

#### Request Body

| Name               | Type    | Description                                                                                                                                                                                                                                                       |
| ------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| template           | string  | <p>The name of the email template to use.<br><em>Only</em> <em>one of `text`, `html` or `template` may be set.</em></p>                                                                                                                                           |
| html               | string  | <p>The content of your HTML email.<br><em>Only one of `text`, `html` or `template` may be set.</em></p>                                                                                                                                                           |
| text               | string  | <p>The content of your plain-text email.<br><em>Only one of `text`, `html` or `template` may be set.</em></p>                                                                                                                                                     |
| to                 | string  | <p>Email address of the recipient.<br><em>If the person has been previously created in Encharge, you can pass an object with `userId` and we'll use the email we have for this user.</em></p>                                                                     |
| from               | string  | <p>Email address of the sender.<br><em>If you'd like to set the sender name, pass an object with `email` and `name`. If a template is specified, this will overwrite the sender details in the template.</em></p>                                                 |
| templateProperties | object  | <p>Dictionary of properties to be replaced in the email.   <br>For example, passing <br>{"loginURL":"<https://app.encharge.io/login/3n2l3ad99"}>  will replace `{{ loginURL }}` in the email body or subject. </p>                                                |
| unsubscribeCheck   | boolean | <p>By default, we will not send to people who have unsubscribed from your emails.<br>Using caution, you can send to unsubscribed people by setting this flag to `false`.</p>                                                                                      |
| UTMTags            | boolean | <p>If you've enabled Automatic UTM tagging in your Encharge account, we will tag all links in your emails.<br>To disable this behavior, set this flag to `false`.</p>                                                                                             |
| cc                 | String  | Email addresses to CC in the current email. Multiple addresses can be passed as a comma-separated string.                                                                                                                                                         |
| bcc                | String  | Email addresses to BCC in the current email. Multiple addresses can be passed as a comma-separated string.                                                                                                                                                        |
| reply              | String  | <p>Email address to reply to.<br><em>Uses the <code>from</code> address if unspecified. If you'd like to set the reply name, pass an object with `email` and `name`. If a template is specified, this will overwrite the sender details in the template.</em></p> |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}

{% tab title="400 " %}

```javascript
{
    "error": {
        "message": "Missing email content. Please pass `template`, `html` or `text`",
        "stack": "Error: \n    at new APIException (/home/slav/code/monorepo/packages/domain/exceptions/api_exceptions.ts:34:18)\n    at new BadRequestException (/home/slav/code/monorepo/packages/domain/lib/exceptions/api_exceptions.js:22:9)\n    at Function.getTemplate (/home/slav/code/monorepo/packages/api/src/services/TransactionalEmailService.ts:153:15)",
        "markdown": "<p>Missing email content. Please pass <code>template</code>, <code>html</code> or <code>text</code></p>\n",
        "traceId": "9751fe70-0957-11eb-a6b8-3baf67de29f8"
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.encharge.io/transactional-email-api/reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
