Browse Gallery
Read-only access to a curated catalog of starter email templates. Browse, filter, and pull a starter's HTML to use as the basis of your own custom template.
Endpoint
GET /templates/gallery
Returns: 200 OK
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Items per page (min: 1, max: 100) |
after | string | — | Cursor — return items after this id (exclusive). |
before | string | — | Cursor — return items before this id (exclusive). |
search | string | — | Search by template name |
template_types | string | — | Comma-separated list of type IDs (see List Categories). |
template_seasons | string | — | Comma-separated list of season IDs. |
template_features | string | — | Comma-separated list of feature IDs. |
template_industries | string | — | Comma-separated list of industry IDs. |
Results are returned newest first. See Pagination for cursor details.
Response
The list response excludes the (heavy) html field — fetch a single gallery item via Get Template to retrieve its HTML.
{
"object": "list",
"has_more": true,
"data": [
{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"name": "Modern Welcome Email",
"has_amp": false,
"created_at": "2026-01-15T10:00:00.000Z"
}
]
}
| Field | Type | Description |
|---|---|---|
id | string | Gallery template ID — use this with Get Template. |
name | string | Template name |
has_amp | boolean | Whether the template includes AMP-for-email markup |
created_at | string | ISO 8601 timestamp |
Examples
Browse all
- cURL
- JavaScript
- Python
- C#
- PHP
curl "https://api.arsel.sa/v1/templates/gallery?limit=20" \
-H "Authorization: Bearer $ARSEL_API_KEY"
const response = await fetch("https://api.arsel.sa/v1/templates/gallery?limit=20", {
headers: {
Authorization: `Bearer ${process.env.ARSEL_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) {
throw new Error(`${data.name}: ${data.message}`);
}
console.log(data);
import os
import requests
response = requests.get(
"https://api.arsel.sa/v1/templates/gallery?limit=20",
headers={"Authorization": f"Bearer {os.environ['ARSEL_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
using System.Net.Http.Headers;
var client = new HttpClient(); // share one instance across requests
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("ARSEL_API_KEY"));
var response = await client.GetAsync("https://api.arsel.sa/v1/templates/gallery?limit=20");
var body = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
throw new HttpRequestException($"{(int)response.StatusCode}: {body}");
Console.WriteLine(body);
<?php
$ch = curl_init("https://api.arsel.sa/v1/templates/gallery?limit=20");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ARSEL_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) {
throw new Exception("{$data['name']}: {$data['message']}");
}
print_r($data);
Filter by type and industry
- cURL
- JavaScript
- Python
- C#
- PHP
curl "https://api.arsel.sa/v1/templates/gallery?template_types=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a,01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b&template_industries=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6f" \
-H "Authorization: Bearer $ARSEL_API_KEY"
const response = await fetch("https://api.arsel.sa/v1/templates/gallery?template_types=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a,01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b&template_industries=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6f", {
headers: {
Authorization: `Bearer ${process.env.ARSEL_API_KEY}`,
},
});
const data = await response.json();
if (!response.ok) {
throw new Error(`${data.name}: ${data.message}`);
}
console.log(data);
import os
import requests
response = requests.get(
"https://api.arsel.sa/v1/templates/gallery?template_types=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a,01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b&template_industries=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6f",
headers={"Authorization": f"Bearer {os.environ['ARSEL_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
using System.Net.Http.Headers;
var client = new HttpClient(); // share one instance across requests
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
"Bearer", Environment.GetEnvironmentVariable("ARSEL_API_KEY"));
var response = await client.GetAsync("https://api.arsel.sa/v1/templates/gallery?template_types=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a,01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b&template_industries=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6f");
var body = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
throw new HttpRequestException($"{(int)response.StatusCode}: {body}");
Console.WriteLine(body);
<?php
$ch = curl_init("https://api.arsel.sa/v1/templates/gallery?template_types=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a,01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6b&template_industries=01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6f");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("ARSEL_API_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) >= 400) {
throw new Exception("{$data['name']}: {$data['message']}");
}
print_r($data);
Use List Categories to discover the available IDs.
Pick a starter and save your own version
async function arsel(path, { method = "GET", body } = {}) {
const response = await fetch(`https://api.arsel.sa/v1${path}`, {
method,
headers: {
Authorization: `Bearer ${process.env.ARSEL_API_KEY}`,
"Content-Type": "application/json",
},
body: body && JSON.stringify(body),
});
const data = await response.json();
if (!response.ok) throw new Error(`${data.name}: ${data.message}`);
return data;
}
// 1. Browse the gallery
const list = await arsel("/templates/gallery?search=welcome");
const starterId = list.data[0].id;
// 2. Fetch the starter's full HTML
const starter = await arsel(`/templates/gallery/${starterId}`);
// 3. Customize the HTML, then save it as your own template
const saved = await arsel("/templates", {
method: "POST",
body: {
name: "Acme Welcome",
html: starter.html.replace("{{brand}}", "Acme"),
},
});
console.log(`Created ${saved.id} from gallery starter ${starterId}`);
Error Responses
- 401 Unauthorized
{
"status_code": 401,
"name": "unauthorized",
"message": "Invalid API Key"
}