Email Template
An email template object represents templates one can choose from when sending an email from Rossum.
Email Template Types
rejection- Template for a rejection email (can be manually created and deleted)rejection_default- Default template for a rejection emailemail_with_no_processable_attachments- Template for a reply to an email with no attachmentscustom- Custom email template (can be manually created and deleted)
Every newly created queue triggers a creation of five default email templates with default messages and subjects.
Email templates
Email templates support variable expansion for dynamic content rendering using double curly brackets: {{ variable }}.
Please note that only simple variables are supported. Filters and the . lookup are not. A template such as:
{% if subject %}
The subject is {{ subject }}.
{% endif %}
The message is {{ message }}.with template settings such as:
{'subject': 'Hello', 'message': 'World'}will render as:
{% if subject %}
The subject is Hello.
{% endif %}
The message is World.Email template
ID of the email template
URL of the email template
Name of the email template
Queue URL.
Organization URL.
URLs of the linked triggers
Default:[]Type of the email template. Only templates with types rejection and custom can be manually created and deleted.
rejection- Template for a rejection emailrejection_default- Default template for a rejection emailemail_with_no_processable_attachments- Template for a reply to an email with no attachmentscustom- Custom email template
"custom"Email subject
Default:""HTML subset of text email section
Default:""(Deprecated) Use automate instead
trueTrue if user wants to send email automatically on the action
Default:trueUser that last modified the object.
Timestamp of last modification.
List email templates
GET api / v1 / email_templates
Retrieve all email template objects.
curl -X GET "https://example.rossum.app/api/v1/email_templates"{
"pagination": {
"next": null,
"previous": null
},
"results": [
{
"id": 1234,
"url": "https://example.rossum.app/api/v1/email_templates/789",
"name": "My Email Template",
"queue": "https://example.rossum.app/api/v1/queues/8198",
"organization": "string",
"triggers": [
"https://example.rossum.app/api/v1/triggers/500",
"https://example.rossum.app/api/v1/triggers/600"
],
"type": "custom",
"subject": "My Email Template Subject",
"message": "<p>My Email Template Message</p>",
"enabled": true,
"automate": true,
"to": [
{
"email": "recipient@example.com",
"name": "Recipient Name"
}
],
"cc": [],
"bcc": [],
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z"
}
]
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
OK
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Create email template
POST api / v1 / email_templates
Create new email template object.
curl -X POST "https://example.rossum.app/api/v1/email_templates" \ -H "Content-Type: application/json" \ -d '{ "name": "My Email Template", "queue": "https://example.rossum.app/api/v1/queues/8198" }'{
"id": 1234,
"url": "https://example.rossum.app/api/v1/email_templates/789",
"name": "My Email Template",
"queue": "https://example.rossum.app/api/v1/queues/8198",
"organization": "string",
"triggers": [
"https://example.rossum.app/api/v1/triggers/500",
"https://example.rossum.app/api/v1/triggers/600"
],
"type": "custom",
"subject": "My Email Template Subject",
"message": "<p>My Email Template Message</p>",
"enabled": true,
"automate": true,
"to": [
{
"email": "recipient@example.com",
"name": "Recipient Name"
}
],
"cc": [],
"bcc": [],
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
Name of the email template
Queue URL.
Organization URL.
URLs of the linked triggers
Default:[]Type of the email template. Only templates with types rejection and custom can be manually created and deleted.
rejection- Template for a rejection emailrejection_default- Default template for a rejection emailemail_with_no_processable_attachments- Template for a reply to an email with no attachmentscustom- Custom email template
"custom"Email subject
Default:""HTML subset of text email section
Default:""(Deprecated) Use automate instead
trueTrue if user wants to send email automatically on the action
Default:trueResponse
Created
ID of the email template
URL of the email template
Name of the email template
Queue URL.
Organization URL.
URLs of the linked triggers
Default:[]Type of the email template. Only templates with types rejection and custom can be manually created and deleted.
rejection- Template for a rejection emailrejection_default- Default template for a rejection emailemail_with_no_processable_attachments- Template for a reply to an email with no attachmentscustom- Custom email template
"custom"Email subject
Default:""HTML subset of text email section
Default:""(Deprecated) Use automate instead
trueTrue if user wants to send email automatically on the action
Default:trueUser that last modified the object.
Timestamp of last modification.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Retrieve email template
GET api / v1 / email_templates / {emailTemplateID}
Get an email template object.
curl -X GET "https://example.rossum.app/api/v1/email_templates/0"{
"id": 1234,
"url": "https://example.rossum.app/api/v1/email_templates/789",
"name": "My Email Template",
"queue": "https://example.rossum.app/api/v1/queues/8198",
"organization": "string",
"triggers": [
"https://example.rossum.app/api/v1/triggers/500",
"https://example.rossum.app/api/v1/triggers/600"
],
"type": "custom",
"subject": "My Email Template Subject",
"message": "<p>My Email Template Message</p>",
"enabled": true,
"automate": true,
"to": [
{
"email": "recipient@example.com",
"name": "Recipient Name"
}
],
"cc": [],
"bcc": [],
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
OK
ID of the email template
URL of the email template
Name of the email template
Queue URL.
Organization URL.
URLs of the linked triggers
Default:[]Type of the email template. Only templates with types rejection and custom can be manually created and deleted.
rejection- Template for a rejection emailrejection_default- Default template for a rejection emailemail_with_no_processable_attachments- Template for a reply to an email with no attachmentscustom- Custom email template
"custom"Email subject
Default:""HTML subset of text email section
Default:""(Deprecated) Use automate instead
trueTrue if user wants to send email automatically on the action
Default:trueUser that last modified the object.
Timestamp of last modification.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Partial update email template
PATCH api / v1 / email_templates / {emailTemplateID}
Update part of an email template object.
curl -X PATCH "https://example.rossum.app/api/v1/email_templates/0" \ -H "Content-Type: application/json" \ -d '{}'{
"id": 1234,
"url": "https://example.rossum.app/api/v1/email_templates/789",
"name": "My Email Template",
"queue": "https://example.rossum.app/api/v1/queues/8198",
"organization": "string",
"triggers": [
"https://example.rossum.app/api/v1/triggers/500",
"https://example.rossum.app/api/v1/triggers/600"
],
"type": "custom",
"subject": "My Email Template Subject",
"message": "<p>My Email Template Message</p>",
"enabled": true,
"automate": true,
"to": [
{
"email": "recipient@example.com",
"name": "Recipient Name"
}
],
"cc": [],
"bcc": [],
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
Name of the email template
Queue URL.
Organization URL.
URLs of the linked triggers
Default:[]Type of the email template. Only templates with types rejection and custom can be manually created and deleted.
rejection- Template for a rejection emailrejection_default- Default template for a rejection emailemail_with_no_processable_attachments- Template for a reply to an email with no attachmentscustom- Custom email template
"custom"Email subject
Default:""HTML subset of text email section
Default:""(Deprecated) Use automate instead
trueTrue if user wants to send email automatically on the action
Default:trueResponse
OK
ID of the email template
URL of the email template
Name of the email template
Queue URL.
Organization URL.
URLs of the linked triggers
Default:[]Type of the email template. Only templates with types rejection and custom can be manually created and deleted.
rejection- Template for a rejection emailrejection_default- Default template for a rejection emailemail_with_no_processable_attachments- Template for a reply to an email with no attachmentscustom- Custom email template
"custom"Email subject
Default:""HTML subset of text email section
Default:""(Deprecated) Use automate instead
trueTrue if user wants to send email automatically on the action
Default:trueUser that last modified the object.
Timestamp of last modification.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Delete email template
DELETE api / v1 / email_templates / {emailTemplateID}
Delete an email template object.
curl -X DELETE "https://example.rossum.app/api/v1/email_templates/0"{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
No Content
No response body.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Update email template
PUT api / v1 / email_templates / {emailTemplateID}
Update email template object.
curl -X PUT "https://example.rossum.app/api/v1/email_templates/0" \ -H "Content-Type: application/json" \ -d '{ "name": "My Email Template", "queue": "https://example.rossum.app/api/v1/queues/8198" }'{
"id": 1234,
"url": "https://example.rossum.app/api/v1/email_templates/789",
"name": "My Email Template",
"queue": "https://example.rossum.app/api/v1/queues/8198",
"organization": "string",
"triggers": [
"https://example.rossum.app/api/v1/triggers/500",
"https://example.rossum.app/api/v1/triggers/600"
],
"type": "custom",
"subject": "My Email Template Subject",
"message": "<p>My Email Template Message</p>",
"enabled": true,
"automate": true,
"to": [
{
"email": "recipient@example.com",
"name": "Recipient Name"
}
],
"cc": [],
"bcc": [],
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
Name of the email template
Queue URL.
Organization URL.
URLs of the linked triggers
Default:[]Type of the email template. Only templates with types rejection and custom can be manually created and deleted.
rejection- Template for a rejection emailrejection_default- Default template for a rejection emailemail_with_no_processable_attachments- Template for a reply to an email with no attachmentscustom- Custom email template
"custom"Email subject
Default:""HTML subset of text email section
Default:""(Deprecated) Use automate instead
trueTrue if user wants to send email automatically on the action
Default:trueResponse
OK
ID of the email template
URL of the email template
Name of the email template
Queue URL.
Organization URL.
URLs of the linked triggers
Default:[]Type of the email template. Only templates with types rejection and custom can be manually created and deleted.
rejection- Template for a rejection emailrejection_default- Default template for a rejection emailemail_with_no_processable_attachments- Template for a reply to an email with no attachmentscustom- Custom email template
"custom"Email subject
Default:""HTML subset of text email section
Default:""(Deprecated) Use automate instead
trueTrue if user wants to send email automatically on the action
Default:trueUser that last modified the object.
Timestamp of last modification.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Render email template
POST api / v1 / email_templates / {emailTemplateID} / render
The rendered email template can be requested via the render endpoint.
Inside the to, cc and bcc attributes template variables can be used instead of the email field of the email address object.
curl -X POST "https://example.rossum.app/api/v1/email_templates/0/render" \ -H "Content-Type: application/json" \ -d '{}'{
"to": [
{
"email": "satisfied.customer@rossum.ai"
}
],
"cc": [],
"bcc": [],
"subject": "My Email Template Subject: Rendered Parent Email Subject",
"message": "<p>My Email Template Message from user@example.com</p>"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
Link to parent email
List of document URLs to simulate sending of documents over email into Rossum
Default:[]List of annotation URLs to use for rendering values for annotation.content placeholders
Default:[]Values to fill in the email template
Default:{}Response
OK
Rendered email template's subject
Rendered email template's message
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error