Get Templates
curl --request GET \
--url https://lancepilot.com/api/v3/workspaces/{workspace}/templates \
--header 'Authorization: Bearer <token>'import requests
url = "https://lancepilot.com/api/v3/workspaces/{workspace}/templates"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lancepilot.com/api/v3/workspaces/{workspace}/templates")
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": [
{}
],
"meta": {
"current_page": 1,
"per_page": 10,
"total": 100,
"last_page": 10,
"from": 1,
"to": 10
},
"links": {}
}{
"message": "Unauthenticated."
}Templates
Get Templates
Retrieve all templates for the specified workspace.
GET
/
workspaces
/
{workspace}
/
templates
Get Templates
curl --request GET \
--url https://lancepilot.com/api/v3/workspaces/{workspace}/templates \
--header 'Authorization: Bearer <token>'import requests
url = "https://lancepilot.com/api/v3/workspaces/{workspace}/templates"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lancepilot.com/api/v3/workspaces/{workspace}/templates")
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": [
{}
],
"meta": {
"current_page": 1,
"per_page": 10,
"total": 100,
"last_page": 10,
"from": 1,
"to": 10
},
"links": {}
}{
"message": "Unauthenticated."
}Overview
Retrieve all WhatsApp message templates for a workspace with pagination support.Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
per_page | integer | No | 10 | Number of templates per page |
page | integer | No | 1 | Page number |
Response
Success (200 OK)
{
"success": true,
"data": [
{
"id": 1234,
"workspace_id": "9ca711b1-14ca-4bd5-9457-751db9c052ac",
"name": "welcome_template",
"language": "en",
"category": "MARKETING",
"status": "APPROVED",
"provider_id": "8949194595096852",
"components": {
"header": {
"type": "text",
"text": {
"content": "Welcome {{1}}",
"variables": ["Customer"]
}
},
"body": {
"text": "Thank you for joining us!",
"variables": []
},
"footer": "Reply STOP to unsubscribe",
"buttons": [
{
"type": "URL",
"text": "Visit Website",
"url": "https://example.com"
}
]
},
"created_at": "2025-11-01T10:00:00Z",
"updated_at": "2025-11-15T14:30:00Z"
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 5,
"per_page": 10,
"to": 10,
"total": 47
}
}
Template Status Values
| Status | Description |
|---|---|
PENDING | Submitted to Meta, awaiting review |
APPROVED | Approved by Meta, ready to use |
REJECTED | Rejected by Meta, cannot be used |
UPDATING | Existing template being updated, under review |
Filter Examples
Get first page with 25 templates
GET /api/v3/workspaces/{workspace}/templates?per_page=25&page=1
Get all approved templates
Use the response data and filter bystatus: "APPROVED" on the client side, or use Sync to update statuses.
Use the Sync endpoint regularly to update template statuses from Meta.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the workspace.
Query Parameters
Number of templates per page.
⌘I