Retrieve a Template details by ID
curl --request GET \
--url https://api.trugen.ai/v1/ext/template/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.trugen.ai/v1/ext/template/{id}"
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/template/{id}', 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/template/{id}",
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/template/{id}"
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/template/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trugen.ai/v1/ext/template/{id}")
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{
"id": "ff152cd9-efb6-4367-ae34-917f7c735f1d",
"template_name": "Default Calling Template",
"template_system_prompt": "You are a helpful AI assistant.",
"config": {
"maxCallDuration": 900,
"conversationalContext": ""
},
"record": true,
"knowledge_base": [
{
"id": "ac79226e-73e1-41fe-8cde-469ae4e244fa",
"name": "Product Support Articles",
"description": "Contains FAQs and troubleshooting guides for product lines."
}
],
"guardrail": [
{
"id": "dfbaa3c6-1e90-43df-869a-b023896a198c",
"key": "hate_speech_filter",
"name": "Hate Speech Filter",
"category": "Content Safety",
"prompt": "Trigger when the user uses hateful, discriminatory, or abusive language toward a person or group.",
"response_message": "I'm sorry, but I can't help with that. Let's keep things respectful.",
"callback_url": "https://yourapp.com/webhooks/guardrail"
}
],
"created_at": "2025-12-03T10:15:30.000Z",
"updated_at": "2025-12-03T12:00:00.000Z"
}{
"message": "Template not found"
}Persona Templates
Get Persona Template By Id
GET
/
ext
/
template
/
{id}
Retrieve a Template details by ID
curl --request GET \
--url https://api.trugen.ai/v1/ext/template/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.trugen.ai/v1/ext/template/{id}"
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/template/{id}', 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/template/{id}",
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/template/{id}"
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/template/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trugen.ai/v1/ext/template/{id}")
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{
"id": "ff152cd9-efb6-4367-ae34-917f7c735f1d",
"template_name": "Default Calling Template",
"template_system_prompt": "You are a helpful AI assistant.",
"config": {
"maxCallDuration": 900,
"conversationalContext": ""
},
"record": true,
"knowledge_base": [
{
"id": "ac79226e-73e1-41fe-8cde-469ae4e244fa",
"name": "Product Support Articles",
"description": "Contains FAQs and troubleshooting guides for product lines."
}
],
"guardrail": [
{
"id": "dfbaa3c6-1e90-43df-869a-b023896a198c",
"key": "hate_speech_filter",
"name": "Hate Speech Filter",
"category": "Content Safety",
"prompt": "Trigger when the user uses hateful, discriminatory, or abusive language toward a person or group.",
"response_message": "I'm sorry, but I can't help with that. Let's keep things respectful.",
"callback_url": "https://yourapp.com/webhooks/guardrail"
}
],
"created_at": "2025-12-03T10:15:30.000Z",
"updated_at": "2025-12-03T12:00:00.000Z"
}{
"message": "Template not found"
}Authorizations
Path Parameters
Unique identifier for the template
Response
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
Whether the call should be recorded
Example:
true
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
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?