Communications
List mailing visual design assets
Returns built-in fonts/templates/texts/shapes/frames, or matching stock images plus up to 20 newest organization image uploads. q filters names for non-images, stock names/tags and upload file/name for images. Generated mailing artifacts are excluded from uploads. remote_search_enabled is true, but this handler uses the built-in stock catalog and organization uploads without a third-party search request. Requires permission: one of mailings_manage.
GET
/
admin
/
mailing_design_assets
/
{assetType}
List mailing visual design assets
curl --request GET \
--url https://api.gratona.com/v1/admin/mailing_design_assets/{assetType} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/mailing_design_assets/{assetType}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/admin/mailing_design_assets/{assetType}', 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.gratona.com/v1/admin/mailing_design_assets/{assetType}",
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 := "https://api.gratona.com/v1/admin/mailing_design_assets/{assetType}"
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("https://api.gratona.com/v1/admin/mailing_design_assets/{assetType}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/mailing_design_assets/{assetType}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"asset_type": "images",
"client_id": 42,
"remote_search_enabled": true,
"items": [
{
"id": "stock-community-visit",
"name": "Community visit",
"family": "Arial, sans-serif",
"text": "Dear [donor_name],",
"type": "rectangle",
"page_preset": "us_letter_portrait",
"scene": {
"version": 1,
"page": {
"preset": "us_letter_portrait",
"widthPx": 816,
"heightPx": 1056,
"backgroundColor": "#ffffff"
},
"elements": [
{
"id": "heading",
"type": "text",
"x": 36,
"y": 36,
"width": 36,
"height": 36,
"fontSize": 36,
"borderRadius": 36,
"borderWidth": 36,
"zIndex": 36,
"text": "Example",
"fontWeight": "Example",
"color": "Example",
"textAlign": "Example",
"fill": "Example",
"borderColor": "Example"
}
]
},
"source": "public_stock",
"source_label": "Public stock",
"renderable": true,
"url": "https://example.org/community.jpg",
"thumbnail_url": "https://example.org/community-thumb.jpg",
"tags": [
"community"
],
"upload_id": 42,
"file_name": "Example",
"permissions": "Example",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Visual designer asset category.
Available options:
fonts, templates, texts, images, shapes, frames Query Parameters
Optional asset search text.
Response
Operation result.
Show child attributes
Show child attributes
⌘I
List mailing visual design assets
curl --request GET \
--url https://api.gratona.com/v1/admin/mailing_design_assets/{assetType} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gratona.com/v1/admin/mailing_design_assets/{assetType}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gratona.com/v1/admin/mailing_design_assets/{assetType}', 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.gratona.com/v1/admin/mailing_design_assets/{assetType}",
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 := "https://api.gratona.com/v1/admin/mailing_design_assets/{assetType}"
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("https://api.gratona.com/v1/admin/mailing_design_assets/{assetType}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/mailing_design_assets/{assetType}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"asset_type": "images",
"client_id": 42,
"remote_search_enabled": true,
"items": [
{
"id": "stock-community-visit",
"name": "Community visit",
"family": "Arial, sans-serif",
"text": "Dear [donor_name],",
"type": "rectangle",
"page_preset": "us_letter_portrait",
"scene": {
"version": 1,
"page": {
"preset": "us_letter_portrait",
"widthPx": 816,
"heightPx": 1056,
"backgroundColor": "#ffffff"
},
"elements": [
{
"id": "heading",
"type": "text",
"x": 36,
"y": 36,
"width": 36,
"height": 36,
"fontSize": 36,
"borderRadius": 36,
"borderWidth": 36,
"zIndex": 36,
"text": "Example",
"fontWeight": "Example",
"color": "Example",
"textAlign": "Example",
"fill": "Example",
"borderColor": "Example"
}
]
},
"source": "public_stock",
"source_label": "Public stock",
"renderable": true,
"url": "https://example.org/community.jpg",
"thumbnail_url": "https://example.org/community-thumb.jpg",
"tags": [
"community"
],
"upload_id": 42,
"file_name": "Example",
"permissions": "Example",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Not Found",
"status": "error"
}