Orgs Connections
Get a WhatsApp template
Fetch a single WhatsApp template by id (read-through cache).
GET
/
orgs
/
{org_id}
/
connections
/
{connection_id}
/
whatsapp
/
templates
/
{template_id}
Get a WhatsApp template
curl --request GET \
--url https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/{template_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/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.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/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.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/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.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/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.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/{template_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/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": "<string>",
"waba_id": "<string>",
"name": "<string>",
"language": "<string>",
"components": [
{
"type": "<string>",
"format": "<string>",
"text": "<string>",
"buttons": [
{
"type": "<string>",
"text": "<string>",
"url": "<string>",
"phone_number": "<string>",
"example": [
"<string>"
],
"otp_type": "<string>",
"autofill_text": "<string>",
"zero_tap_terms_accepted": true,
"supported_apps": [
{
"package_name": "<string>",
"signature_hash": "<string>"
}
],
"flow_id": "<string>",
"flow_name": "<string>",
"flow_action": "<string>",
"navigate_screen": "<string>"
}
],
"example": {
"header_text": [
"<string>"
],
"body_text": [
[
"<string>"
]
],
"header_handle": [
"<string>"
],
"header_url": [
"<string>"
],
"header_text_named_params": [
{
"param_name": "<string>",
"example": "<string>"
}
],
"body_text_named_params": [
{
"param_name": "<string>",
"example": "<string>"
}
]
},
"cards": [
{
"components": [
{
"type": "<string>",
"format": "<string>",
"text": "<string>",
"buttons": [
{
"type": "<string>",
"text": "<string>",
"url": "<string>",
"phone_number": "<string>",
"example": [
"<string>"
],
"otp_type": "<string>",
"autofill_text": "<string>",
"zero_tap_terms_accepted": true,
"supported_apps": [
{
"package_name": "<string>",
"signature_hash": "<string>"
}
],
"flow_id": "<string>",
"flow_name": "<string>",
"flow_action": "<string>",
"navigate_screen": "<string>"
}
],
"example": {
"header_text": [
"<string>"
],
"body_text": [
[
"<string>"
]
],
"header_handle": [
"<string>"
],
"header_url": [
"<string>"
],
"header_text_named_params": [
{
"param_name": "<string>",
"example": "<string>"
}
],
"body_text_named_params": [
{
"param_name": "<string>",
"example": "<string>"
}
]
}
}
]
}
],
"add_security_recommendation": true,
"code_expiration_minutes": 123,
"limited_time_offer": {
"text": "<string>",
"has_expiration": true
}
}
],
"quality_score": {
"score": "<string>",
"date": 123
}
}Authorizations
Bearer token authentication using your API key
Path Parameters
The ID of the org
The ID of the connection
The ID of the template
Response
200 - application/json
Available options:
APPROVED, IN_APPEAL, PENDING, REJECTED, PENDING_DELETION, DELETED, DISABLED, PAUSED, LIMIT_EXCEEDED Available options:
AUTHENTICATION, MARKETING, UTILITY Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
Previous
Delete a WhatsApp templateDelete a WhatsApp message template from the WABA. Meta requires `name` (and `language` for cache invalidation) in the query alongside the template id.
Next
⌘I
Get a WhatsApp template
curl --request GET \
--url https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/{template_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/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.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/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.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/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.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/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.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/{template_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/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": "<string>",
"waba_id": "<string>",
"name": "<string>",
"language": "<string>",
"components": [
{
"type": "<string>",
"format": "<string>",
"text": "<string>",
"buttons": [
{
"type": "<string>",
"text": "<string>",
"url": "<string>",
"phone_number": "<string>",
"example": [
"<string>"
],
"otp_type": "<string>",
"autofill_text": "<string>",
"zero_tap_terms_accepted": true,
"supported_apps": [
{
"package_name": "<string>",
"signature_hash": "<string>"
}
],
"flow_id": "<string>",
"flow_name": "<string>",
"flow_action": "<string>",
"navigate_screen": "<string>"
}
],
"example": {
"header_text": [
"<string>"
],
"body_text": [
[
"<string>"
]
],
"header_handle": [
"<string>"
],
"header_url": [
"<string>"
],
"header_text_named_params": [
{
"param_name": "<string>",
"example": "<string>"
}
],
"body_text_named_params": [
{
"param_name": "<string>",
"example": "<string>"
}
]
},
"cards": [
{
"components": [
{
"type": "<string>",
"format": "<string>",
"text": "<string>",
"buttons": [
{
"type": "<string>",
"text": "<string>",
"url": "<string>",
"phone_number": "<string>",
"example": [
"<string>"
],
"otp_type": "<string>",
"autofill_text": "<string>",
"zero_tap_terms_accepted": true,
"supported_apps": [
{
"package_name": "<string>",
"signature_hash": "<string>"
}
],
"flow_id": "<string>",
"flow_name": "<string>",
"flow_action": "<string>",
"navigate_screen": "<string>"
}
],
"example": {
"header_text": [
"<string>"
],
"body_text": [
[
"<string>"
]
],
"header_handle": [
"<string>"
],
"header_url": [
"<string>"
],
"header_text_named_params": [
{
"param_name": "<string>",
"example": "<string>"
}
],
"body_text_named_params": [
{
"param_name": "<string>",
"example": "<string>"
}
]
}
}
]
}
],
"add_security_recommendation": true,
"code_expiration_minutes": 123,
"limited_time_offer": {
"text": "<string>",
"has_expiration": true
}
}
],
"quality_score": {
"score": "<string>",
"date": 123
}
}