Set the email
curl --request PUT \
--url https://api.tented.ai/v1/email-blasts/{blastId}/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "existing",
"email_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.tented.ai/v1/email-blasts/{blastId}/email"
payload = {
"source": "existing",
"email_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({source: 'existing', email_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.tented.ai/v1/email-blasts/{blastId}/email', 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://api.tented.ai/v1/email-blasts/{blastId}/email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'source' => 'existing',
'email_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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://api.tented.ai/v1/email-blasts/{blastId}/email"
payload := strings.NewReader("{\n \"source\": \"existing\",\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.tented.ai/v1/email-blasts/{blastId}/email")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"existing\",\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/email-blasts/{blastId}/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"existing\",\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"blast_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"status": "draft",
"description": "<string>",
"audience_list_id": "<string>",
"audience_source": "<string>",
"audience": {
"list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"name": "<string>",
"kind": "<string>",
"member_count": 123
},
"email_id": "<string>",
"email_source": "<string>",
"email": {
"email_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"name": "<string>",
"status": "<string>",
"subject": "<string>",
"current_version": 123,
"approved_version": 123
},
"operational": true,
"scheduled_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"approved_email_version": 123,
"sent_at": "2023-11-07T05:31:56Z",
"send_mode": "<string>",
"details": {
"blast_recipient_count": 123,
"blast_qualified_count": 123,
"blast_sent_count": 123,
"blast_failed_count": 123,
"blast_blocked_count": 123,
"blast_audience_truncated": true,
"blast_delivered_count": 123,
"blast_opened_count": 123,
"blast_clicked_count": 123,
"blast_bounced_count": 123,
"blast_spam_count": 123,
"blast_unsubscribed_count": 123
},
"approval_readiness": {
"ready": true,
"missing": [
"<string>"
],
"warnings": [
"<string>"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}Email Blasts
Set the email
Attach the email to send — an existing email, or one created inline (from a template, your own HTML, or a blank scaffold). Only editable while the blast is a draft.
PUT
/
v1
/
email-blasts
/
{blastId}
/
email
Set the email
curl --request PUT \
--url https://api.tented.ai/v1/email-blasts/{blastId}/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source": "existing",
"email_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.tented.ai/v1/email-blasts/{blastId}/email"
payload = {
"source": "existing",
"email_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({source: 'existing', email_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.tented.ai/v1/email-blasts/{blastId}/email', 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://api.tented.ai/v1/email-blasts/{blastId}/email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'source' => 'existing',
'email_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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://api.tented.ai/v1/email-blasts/{blastId}/email"
payload := strings.NewReader("{\n \"source\": \"existing\",\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.tented.ai/v1/email-blasts/{blastId}/email")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"existing\",\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tented.ai/v1/email-blasts/{blastId}/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source\": \"existing\",\n \"email_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"blast_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"status": "draft",
"description": "<string>",
"audience_list_id": "<string>",
"audience_source": "<string>",
"audience": {
"list_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"name": "<string>",
"kind": "<string>",
"member_count": 123
},
"email_id": "<string>",
"email_source": "<string>",
"email": {
"email_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "<string>",
"name": "<string>",
"status": "<string>",
"subject": "<string>",
"current_version": 123,
"approved_version": 123
},
"operational": true,
"scheduled_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"approved_email_version": 123,
"sent_at": "2023-11-07T05:31:56Z",
"send_mode": "<string>",
"details": {
"blast_recipient_count": 123,
"blast_qualified_count": 123,
"blast_sent_count": 123,
"blast_failed_count": 123,
"blast_blocked_count": 123,
"blast_audience_truncated": true,
"blast_delivered_count": 123,
"blast_opened_count": 123,
"blast_clicked_count": 123,
"blast_bounced_count": 123,
"blast_spam_count": 123,
"blast_unsubscribed_count": 123
},
"approval_readiness": {
"ready": true,
"missing": [
"<string>"
],
"warnings": [
"<string>"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}{
"error": "<string>",
"error_code": "<string>",
"message": "<string>",
"code": "<string>",
"details": {},
"limit": 123,
"current": 123
}Authorizations
Body
application/json
Response
Email attached.
An email blast. approval_readiness is included only while the blast is a draft.