Get Template
curl --request GET \
--url https://api.meshapi.ai/v1/templates/{template_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.meshapi.ai/v1/templates/{template_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.meshapi.ai/v1/templates/{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.meshapi.ai/v1/templates/{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 => [
"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://api.meshapi.ai/v1/templates/{template_id}"
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://api.meshapi.ai/v1/templates/{template_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meshapi.ai/v1/templates/{template_id}")
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{
"id": "tmpl_01JZ0R6N9F8K7B6V3Q4A2Y1X0P",
"name": "support-reply",
"owner": "user_01JZ0Q9WZ7ZK3M9YF6R8D2C4B1",
"org_id": "org_01JZ0QAW6MS7M6WTJ7HE4VK3DF",
"team_id": null,
"is_global": false,
"description": "Short customer support replies with a friendly tone.",
"system": "You are a concise customer support assistant.",
"messages": [
{
"role": "user",
"content": "Reply to: {{ticket}}"
}
],
"model": "openai/gpt-4o-mini",
"params": {
"temperature": 0.3,
"max_tokens": 300
},
"variables": [
"ticket"
],
"creator_name": "Asha Rao",
"creator_email": "asha@example.com",
"created_at": "2026-07-02T10:15:30Z",
"updated_at": "2026-07-02T10:15:30Z"
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
},
"request_id": "req_01ARZ3NDEKTSV4RRFFQ69G5FAV"
}{
"error": {
"code": "not_found",
"message": "Template '01ARZ3NDEKTSV4RRFFQ69G5FAV' not found."
},
"request_id": "req_01ARZ3NDEKTSV4RRFFQ69G5FAV"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Internal Server Error"
}Templates
Get Template
Get a single template by UUID. Must belong to the caller’s owner or their org.
GET
/
v1
/
templates
/
{template_id}
Get Template
curl --request GET \
--url https://api.meshapi.ai/v1/templates/{template_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.meshapi.ai/v1/templates/{template_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.meshapi.ai/v1/templates/{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.meshapi.ai/v1/templates/{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 => [
"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://api.meshapi.ai/v1/templates/{template_id}"
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://api.meshapi.ai/v1/templates/{template_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meshapi.ai/v1/templates/{template_id}")
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{
"id": "tmpl_01JZ0R6N9F8K7B6V3Q4A2Y1X0P",
"name": "support-reply",
"owner": "user_01JZ0Q9WZ7ZK3M9YF6R8D2C4B1",
"org_id": "org_01JZ0QAW6MS7M6WTJ7HE4VK3DF",
"team_id": null,
"is_global": false,
"description": "Short customer support replies with a friendly tone.",
"system": "You are a concise customer support assistant.",
"messages": [
{
"role": "user",
"content": "Reply to: {{ticket}}"
}
],
"model": "openai/gpt-4o-mini",
"params": {
"temperature": 0.3,
"max_tokens": 300
},
"variables": [
"ticket"
],
"creator_name": "Asha Rao",
"creator_email": "asha@example.com",
"created_at": "2026-07-02T10:15:30Z",
"updated_at": "2026-07-02T10:15:30Z"
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
},
"request_id": "req_01ARZ3NDEKTSV4RRFFQ69G5FAV"
}{
"error": {
"code": "not_found",
"message": "Template '01ARZ3NDEKTSV4RRFFQ69G5FAV' not found."
},
"request_id": "req_01ARZ3NDEKTSV4RRFFQ69G5FAV"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "Internal Server Error"
}Authorizations
Enter your MeshAPI key (rsk_...) — sent as Authorization: Bearer <key>.
Path Parameters
Response
Successful Response
⌘I