Get Template
Retrieve a single template by ID.
Endpoint
GET /templates/:id
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The template ID |
Response
See Create Template for the response shape.
{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"name": "Welcome Email v2",
"html": "<h1>Welcome!</h1>",
"created_at": "2026-03-08T12:00:00.000Z",
"updated_at": "2026-03-08T12:00:00.000Z"
}
Examples
- cURL
- JavaScript
- Python
- C#
- PHP
curl "https://api.arsel.sa/v1/templates/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a" \
-H "Authorization: Bearer be_your_api_key"
const templateId = "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a";
const response = await fetch(
`https://api.arsel.sa/v1/templates/${templateId}`,
{ headers: { Authorization: "Bearer be_your_api_key" } },
);
const template = await response.json();
console.log(template.name);
import requests
template_id = "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a"
response = requests.get(
f"https://api.arsel.sa/v1/templates/{template_id}",
headers={"Authorization": "Bearer be_your_api_key"},
)
template = response.json()
print(template["name"])
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer be_your_api_key");
var templateId = "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a";
var response = await client.GetAsync($"https://api.arsel.sa/v1/templates/{templateId}");
Console.WriteLine(await response.Content.ReadAsStringAsync());
<?php
$templateId = "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a";
$ch = curl_init("https://api.arsel.sa/v1/templates/{$templateId}");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer be_your_api_key"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);
Error Responses
- 404 Not Found
{
"status_code": 404,
"name": "not_found",
"message": "Template not found"
}