Retrieve a template
curl --request GET \
--url https://lazyapp.in/v1/templates/{template} \
--header 'Authorization: Bearer <token>'import requests
url = "https://lazyapp.in/v1/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://lazyapp.in/v1/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://lazyapp.in/v1/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://lazyapp.in/v1/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://lazyapp.in/v1/templates/{template}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lazyapp.in/v1/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{
"uuid": "<string>",
"name": "<string>",
"language": "<string>",
"category": "AUTHENTICATION",
"status": "draft",
"body_text": "<string>",
"body_examples": [
"<string>"
],
"header": {},
"footer_text": "<string>",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>",
"url": "<string>",
"examples": [
"<string>"
],
"example": "<string>",
"phone_number": "<string>",
"flow_id": "<string>",
"ttl_minutes": 22320,
"app_deep_link": {
"android_deep_link": "<string>",
"android_fallback_playstore_url": "<string>"
}
}
],
"rejection_reason": "<string>",
"quality_score": "<string>",
"provider_template_id": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"carousel_cards": [
{
"header_format": "IMAGE",
"example_handle": "<string>",
"body_text": "<string>",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>",
"url": "<string>",
"examples": [
"<string>"
],
"phone_number": "<string>"
}
]
}
],
"limited_time_offer": {},
"call_permission_request": true,
"message_send_ttl_seconds": 123,
"cta_url_link_tracking_opted_out": true,
"marketing_options": {},
"source": "<string>",
"sub_category": "<string>",
"pending_category": "<string>",
"template_group": "<string>",
"send_features": [
{}
],
"rejection_reason_text": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "The API is on the Pro plan. Upgrade in Billing to use live keys. Test keys keep working.",
"code": "plan_limit_reached"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Templates
Retrieve a template
By uuid or name.
Required scope: templates:read
GET
/
v1
/
templates
/
{template}
Retrieve a template
curl --request GET \
--url https://lazyapp.in/v1/templates/{template} \
--header 'Authorization: Bearer <token>'import requests
url = "https://lazyapp.in/v1/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://lazyapp.in/v1/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://lazyapp.in/v1/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://lazyapp.in/v1/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://lazyapp.in/v1/templates/{template}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lazyapp.in/v1/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{
"uuid": "<string>",
"name": "<string>",
"language": "<string>",
"category": "AUTHENTICATION",
"status": "draft",
"body_text": "<string>",
"body_examples": [
"<string>"
],
"header": {},
"footer_text": "<string>",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>",
"url": "<string>",
"examples": [
"<string>"
],
"example": "<string>",
"phone_number": "<string>",
"flow_id": "<string>",
"ttl_minutes": 22320,
"app_deep_link": {
"android_deep_link": "<string>",
"android_fallback_playstore_url": "<string>"
}
}
],
"rejection_reason": "<string>",
"quality_score": "<string>",
"provider_template_id": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"carousel_cards": [
{
"header_format": "IMAGE",
"example_handle": "<string>",
"body_text": "<string>",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "<string>",
"url": "<string>",
"examples": [
"<string>"
],
"phone_number": "<string>"
}
]
}
],
"limited_time_offer": {},
"call_permission_request": true,
"message_send_ttl_seconds": 123,
"cta_url_link_tracking_opted_out": true,
"marketing_options": {},
"source": "<string>",
"sub_category": "<string>",
"pending_category": "<string>",
"template_group": "<string>",
"send_features": [
{}
],
"rejection_reason_text": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "The API is on the Pro plan. Upgrade in Billing to use live keys. Test keys keep working.",
"code": "plan_limit_reached"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}Authorizations
Your API key, e.g. sk_live_... or sk_test_....
Path Parameters
Template uuid or name.
Response
The template.
Available options:
AUTHENTICATION, UTILITY, MARKETING Available options:
draft, submitting, pending, approved, rejected, paused, disabled, archived, deleted Show child attributes
Show child attributes
Show child attributes
Show child attributes
Creative features and max price as last submitted.
Set when Meta generated the template (for example from Direct Send). Such templates cannot be edited or deleted here.
The category Meta will move this template to.
uuid of the template group.
Extra inputs a send needs, such as cards, coupon_code or voice_call.