Skip to main content

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​

ParameterTypeDefaultDescription
limitnumber20Items per page (min: 1, max: 100)
afterstring—Cursor — return items after this id (exclusive).
beforestring—Cursor — return items before this id (exclusive).
searchstring—Search by template name
template_typesstring—Comma-separated list of type IDs (see List Categories).
template_seasonsstring—Comma-separated list of season IDs.
template_featuresstring—Comma-separated list of feature IDs.
template_industriesstring—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"
}
]
}
FieldTypeDescription
idstringGallery template ID — use this with Get Template.
namestringTemplate name
has_ampbooleanWhether the template includes AMP-for-email markup
created_atstringISO 8601 timestamp

Examples​

Browse all​

curl "https://api.arsel.sa/v1/templates/gallery?limit=20" \
-H "Authorization: Bearer $ARSEL_API_KEY"

Filter by type and industry​

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"

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​

{
"status_code": 401,
"name": "unauthorized",
"message": "Invalid API Key"
}