Get email template
curl --request GET \
--url https://api.cx.stax.ai/library/email_template/{email_template} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.cx.stax.ai/library/email_template/{email_template}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.cx.stax.ai/library/email_template/{email_template}', 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.cx.stax.ai/library/email_template/{email_template}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cx.stax.ai/library/email_template/{email_template}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cx.stax.ai/library/email_template/{email_template}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cx.stax.ai/library/email_template/{email_template}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"email_template": {
"_id": "<string>",
"activity": [
{
"_id": "<string>",
"action": "<string>",
"changes": [
{
"data": "<string>",
"field": "<string>",
"from": "<string>",
"to": "<string>"
}
],
"client": "<string>",
"on_id": "<string>",
"on_py": 123,
"on_type": "<string>",
"team": "<string>",
"timestamp": "<string>",
"user": "<string>"
}
],
"append_signature": true,
"attachments": [
"<string>"
],
"body": "<string>",
"branded": {
"alignment": "<string>",
"background_color": "<string>",
"font_family": "<string>",
"foreground_color": "<string>",
"header_background": "<string>",
"sections": [
{
"content": "<string>",
"type": "<string>",
"url": "<string>"
}
]
},
"created_at": "<string>",
"deleted_at": "<string>",
"locked": true,
"n_attachments": 123,
"n_bulk_sends": 123,
"name": "<string>",
"schedule": [
{
"allow_partial": true,
"cc": [
"<string>"
],
"clients": [
"<string>"
],
"clients_filter": {
"assignee": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"status": [
"<string>"
],
"tags": [
"<string>"
]
},
"file": "<string>",
"from": "<string>",
"plans": [
"<string>"
],
"plans_filter": {
"client": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"provisions": {},
"pye": "<unknown>",
"status": [
"<string>"
],
"tags": [
"<string>"
],
"type": [
"<string>"
]
},
"stop_on_render_failure": true,
"timestamp": "<string>",
"to": [
"<string>"
]
}
],
"secure": true,
"subject": "<string>",
"tags": [
"<string>"
],
"team": "<string>",
"type": "<string>"
},
"scheduled_sends": [
{
"_id": "<string>",
"attachments": [
"<string>"
],
"capability_id": "<string>",
"created_on": "<string>",
"domain": "<string>",
"domain_id": "<string>",
"from_email": "<string>",
"from_name": "<string>",
"integration_id": "<string>",
"provider": "<string>",
"published_at": "<string>",
"recipients": {
"bcc": [
"<string>"
],
"cc": [
"<string>"
],
"clients": [
"<string>"
],
"deals": [
"<string>"
],
"plans": [
"<string>"
],
"to": [
"<string>"
]
},
"scheduled_time": "<string>",
"status": "<string>",
"stop_on_render_failure": true,
"team": "<string>",
"template": "<string>",
"user": "<string>"
}
]
}{}{}library
Get email template
Get email template details
GET
/
library
/
email_template
/
{email_template}
Get email template
curl --request GET \
--url https://api.cx.stax.ai/library/email_template/{email_template} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.cx.stax.ai/library/email_template/{email_template}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.cx.stax.ai/library/email_template/{email_template}', 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.cx.stax.ai/library/email_template/{email_template}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cx.stax.ai/library/email_template/{email_template}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cx.stax.ai/library/email_template/{email_template}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cx.stax.ai/library/email_template/{email_template}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"email_template": {
"_id": "<string>",
"activity": [
{
"_id": "<string>",
"action": "<string>",
"changes": [
{
"data": "<string>",
"field": "<string>",
"from": "<string>",
"to": "<string>"
}
],
"client": "<string>",
"on_id": "<string>",
"on_py": 123,
"on_type": "<string>",
"team": "<string>",
"timestamp": "<string>",
"user": "<string>"
}
],
"append_signature": true,
"attachments": [
"<string>"
],
"body": "<string>",
"branded": {
"alignment": "<string>",
"background_color": "<string>",
"font_family": "<string>",
"foreground_color": "<string>",
"header_background": "<string>",
"sections": [
{
"content": "<string>",
"type": "<string>",
"url": "<string>"
}
]
},
"created_at": "<string>",
"deleted_at": "<string>",
"locked": true,
"n_attachments": 123,
"n_bulk_sends": 123,
"name": "<string>",
"schedule": [
{
"allow_partial": true,
"cc": [
"<string>"
],
"clients": [
"<string>"
],
"clients_filter": {
"assignee": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"status": [
"<string>"
],
"tags": [
"<string>"
]
},
"file": "<string>",
"from": "<string>",
"plans": [
"<string>"
],
"plans_filter": {
"client": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"provisions": {},
"pye": "<unknown>",
"status": [
"<string>"
],
"tags": [
"<string>"
],
"type": [
"<string>"
]
},
"stop_on_render_failure": true,
"timestamp": "<string>",
"to": [
"<string>"
]
}
],
"secure": true,
"subject": "<string>",
"tags": [
"<string>"
],
"team": "<string>",
"type": "<string>"
},
"scheduled_sends": [
{
"_id": "<string>",
"attachments": [
"<string>"
],
"capability_id": "<string>",
"created_on": "<string>",
"domain": "<string>",
"domain_id": "<string>",
"from_email": "<string>",
"from_name": "<string>",
"integration_id": "<string>",
"provider": "<string>",
"published_at": "<string>",
"recipients": {
"bcc": [
"<string>"
],
"cc": [
"<string>"
],
"clients": [
"<string>"
],
"deals": [
"<string>"
],
"plans": [
"<string>"
],
"to": [
"<string>"
]
},
"scheduled_time": "<string>",
"status": "<string>",
"stop_on_render_failure": true,
"team": "<string>",
"template": "<string>",
"user": "<string>"
}
]
}{}{}Authorizations
Response
Email template details