curl --request POST \
--url https://cloud.memsource.com/web/api2/v1/emailTemplates \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"name": "<string>",
"subject": "<string>",
"type": "<string>",
"bccAddress": "<string>",
"ccAddress": "<string>"
}
'import requests
url = "https://cloud.memsource.com/web/api2/v1/emailTemplates"
payload = {
"body": "<string>",
"name": "<string>",
"subject": "<string>",
"type": "<string>",
"bccAddress": "<string>",
"ccAddress": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('<string>'),
name: '<string>',
subject: '<string>',
type: '<string>',
bccAddress: '<string>',
ccAddress: '<string>'
})
};
fetch('https://cloud.memsource.com/web/api2/v1/emailTemplates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.memsource.com/web/api2/v1/emailTemplates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'body' => '<string>',
'name' => '<string>',
'subject' => '<string>',
'type' => '<string>',
'bccAddress' => '<string>',
'ccAddress' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.memsource.com/web/api2/v1/emailTemplates"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"subject\": \"<string>\",\n \"type\": \"<string>\",\n \"bccAddress\": \"<string>\",\n \"ccAddress\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cloud.memsource.com/web/api2/v1/emailTemplates")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"subject\": \"<string>\",\n \"type\": \"<string>\",\n \"bccAddress\": \"<string>\",\n \"ccAddress\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.memsource.com/web/api2/v1/emailTemplates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"subject\": \"<string>\",\n \"type\": \"<string>\",\n \"bccAddress\": \"<string>\",\n \"ccAddress\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"body": "<string>",
"name": "<string>",
"subject": "<string>",
"type": "JobAssigned",
"bccAddress": "<string>",
"ccAddress": "<string>",
"id": "<string>",
"uid": "<string>"
}Create (or duplicate/clone) email template
Requires an internal user role (Admin or Project Manager) with the Setup server access right. Returns 403 Forbidden if the organization has no custom email templates override and restricted editing is switched off, or if the organization is a trial organization without the custom email templates override. Also used to duplicate/clone an existing template: fetch the source template via list/get, then resubmit its fields here (typically with a new name). For security, links in the subject/body may only be created with Phrase template variables (e.g. ); introducing any other link (literal URL, script) is rejected with 400. Organizations without the custom email templates override may edit within limits: an edit that adds no new link and does not change cc/bcc is unrestricted, while an edit that adds a link or changes cc/bcc is limited per organization per day and across all organizations per hour (429 Too Many Requests once exceeded). Setting or changing ccAddress/bccAddress is only accepted for an allow-listed set of template types and is limited in the number of addresses per field; otherwise 400 is returned. Clearing them or leaving them unchanged is always accepted. Organization admins are notified by email when cc/bcc is set or changed.
curl --request POST \
--url https://cloud.memsource.com/web/api2/v1/emailTemplates \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"name": "<string>",
"subject": "<string>",
"type": "<string>",
"bccAddress": "<string>",
"ccAddress": "<string>"
}
'import requests
url = "https://cloud.memsource.com/web/api2/v1/emailTemplates"
payload = {
"body": "<string>",
"name": "<string>",
"subject": "<string>",
"type": "<string>",
"bccAddress": "<string>",
"ccAddress": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('<string>'),
name: '<string>',
subject: '<string>',
type: '<string>',
bccAddress: '<string>',
ccAddress: '<string>'
})
};
fetch('https://cloud.memsource.com/web/api2/v1/emailTemplates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cloud.memsource.com/web/api2/v1/emailTemplates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'body' => '<string>',
'name' => '<string>',
'subject' => '<string>',
'type' => '<string>',
'bccAddress' => '<string>',
'ccAddress' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://cloud.memsource.com/web/api2/v1/emailTemplates"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"subject\": \"<string>\",\n \"type\": \"<string>\",\n \"bccAddress\": \"<string>\",\n \"ccAddress\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://cloud.memsource.com/web/api2/v1/emailTemplates")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"subject\": \"<string>\",\n \"type\": \"<string>\",\n \"bccAddress\": \"<string>\",\n \"ccAddress\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.memsource.com/web/api2/v1/emailTemplates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"<string>\",\n \"name\": \"<string>\",\n \"subject\": \"<string>\",\n \"type\": \"<string>\",\n \"bccAddress\": \"<string>\",\n \"ccAddress\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"body": "<string>",
"name": "<string>",
"subject": "<string>",
"type": "JobAssigned",
"bccAddress": "<string>",
"ccAddress": "<string>",
"id": "<string>",
"uid": "<string>"
}Authorizations
Get a token from auth/login endpoint and then pass it in the Authorization HTTP header in every subsequent API call. For more information visit our help center.
Body
Fields of the email template to create
Fields used to create a new email template or replace an existing one
Response
OK
An organization email template, as returned by the email template endpoints
Email template type. The LoginInfo value is deprecated.
JobAssigned, JobStatusChanged, NextWorkflowStep, JobRejected, LoginInfo, ProjectTransferredToBuyer, SharedProjectAssigned, SharedProjectStatusChanged, AutomatedProjectCreated, AutomatedProjectSourceUpdated, AutomatedProjectStatusChanged, JobWidgetProjectQuotePrepared, JobWidgetProjectQuotePreparationFailure, JobWidgetProjectCreated, JobWidgetProjectCompleted, CmsQuoteReady, CmsWorkCompleted, CmsJobRejected, QUOTE_UPDATED, QUOTE_STATUS_CHANGED, LQA_SHARE_REPORT, PLATFORM_WORK_COMPLETED, PLATFORM_WORK_DECLINED, PLATFORM_WORK_NEW, UserMentionOrComment, ProjectNewReference Was this page helpful?