---
title: "Send email"
method: POST
path: "/api/v1/emails/send"
tags: ["Email"]
---

# Send email

`POST /api/v1/emails/send`

Send email to specified recipients. The number of emails that can be sent is limited (10 for trials accounts).

At least one email in `to`, `cc`, `bcc` must be filled. The total number of recipients (`to`, `cc` and `bcc` together) cannot exceed 40.

If the related annotation has `null` email thread, it will be linked to the [email thread](/api/email-thread) related to the email created.

### Template values
The object `template_values` is used to create an outgoing email. Key `subject` is used to fill an email subject and `message` is used to fill a body of the email (it may contain a subset of HTML). Values may contain other placeholders that are either built-in (see below) or specified in the `template_values`. For placeholders referring to annotations, the annotations from `related_annotations` attribute are used for filling in correct values.

### List of built-in placeholders
  
| Placeholder                            | Description                                                        | Can be used in automation |
|----------------------------------------|--------------------------------------------------------------------|---------------------------|
| organization_name                      | Name of the organization.                                          | True                      |
| app_url                                | App root url                                                       | True                      |
| user_name                              | Username of the user sending the email.                            | False                     |
| current_user_fullname                  | Full name of user sending the email.                               | False                     |
| current_user_email                     | Email address of the user sending the email.                       | False                     |
| parent_email_subject                   | Subject of the email we are replying to.                           | True                      |
| sender_email                           | Email address of the author of the incoming email.                 | True                      |
| annotation.document.original_file_name | Filenames of the documents belonging to the related annotation(s)  | True                      |
| annotation.content.value.{schema_id}   | Content value of datapoints from email related annotation(s)       | True                      |
| annotation.id                          | IDs of the related annotation(s)                                   | True                      |
| annotation.url                         | Urls of the related annotation(s)                                  | True                      |
| annotation.assignee_email              | Emails of the assigned users to the related annotation(s)          | True                      |

## Request body

- SendEmailRequest
  - `to` EmailAddress[] — List that contains information about recipients.
    - `email` string, email, required — Email address.
    - `name` string, nullable — Name of the email recipient.
  - `cc` EmailAddress[] — List that contains information about recipients of carbon copy.
    - `email` string, email, required — Email address.
    - `name` string, nullable — Name of the email recipient.
  - `bcc` EmailAddress[] — List that contains information about recipients of blind carbon copy.
    - `email` string, email, required — Email address.
    - `name` string, nullable — Name of the email recipient.
  - `template_values` object — Values to fill in the email template, it should always contain `subject` and `message` keys.
    - `subject` string — Email subject template
    - `message` string — Email message template (may contain HTML)
  - `queue` string, uri, required — Queue URL.
  - `related_annotations` string[] — List of links to email-related annotations.
  - `related_documents` string[] — List of URLs to email-related documents (on the top of `related_annotations` documents which are linked automatically).
  - `attachments` object — Keys are attachment types (currently only `documents` key is supported), value is list of URL.
    - `documents` string[] — List of document URLs to attach
  - `parent_email` string, uri — Link to parent email.
  - `reset_related_annotations_email_thread` boolean — Update related annotations, so that their email thread matches the one of the email object created.
  - `labels` string[] — List of email labels.
  - `email_template` string, uri — Link to the email template that was used for the email creation. If specified, the email will be included in the email templates stats.

## Response `200`

OK

- object
  - `url` string, uri — URL of the created email

## Other responses

- `400` — Invalid input data.
- `401` — The username/password is invalid or token is invalid (e.g. expired).
- `403` — Insufficient permission, missing authentication, invalid CSRF token and similar issue.
- `404` — The specified resource was not found.
- `409` — Conflict
- `413` — Payload too large (especially for files uploaded).
- `429` — Request rate is too high, wait before sending more requests. See [Rate Limiting](/guides/overview#rate-limiting) for more details.
- `500` — Server failure while processing the request.
- `502` — Invalid response from the upstream server.
- `503` — We're temporarily offline for maintenance. Please try again later.
- `504` — Upstream server could not complete the request in time.

---

[API](https://skmtc.dev/rossum/apis/rossum-api.md) · [All operations](https://skmtc.dev/rossum/apis/rossum-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rossum/rossum-api/revisions/f1b5a910991d/schema)
