List Email Templates
curl --request GET \
--url http://api.stuut.ai/v1/email-templates \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.stuut.ai/v1/email-templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.stuut.ai/v1/email-templates', 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 => "http://api.stuut.ai/v1/email-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://api.stuut.ai/v1/email-templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.stuut.ai/v1/email-templates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.stuut.ai/v1/email-templates")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"object": "<string>",
"id": "<string>",
"attachments": [
{
"mime_type": "<string>",
"name": "<string>",
"object": "<string>",
"organization_id": "<string>",
"id": "<string>",
"content_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"disposition": "<string>",
"is_verified": true,
"modified_at": "2023-11-07T05:31:56Z",
"presigned_url": "<string>",
"presigned_url_expires_at": "2023-11-07T05:31:56Z",
"purpose": "<string>",
"remote_id": "<string>",
"size": 123,
"src": "<unknown>",
"user_id": "<string>"
}
],
"auto_correct": true,
"body": "<string>",
"cc": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"folder": {
"name": "<string>",
"object": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
},
"folder_id": "<string>",
"is_default": true,
"modified_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"preview_body": "<unknown>",
"preview_subject": "<unknown>",
"subject": "<string>"
}
],
"current_page": 0,
"total_records": 0,
"next_page": null
}{
"data": {},
"error": "<string>",
"message": "<string>"
}{
"detail": {
"<location>": {
"<field_name>": [
"<string>"
]
}
},
"message": "<string>"
}Email Templates
List Email Templates
GET
/
v1
/
email-templates
List Email Templates
curl --request GET \
--url http://api.stuut.ai/v1/email-templates \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.stuut.ai/v1/email-templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.stuut.ai/v1/email-templates', 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 => "http://api.stuut.ai/v1/email-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://api.stuut.ai/v1/email-templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.stuut.ai/v1/email-templates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.stuut.ai/v1/email-templates")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"object": "<string>",
"id": "<string>",
"attachments": [
{
"mime_type": "<string>",
"name": "<string>",
"object": "<string>",
"organization_id": "<string>",
"id": "<string>",
"content_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"disposition": "<string>",
"is_verified": true,
"modified_at": "2023-11-07T05:31:56Z",
"presigned_url": "<string>",
"presigned_url_expires_at": "2023-11-07T05:31:56Z",
"purpose": "<string>",
"remote_id": "<string>",
"size": 123,
"src": "<unknown>",
"user_id": "<string>"
}
],
"auto_correct": true,
"body": "<string>",
"cc": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"folder": {
"name": "<string>",
"object": "<string>",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
},
"folder_id": "<string>",
"is_default": true,
"modified_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"preview_body": "<unknown>",
"preview_subject": "<unknown>",
"subject": "<string>"
}
],
"current_page": 0,
"total_records": 0,
"next_page": null
}{
"data": {},
"error": "<string>",
"message": "<string>"
}{
"detail": {
"<location>": {
"<field_name>": [
"<string>"
]
}
},
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Page number, 0 indexed.
Required range:
x >= 0The page size
Required range:
1 <= x <= 200Available options:
asc, desc Available options:
created_at The EmailTemplateFolder identifier, (e.g. etf_abc123).
Search for templates by name, subject, or body.
⌘I
