Email

Send email

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 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

PlaceholderDescriptionCan be used in automation
organization_nameName of the organization.True
app_urlApp root urlTrue
user_nameUsername of the user sending the email.False
current_user_fullnameFull name of user sending the email.False
current_user_emailEmail address of the user sending the email.False
parent_email_subjectSubject of the email we are replying to.True
sender_emailEmail address of the author of the incoming email.True
annotation.document.original_file_nameFilenames 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.idIDs of the related annotation(s)True
annotation.urlUrls of the related annotation(s)True
annotation.assignee_emailEmails of the assigned users to the related annotation(s)True
post/api/v1/emails/send

Request body

queuestring uri required

Queue URL.

related_annotationsstring[]

List of links to email-related annotations.

related_documentsstring[]

List of URLs to email-related documents (on the top of related_annotations documents which are linked automatically).

parent_emailstring uri

Link to parent email.

reset_related_annotations_email_threadboolean

Update related annotations, so that their email thread matches the one of the email object created.

labelsstring[]

List of email labels.

email_templatestring 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.

Example request

{
  "to": [
    {
      "email": "john.doe@example.com",
      "name": "John Doe"
    }
  ],
  "cc": [
    {
      "email": "john.doe@example.com",
      "name": "John Doe"
    }
  ],
  "bcc": [
    {
      "email": "john.doe@example.com",
      "name": "John Doe"
    }
  ],
  "template_values": {
    "subject": "Document processed",
    "message": "<p>The document was processed.<br>{{user_name}}<br>Additional notes: {{note}}</p>",
    "note": "No issues found"
  },
  "queue": "https://example.rossum.app/api/v1/queues/8198",
  "related_annotations": [
    "https://example.rossum.app/api/v1/annotations/123"
  ],
  "related_documents": [
    "https://example.rossum.app/api/v1/documents/123"
  ],
  "attachments": {
    "documents": [
      "https://example.rossum.app/api/v1/documents/123"
    ]
  },
  "parent_email": "https://example.rossum.app/api/v1/emails/1234",
  "labels": [
    "forwarded"
  ],
  "email_template": "https://example.rossum.app/api/v1/email_templates/789"
}

Response

OK

urlstring uri

URL of the created email

Example response

{
  "url": "https://example.rossum.app/api/v1/emails/1234"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.