Send an email template to a single person as a one-off email.
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"PersonUid": "<string>",
"FromEmail": "<string>",
"FromName": "<string>",
"Subject": "<string>"
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send"
payload = {
"PersonUid": "<string>",
"FromEmail": "<string>",
"FromName": "<string>",
"Subject": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
PersonUid: '<string>',
FromEmail: '<string>',
FromName: '<string>',
Subject: '<string>'
})
};
fetch('https://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send', 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://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send",
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([
'PersonUid' => '<string>',
'FromEmail' => '<string>',
'FromName' => '<string>',
'Subject' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send"
payload := strings.NewReader("{\n \"PersonUid\": \"<string>\",\n \"FromEmail\": \"<string>\",\n \"FromName\": \"<string>\",\n \"Subject\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"PersonUid\": \"<string>\",\n \"FromEmail\": \"<string>\",\n \"FromName\": \"<string>\",\n \"Subject\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"PersonUid\": \"<string>\",\n \"FromEmail\": \"<string>\",\n \"FromName\": \"<string>\",\n \"Subject\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Template": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Name": "string",
"Subject": "string",
"Body": "string",
"Design": "string",
"Description": "string",
"SystemName": "string",
"IsInternal": false,
"AvailableTokens": "string",
"RequiredTokens": "string",
"Tag": "string",
"Tags": []
},
"Recipient": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"Email": "string",
"FirstName": "string",
"LastName": "string",
"MailingAddress": {},
"PasswordLastUpdated": "string",
"PasswordMustChange": false,
"PhoneMobile": "string",
"PhoneWork": "string",
"ProfileImageS3Url": "string",
"Title": "string",
"Timezone": "string",
"Language": "string",
"IPAddress": "string",
"Referer": "string",
"UserAgent": "string",
"LastLoginDateTime": "string",
"OAuthGoogleProfileId": "string",
"PersonAccount": [],
"DealPeople": [],
"LeadFormSubmissions": [],
"Account": {},
"AccountUids": "string",
"EmailListPerson": [],
"FullName": "string",
"HasLoggedIn": false,
"OAuthIntegrationStatus": 0,
"OptInToEmailList": false,
"RecaptchaToken": "string",
"UserAgentPlatformBrowser": "string",
"HasUnsubscribed": false,
"DiscordUser": {},
"IsConnectedToDiscord": false
},
"UniqueMessageId": "string",
"Subject": "string",
"FromEmail": "string",
"FromName": "string",
"SendDateTime": "string",
"ProcessDateTime": "string",
"DeliverDateTime": "string",
"BounceDateTime": "string",
"SpamDateTime": "string",
"OpenDateTime": "string",
"ClickDateTime": "string",
"UnsubscribeDateTime": "string",
"SendError": "string"
}Email templates
Send an email template to a single person as a one-off email.
The email is merge-rendered for the person and sent immediately. No broadcast is created. People who have bounced, unsubscribed or reported spam are not sent the email. Only templates from Email > Email templates can be sent.
The response holds the record of the send. Read the open and click analytics for it later from the emails endpoint for the template. The template and the recipient are left out of the response unless they are asked for, for example fields=*,Template.Uid,Recipient.Uid.
POST
/
api
/
v1
/
templates
/
{templateUid}
/
send
Send an email template to a single person as a one-off email.
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"PersonUid": "<string>",
"FromEmail": "<string>",
"FromName": "<string>",
"Subject": "<string>"
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send"
payload = {
"PersonUid": "<string>",
"FromEmail": "<string>",
"FromName": "<string>",
"Subject": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
PersonUid: '<string>',
FromEmail: '<string>',
FromName: '<string>',
Subject: '<string>'
})
};
fetch('https://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send', 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://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send",
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([
'PersonUid' => '<string>',
'FromEmail' => '<string>',
'FromName' => '<string>',
'Subject' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send"
payload := strings.NewReader("{\n \"PersonUid\": \"<string>\",\n \"FromEmail\": \"<string>\",\n \"FromName\": \"<string>\",\n \"Subject\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"PersonUid\": \"<string>\",\n \"FromEmail\": \"<string>\",\n \"FromName\": \"<string>\",\n \"Subject\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/templates/{templateUid}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"PersonUid\": \"<string>\",\n \"FromEmail\": \"<string>\",\n \"FromName\": \"<string>\",\n \"Subject\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Template": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Name": "string",
"Subject": "string",
"Body": "string",
"Design": "string",
"Description": "string",
"SystemName": "string",
"IsInternal": false,
"AvailableTokens": "string",
"RequiredTokens": "string",
"Tag": "string",
"Tags": []
},
"Recipient": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"SchemaLessData": {},
"Email": "string",
"FirstName": "string",
"LastName": "string",
"MailingAddress": {},
"PasswordLastUpdated": "string",
"PasswordMustChange": false,
"PhoneMobile": "string",
"PhoneWork": "string",
"ProfileImageS3Url": "string",
"Title": "string",
"Timezone": "string",
"Language": "string",
"IPAddress": "string",
"Referer": "string",
"UserAgent": "string",
"LastLoginDateTime": "string",
"OAuthGoogleProfileId": "string",
"PersonAccount": [],
"DealPeople": [],
"LeadFormSubmissions": [],
"Account": {},
"AccountUids": "string",
"EmailListPerson": [],
"FullName": "string",
"HasLoggedIn": false,
"OAuthIntegrationStatus": 0,
"OptInToEmailList": false,
"RecaptchaToken": "string",
"UserAgentPlatformBrowser": "string",
"HasUnsubscribed": false,
"DiscordUser": {},
"IsConnectedToDiscord": false
},
"UniqueMessageId": "string",
"Subject": "string",
"FromEmail": "string",
"FromName": "string",
"SendDateTime": "string",
"ProcessDateTime": "string",
"DeliverDateTime": "string",
"BounceDateTime": "string",
"SpamDateTime": "string",
"OpenDateTime": "string",
"ClickDateTime": "string",
"UnsubscribeDateTime": "string",
"SendError": "string"
}Body
application/json
The recipient and the optional from address and subject overrides.