TEMPLATES
Fetch Template List
API to fetch paginated list of all templates in a given workspace.
GET
/
v1
/
template
/
Fetch Template List
curl --request GET \
--url https://hub.suprsend.com/v1/template/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://hub.suprsend.com/v1/template/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://hub.suprsend.com/v1/template/', 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://hub.suprsend.com/v1/template/",
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://hub.suprsend.com/v1/template/"
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://hub.suprsend.com/v1/template/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://hub.suprsend.com/v1/template/")
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{
"meta": {
"count": 1,
"limit": 10,
"offset": 0
},
"results": [
{
"id": "166277",
"name": "Task Reminder",
"slug": "task-reminder",
"description": "Batched template for all pending tasks",
"is_active": true,
"default_language": {
"name": "English",
"slug": "en"
},
"created_at": "2023-01-25T04:53:39.237291Z",
"updated_at": "2023-08-28T05:06:22.461443Z",
"updated_by": {
"name": "team_member",
"email": "user@example.com"
},
"last_triggered_at": "2023-08-10T12:44:03.361158Z",
"is_auto_translate_enabled": false,
"enabled_languages": [
"en",
"fr",
"es"
],
"channels": [
{
"id": "<integer>",
"channel": {
"name": "Email",
"slug": "email",
"is_template_approval_needed": true
},
"is_active": true,
"is_enabled": true,
"created_at": "2023-01-25T04:53:39.268299Z",
"updated_at": "2023-01-25T04:53:39.404273Z",
"disabled_languages": [],
"versions": []
}
],
"tags": [
{
"id": "01H9HPT1C5ABN61S12D85J9DJ7",
"name": "tag"
}
]
}
]
}Legacy API. This is the older endpoint to list templates. We have released template 2.0 with variant support due to which the content structure and template APIs have changed. The new APIs are listed under Management API → Templates.This endpoint continues to return templates created before 14 April 2026, including their live and draft content. Templates created on or after that date are only available through the new APIs.
Authorizations
Pass as Bearer <API_KEY>. Get API Key from SuprSend dashboard Developers -> API Keys section.
Query Parameters
comma separated string of tag ids attached to the template
comma separated string of channels. Returns templates which has any of the channels present from the channel string. Use these keys for channels - email, sms, whatsapp, inbox, slack, androidpush, iospush, webpush
Set true for published templates, false for templates which are in draft. Do not pass this key to return all templates.
Set true to get archived templates, default = false
Was this page helpful?
Previous
Fetch Template detailsAPI to fetch content of a template group (active & draft versions) across all associated channels and languages.
Next
⌘I
Fetch Template List
curl --request GET \
--url https://hub.suprsend.com/v1/template/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://hub.suprsend.com/v1/template/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://hub.suprsend.com/v1/template/', 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://hub.suprsend.com/v1/template/",
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://hub.suprsend.com/v1/template/"
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://hub.suprsend.com/v1/template/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://hub.suprsend.com/v1/template/")
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{
"meta": {
"count": 1,
"limit": 10,
"offset": 0
},
"results": [
{
"id": "166277",
"name": "Task Reminder",
"slug": "task-reminder",
"description": "Batched template for all pending tasks",
"is_active": true,
"default_language": {
"name": "English",
"slug": "en"
},
"created_at": "2023-01-25T04:53:39.237291Z",
"updated_at": "2023-08-28T05:06:22.461443Z",
"updated_by": {
"name": "team_member",
"email": "user@example.com"
},
"last_triggered_at": "2023-08-10T12:44:03.361158Z",
"is_auto_translate_enabled": false,
"enabled_languages": [
"en",
"fr",
"es"
],
"channels": [
{
"id": "<integer>",
"channel": {
"name": "Email",
"slug": "email",
"is_template_approval_needed": true
},
"is_active": true,
"is_enabled": true,
"created_at": "2023-01-25T04:53:39.268299Z",
"updated_at": "2023-01-25T04:53:39.404273Z",
"disabled_languages": [],
"versions": []
}
],
"tags": [
{
"id": "01H9HPT1C5ABN61S12D85J9DJ7",
"name": "tag"
}
]
}
]
}