API - Integration with other services


This is an old documentation

This documentation page is valid upto version 7.0.28 of Email This Issue.

For 7.1 and later versions, the documentation is in a new location.

Email This Issue provides two types of API components that makes it possible to integrate it with other addons or external services.


The REST API is a RESTFul service method that will send emails. 

REST path$JIRA_BASE_URL/rest/jeti/1.0/email
Request MethodPOST
Request Headers



What JIRA REST API offers

See details in the documentation

Request BodyEmail parameters in JSON
  • 200: if email is composed and sent successfully
  • 500: if an error occured while composing and sending the email

Request Body Json

Request Body must be a well formatted Json object with the following structure.

Request Body Json
"cc":["mary@anothercompany.com", "o:lead", "o:watchers"],
"emailSubject":"This is the email's subject as if the user entered it",
"emailBody":"This is the email body",
"emailTemplate":"Acknowledge Issue",

FIelds in the Json object is explained below.

issue(tick)Numberic ID of the issue, or Issue Key10000 or TEST-1

Array of recipients:

  • email addresses
  • JIRA user names
  • JIRA participants with prefix "o:"
  • group names with prefix "g:"
  • project role IDs with prefix "r:"
  • custom field IDs with prefix "cf:"


Participant examples:

  • o:me - current user
  • o:reporter - issue reporter
  • o:assignee - issue assignee
  • o:watchers - issue watchers
  • o:lead - project lead

Group examples:

  • g:jira-administrators

Role exmaples:

  • r:10000, where 10000 is the numeric ID of the role

Custom Field examples:

  • cf:customfield_10010
 Email Subject 
 Email Body 

Specifies how to select issue attachments to be added to the email



 Value is one of:
  • ALL: all issue attachments
  • NONE: none of the attachments
  • LATEST: newest version of all attachment

      • ADDED_LAST: most recently added attachments


Email template ID or name, email will be generated using this template.

If not given, the template selected in the issue's Context will be used.


Email options to control various aspects of the email.

  • addToWatchers: if true, JETI will add email user recipients as watchers of the issue
  • replyToMe: if true, JETI will set the current user's email address as the Reply-To header in the email
  • mailAsMe: if true, JETI will set the current user's email address as the From Address in the email
  • addComments: if true, JETI will add a comment to the issue.
  • suppressComment: if true, JETI will not fire an Issue Commented event
  • commentVisibility: if provided, JETI will secure the comment it adds to the issue.
  • richHtml: if true, JETI will interpret emailBody as a HTML content



Key-Value map of values that will be added to the Velocity Context used to generate email body.

Email template may refer to these values and may render them in the email.



OSGi Component

In case, your JIRA add-on want to use JETI's email capabilities, you can build an integration between your add-on and Email This Issue.

Simply import the OSGi component Email This Issue publishes and call its methods.

Component interface
Component method
void sendEmail(EmailDefinitionApi emailDefinition) throws Exception
Email parameters

Email Parameters

public class EmailDefinitionApi {
    private String issue;

    private List<String> to;
    private List<String> cc;
    private List<String> bcc;
    private EmailOptions emailOptions;
    private String emailBody;
    private String emailSubject;

    private List<String> attachments;
    private String addAttachments;
    private String emailTemplate;
    private Map<String, Object> payload;