Orgs Connections
Refresh WhatsApp templates
Bust the cache and refetch templates from Meta.
POST
/
orgs
/
{org_id}
/
connections
/
{connection_id}
/
whatsapp
/
templates
/
refresh
Refresh WhatsApp templates
curl --request POST \
--url https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh', 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/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/refresh"
req, _ := http.NewRequest("POST", 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.post("https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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
Query Parameters
Available options:
APPROVED, IN_APPEAL, PENDING, REJECTED, PENDING_DELETION, DELETED, DISABLED, PAUSED, LIMIT_EXCEEDED Page number
Number of items to take
Next page token (Only used on special endpoints)
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
Browse the WhatsApp template libraryBrowse Meta's pre-approved template library (read through a Redis cache).
Next
⌘I
Refresh WhatsApp templates
curl --request POST \
--url https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh', 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/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/refresh"
req, _ := http.NewRequest("POST", 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.post("https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useinvent.com/orgs/{org_id}/connections/{connection_id}/whatsapp/templates/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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
}
}
]