Get Template
curl --request GET \
--url https://lancepilot.com/api/v3/workspaces/{workspace}/templates/{template} \
--header 'Authorization: Bearer <token>'import requests
url = "https://lancepilot.com/api/v3/workspaces/{workspace}/templates/{template}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://lancepilot.com/api/v3/workspaces/{workspace}/templates/{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://lancepilot.com/api/v3/workspaces/{workspace}/templates/{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://lancepilot.com/api/v3/workspaces/{workspace}/templates/{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://lancepilot.com/api/v3/workspaces/{workspace}/templates/{template}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lancepilot.com/api/v3/workspaces/{workspace}/templates/{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{
"data": {}
}{
"message": "Unauthenticated."
}{
"message": "Resource not found.",
"status": 404
}Templates
Get Template
Retrieve a specific template by ID in the specified workspace.
GET
/
workspaces
/
{workspace}
/
templates
/
{template}
Get Template
curl --request GET \
--url https://lancepilot.com/api/v3/workspaces/{workspace}/templates/{template} \
--header 'Authorization: Bearer <token>'import requests
url = "https://lancepilot.com/api/v3/workspaces/{workspace}/templates/{template}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://lancepilot.com/api/v3/workspaces/{workspace}/templates/{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://lancepilot.com/api/v3/workspaces/{workspace}/templates/{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://lancepilot.com/api/v3/workspaces/{workspace}/templates/{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://lancepilot.com/api/v3/workspaces/{workspace}/templates/{template}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lancepilot.com/api/v3/workspaces/{workspace}/templates/{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{
"data": {}
}{
"message": "Unauthenticated."
}{
"message": "Resource not found.",
"status": 404
}Overview
Retrieve a specific WhatsApp message template by ID.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspace | UUID | Yes | Workspace ID |
template | integer | Yes | Template ID |
Response
Success (200 OK)
{
"success": true,
"data": {
"id": 1234,
"workspace_id": "9ca711b1-14ca-4bd5-9457-751db9c052ac",
"name": "order_confirmation",
"language": "en",
"category": "UTILITY",
"status": "APPROVED",
"provider_id": "8949194595096852",
"components": {
"header": {
"type": "text",
"text": {
"content": "Order #{{1}}",
"variables": ["12345"]
}
},
"body": {
"text": "Hi {{1}},\n\nYour order has been confirmed! Estimated delivery: {{2}}",
"variables": ["John", "Dec 15, 2025"]
},
"footer": "Thank you for shopping with us",
"buttons": [
{
"type": "URL",
"text": "Track Order",
"url": "https://example.com/track"
},
{
"type": "PHONE_NUMBER",
"text": "Contact Support",
"phone_number": "+1234567890"
}
]
},
"created_at": "2025-11-01T10:00:00Z",
"updated_at": "2025-11-15T14:30:00Z"
}
}
Not Found (404)
{
"success": false,
"message": "Template not found"
}
Component Structure
Thecomponents object contains all template elements:
Header (Optional)
Text Header:"header": {
"type": "text",
"text": {
"content": "Header text with {{1}}",
"variables": ["value"]
}
}
"header": {
"type": "media",
"media": {
"type": "image", // or "video", "document"
"handle": "file_handle_from_meta"
}
}
Body (Required)
"body": {
"text": "Message with {{1}} and {{2}}",
"variables": ["value1", "value2"]
}
Footer (Optional)
"footer": "Footer text (max 60 chars)"
Buttons (Optional)
"buttons": [
{
"type": "URL",
"text": "Button Text",
"url": "https://example.com"
},
{
"type": "PHONE_NUMBER",
"text": "Call Us",
"phone_number": "+1234567890"
},
{
"type": "QUICK_REPLY",
"text": "Quick Reply"
}
]
Usage Example
curl -X GET \
https://lancepilot.com/api/v3/workspaces/{workspace}/templates/1234 \
-H 'Authorization: Bearer YOUR_API_TOKEN'
Use this endpoint to inspect template structure before sending messages with Send Template Message.
⌘I