Delete a message template by name
curl --request DELETE \
--url https://api.polymorfa.com/{version}/{wabaId}/message_templates \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/{version}/{wabaId}/message_templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/{version}/{wabaId}/message_templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/{version}/{wabaId}/message_templates"
req, _ := http.NewRequest("DELETE", 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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.polymorfa.com/{version}/{wabaId}/message_templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}{
"success": true
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}Graph API
Delete a message template by name
DELETE
/
{version}
/
{wabaId}
/
message_templates
Delete a message template by name
curl --request DELETE \
--url https://api.polymorfa.com/{version}/{wabaId}/message_templates \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/{version}/{wabaId}/message_templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/{version}/{wabaId}/message_templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/{version}/{wabaId}/message_templates"
req, _ := http.NewRequest("DELETE", 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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.polymorfa.com/{version}/{wabaId}/message_templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}{
"success": true
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": null
}
}Authorizations
Polymorfa organization key (titan_ prefix) or project token (titan_pt_ prefix). Client tokens are not accepted by Graph operations.
Query Parameters
Example:
"order_update"
Response
Deleted