Retrieve all Template details
curl --request GET \
--url https://api.trugen.ai/v1/ext/templates \
--header 'x-api-key: <api-key>'import requests
url = "https://api.trugen.ai/v1/ext/templates"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.trugen.ai/v1/ext/templates', 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.trugen.ai/v1/ext/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.trugen.ai/v1/ext/templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.trugen.ai/v1/ext/templates")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trugen.ai/v1/ext/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"config": {
"maxCallDuration": 5,
"conversationalContext": "The following is a conversation with a user named `Lisa`."
},
"created_at": "2025-10-16T15:09:53.876051Z",
"id": "d22e4b02-3a47-46f2-b0cd-5420f277eaf9",
"knowledge_base": null,
"guardrail": null,
"record": true,
"template_name": "HR Assistant",
"template_system_prompt": "You are a helpful AI assistant.",
"updated_at": "2025-10-16T15:09:53.876051Z"
}
]{
"error": "Unauthorized: not a valid authorization api key"
}{
"error": "Failed to create template details"
}Persona Templates
List All Persona Templates
Fetches a list of all templates.
GET
/
ext
/
templates
Retrieve all Template details
curl --request GET \
--url https://api.trugen.ai/v1/ext/templates \
--header 'x-api-key: <api-key>'import requests
url = "https://api.trugen.ai/v1/ext/templates"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.trugen.ai/v1/ext/templates', 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.trugen.ai/v1/ext/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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.trugen.ai/v1/ext/templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.trugen.ai/v1/ext/templates")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trugen.ai/v1/ext/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"config": {
"maxCallDuration": 5,
"conversationalContext": "The following is a conversation with a user named `Lisa`."
},
"created_at": "2025-10-16T15:09:53.876051Z",
"id": "d22e4b02-3a47-46f2-b0cd-5420f277eaf9",
"knowledge_base": null,
"guardrail": null,
"record": true,
"template_name": "HR Assistant",
"template_system_prompt": "You are a helpful AI assistant.",
"updated_at": "2025-10-16T15:09:53.876051Z"
}
]{
"error": "Unauthorized: not a valid authorization api key"
}{
"error": "Failed to create template details"
}Authorizations
Response
List of template details retrieved successfully
Unique identifier for the template
Example:
"ff152cd9-efb6-4367-ae34-917f7c735f1d"
Name of the template
Example:
"Default Calling Template"
System prompt text used by the template
Example:
"You are a helpful AI assistant."
Settings and configuration for the template
Show child attributes
Show child attributes
List of knowledge bases attached to this agent.
Show child attributes
Show child attributes
Guardrails attached to this template, returned in full (not by ID only).
Show child attributes
Show child attributes
Whether the call should be recorded
Example:
true
Whether the record is be active or not
Example:
true
Timestamp when the template was created
Example:
"2025-12-03T10:15:30.000Z"
Timestamp when the template was last updated
Example:
"2025-12-03T12:00:00.000Z"
Was this page helpful?