Updates an existing Facebook template using JSON data
curl --request PUT \
--url https://api.nateq.io/api/v1/templates/facebook/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"callButtonText": "<string>",
"callCountryCode": "<string>",
"callPhoneNumber": "<string>",
"ctaButtonText": "<string>",
"ctaUrl": "<string>",
"directionsAddress": "<string>",
"directionsButtonText": "<string>",
"headerMediaFileId": "<string>",
"headerMediaUrl": "<string>",
"headerText": "<string>",
"language": "<string>",
"messageBody": "<string>",
"messageFooter": "<string>",
"quickReplyButtons": "<string>",
"templateName": "<string>"
}
'import requests
url = "https://api.nateq.io/api/v1/templates/facebook/{id}"
payload = {
"callButtonText": "<string>",
"callCountryCode": "<string>",
"callPhoneNumber": "<string>",
"ctaButtonText": "<string>",
"ctaUrl": "<string>",
"directionsAddress": "<string>",
"directionsButtonText": "<string>",
"headerMediaFileId": "<string>",
"headerMediaUrl": "<string>",
"headerText": "<string>",
"language": "<string>",
"messageBody": "<string>",
"messageFooter": "<string>",
"quickReplyButtons": "<string>",
"templateName": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
callButtonText: '<string>',
callCountryCode: '<string>',
callPhoneNumber: '<string>',
ctaButtonText: '<string>',
ctaUrl: '<string>',
directionsAddress: '<string>',
directionsButtonText: '<string>',
headerMediaFileId: '<string>',
headerMediaUrl: '<string>',
headerText: '<string>',
language: '<string>',
messageBody: '<string>',
messageFooter: '<string>',
quickReplyButtons: '<string>',
templateName: '<string>'
})
};
fetch('https://api.nateq.io/api/v1/templates/facebook/{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.nateq.io/api/v1/templates/facebook/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'callButtonText' => '<string>',
'callCountryCode' => '<string>',
'callPhoneNumber' => '<string>',
'ctaButtonText' => '<string>',
'ctaUrl' => '<string>',
'directionsAddress' => '<string>',
'directionsButtonText' => '<string>',
'headerMediaFileId' => '<string>',
'headerMediaUrl' => '<string>',
'headerText' => '<string>',
'language' => '<string>',
'messageBody' => '<string>',
'messageFooter' => '<string>',
'quickReplyButtons' => '<string>',
'templateName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nateq.io/api/v1/templates/facebook/{id}"
payload := strings.NewReader("{\n \"callButtonText\": \"<string>\",\n \"callCountryCode\": \"<string>\",\n \"callPhoneNumber\": \"<string>\",\n \"ctaButtonText\": \"<string>\",\n \"ctaUrl\": \"<string>\",\n \"directionsAddress\": \"<string>\",\n \"directionsButtonText\": \"<string>\",\n \"headerMediaFileId\": \"<string>\",\n \"headerMediaUrl\": \"<string>\",\n \"headerText\": \"<string>\",\n \"language\": \"<string>\",\n \"messageBody\": \"<string>\",\n \"messageFooter\": \"<string>\",\n \"quickReplyButtons\": \"<string>\",\n \"templateName\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.nateq.io/api/v1/templates/facebook/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"callButtonText\": \"<string>\",\n \"callCountryCode\": \"<string>\",\n \"callPhoneNumber\": \"<string>\",\n \"ctaButtonText\": \"<string>\",\n \"ctaUrl\": \"<string>\",\n \"directionsAddress\": \"<string>\",\n \"directionsButtonText\": \"<string>\",\n \"headerMediaFileId\": \"<string>\",\n \"headerMediaUrl\": \"<string>\",\n \"headerText\": \"<string>\",\n \"language\": \"<string>\",\n \"messageBody\": \"<string>\",\n \"messageFooter\": \"<string>\",\n \"quickReplyButtons\": \"<string>\",\n \"templateName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nateq.io/api/v1/templates/facebook/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callButtonText\": \"<string>\",\n \"callCountryCode\": \"<string>\",\n \"callPhoneNumber\": \"<string>\",\n \"ctaButtonText\": \"<string>\",\n \"ctaUrl\": \"<string>\",\n \"directionsAddress\": \"<string>\",\n \"directionsButtonText\": \"<string>\",\n \"headerMediaFileId\": \"<string>\",\n \"headerMediaUrl\": \"<string>\",\n \"headerText\": \"<string>\",\n \"language\": \"<string>\",\n \"messageBody\": \"<string>\",\n \"messageFooter\": \"<string>\",\n \"quickReplyButtons\": \"<string>\",\n \"templateName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>"
},
"message": "<string>",
"meta": {
"aiTranslation": "<string>",
"apiKeyUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"brandingCapability": "<string>",
"callCapabilities": {
"aiHandling": "<string>",
"aiHumanTransfer": true,
"analytics": "<string>",
"businessHoursRouting": true,
"crossChannelCascade": true,
"enabled": true,
"multiLanguageAi": true,
"outboundCampaigns": "<string>",
"outboundConcurrency": 123,
"pausedForPayment": true,
"queueManagement": true,
"recording": true,
"routing": "<string>",
"voicemailDrop": true,
"whatsappOutbound": true
},
"catalogCapability": "<string>",
"catalogUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"count": 123,
"dataRetentionCapability": "<string>",
"emailInboxUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
},
"endCursor": "<string>",
"hasNext": true,
"hasPrevious": true,
"limit": 123,
"liveChatWidgetUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"page": 123,
"pageSize": 123,
"pendingCount": 123,
"routingCapability": "<string>",
"ssoCapability": "<string>",
"startCursor": "<string>",
"total": 123,
"totalPages": 123,
"whatsappNumberUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
}
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>"
},
"message": "<string>",
"meta": {
"aiTranslation": "<string>",
"apiKeyUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"brandingCapability": "<string>",
"callCapabilities": {
"aiHandling": "<string>",
"aiHumanTransfer": true,
"analytics": "<string>",
"businessHoursRouting": true,
"crossChannelCascade": true,
"enabled": true,
"multiLanguageAi": true,
"outboundCampaigns": "<string>",
"outboundConcurrency": 123,
"pausedForPayment": true,
"queueManagement": true,
"recording": true,
"routing": "<string>",
"voicemailDrop": true,
"whatsappOutbound": true
},
"catalogCapability": "<string>",
"catalogUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"count": 123,
"dataRetentionCapability": "<string>",
"emailInboxUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
},
"endCursor": "<string>",
"hasNext": true,
"hasPrevious": true,
"limit": 123,
"liveChatWidgetUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"page": 123,
"pageSize": 123,
"pendingCount": 123,
"routingCapability": "<string>",
"ssoCapability": "<string>",
"startCursor": "<string>",
"total": 123,
"totalPages": 123,
"whatsappNumberUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
}
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>"
},
"message": "<string>",
"meta": {
"aiTranslation": "<string>",
"apiKeyUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"brandingCapability": "<string>",
"callCapabilities": {
"aiHandling": "<string>",
"aiHumanTransfer": true,
"analytics": "<string>",
"businessHoursRouting": true,
"crossChannelCascade": true,
"enabled": true,
"multiLanguageAi": true,
"outboundCampaigns": "<string>",
"outboundConcurrency": 123,
"pausedForPayment": true,
"queueManagement": true,
"recording": true,
"routing": "<string>",
"voicemailDrop": true,
"whatsappOutbound": true
},
"catalogCapability": "<string>",
"catalogUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"count": 123,
"dataRetentionCapability": "<string>",
"emailInboxUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
},
"endCursor": "<string>",
"hasNext": true,
"hasPrevious": true,
"limit": 123,
"liveChatWidgetUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"page": 123,
"pageSize": 123,
"pendingCount": 123,
"routingCapability": "<string>",
"ssoCapability": "<string>",
"startCursor": "<string>",
"total": 123,
"totalPages": 123,
"whatsappNumberUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
}
},
"success": true
}Updates an existing Facebook template using JSON data
Updates an existing Facebook template using JSON data (PUT /templates/facebook/). Parameters, request examples and response schema for the Nateq REST API.
PUT
/
templates
/
facebook
/
{id}
Updates an existing Facebook template using JSON data
curl --request PUT \
--url https://api.nateq.io/api/v1/templates/facebook/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"callButtonText": "<string>",
"callCountryCode": "<string>",
"callPhoneNumber": "<string>",
"ctaButtonText": "<string>",
"ctaUrl": "<string>",
"directionsAddress": "<string>",
"directionsButtonText": "<string>",
"headerMediaFileId": "<string>",
"headerMediaUrl": "<string>",
"headerText": "<string>",
"language": "<string>",
"messageBody": "<string>",
"messageFooter": "<string>",
"quickReplyButtons": "<string>",
"templateName": "<string>"
}
'import requests
url = "https://api.nateq.io/api/v1/templates/facebook/{id}"
payload = {
"callButtonText": "<string>",
"callCountryCode": "<string>",
"callPhoneNumber": "<string>",
"ctaButtonText": "<string>",
"ctaUrl": "<string>",
"directionsAddress": "<string>",
"directionsButtonText": "<string>",
"headerMediaFileId": "<string>",
"headerMediaUrl": "<string>",
"headerText": "<string>",
"language": "<string>",
"messageBody": "<string>",
"messageFooter": "<string>",
"quickReplyButtons": "<string>",
"templateName": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
callButtonText: '<string>',
callCountryCode: '<string>',
callPhoneNumber: '<string>',
ctaButtonText: '<string>',
ctaUrl: '<string>',
directionsAddress: '<string>',
directionsButtonText: '<string>',
headerMediaFileId: '<string>',
headerMediaUrl: '<string>',
headerText: '<string>',
language: '<string>',
messageBody: '<string>',
messageFooter: '<string>',
quickReplyButtons: '<string>',
templateName: '<string>'
})
};
fetch('https://api.nateq.io/api/v1/templates/facebook/{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.nateq.io/api/v1/templates/facebook/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'callButtonText' => '<string>',
'callCountryCode' => '<string>',
'callPhoneNumber' => '<string>',
'ctaButtonText' => '<string>',
'ctaUrl' => '<string>',
'directionsAddress' => '<string>',
'directionsButtonText' => '<string>',
'headerMediaFileId' => '<string>',
'headerMediaUrl' => '<string>',
'headerText' => '<string>',
'language' => '<string>',
'messageBody' => '<string>',
'messageFooter' => '<string>',
'quickReplyButtons' => '<string>',
'templateName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nateq.io/api/v1/templates/facebook/{id}"
payload := strings.NewReader("{\n \"callButtonText\": \"<string>\",\n \"callCountryCode\": \"<string>\",\n \"callPhoneNumber\": \"<string>\",\n \"ctaButtonText\": \"<string>\",\n \"ctaUrl\": \"<string>\",\n \"directionsAddress\": \"<string>\",\n \"directionsButtonText\": \"<string>\",\n \"headerMediaFileId\": \"<string>\",\n \"headerMediaUrl\": \"<string>\",\n \"headerText\": \"<string>\",\n \"language\": \"<string>\",\n \"messageBody\": \"<string>\",\n \"messageFooter\": \"<string>\",\n \"quickReplyButtons\": \"<string>\",\n \"templateName\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.nateq.io/api/v1/templates/facebook/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"callButtonText\": \"<string>\",\n \"callCountryCode\": \"<string>\",\n \"callPhoneNumber\": \"<string>\",\n \"ctaButtonText\": \"<string>\",\n \"ctaUrl\": \"<string>\",\n \"directionsAddress\": \"<string>\",\n \"directionsButtonText\": \"<string>\",\n \"headerMediaFileId\": \"<string>\",\n \"headerMediaUrl\": \"<string>\",\n \"headerText\": \"<string>\",\n \"language\": \"<string>\",\n \"messageBody\": \"<string>\",\n \"messageFooter\": \"<string>\",\n \"quickReplyButtons\": \"<string>\",\n \"templateName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nateq.io/api/v1/templates/facebook/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callButtonText\": \"<string>\",\n \"callCountryCode\": \"<string>\",\n \"callPhoneNumber\": \"<string>\",\n \"ctaButtonText\": \"<string>\",\n \"ctaUrl\": \"<string>\",\n \"directionsAddress\": \"<string>\",\n \"directionsButtonText\": \"<string>\",\n \"headerMediaFileId\": \"<string>\",\n \"headerMediaUrl\": \"<string>\",\n \"headerText\": \"<string>\",\n \"language\": \"<string>\",\n \"messageBody\": \"<string>\",\n \"messageFooter\": \"<string>\",\n \"quickReplyButtons\": \"<string>\",\n \"templateName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>"
},
"message": "<string>",
"meta": {
"aiTranslation": "<string>",
"apiKeyUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"brandingCapability": "<string>",
"callCapabilities": {
"aiHandling": "<string>",
"aiHumanTransfer": true,
"analytics": "<string>",
"businessHoursRouting": true,
"crossChannelCascade": true,
"enabled": true,
"multiLanguageAi": true,
"outboundCampaigns": "<string>",
"outboundConcurrency": 123,
"pausedForPayment": true,
"queueManagement": true,
"recording": true,
"routing": "<string>",
"voicemailDrop": true,
"whatsappOutbound": true
},
"catalogCapability": "<string>",
"catalogUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"count": 123,
"dataRetentionCapability": "<string>",
"emailInboxUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
},
"endCursor": "<string>",
"hasNext": true,
"hasPrevious": true,
"limit": 123,
"liveChatWidgetUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"page": 123,
"pageSize": 123,
"pendingCount": 123,
"routingCapability": "<string>",
"ssoCapability": "<string>",
"startCursor": "<string>",
"total": 123,
"totalPages": 123,
"whatsappNumberUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
}
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>"
},
"message": "<string>",
"meta": {
"aiTranslation": "<string>",
"apiKeyUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"brandingCapability": "<string>",
"callCapabilities": {
"aiHandling": "<string>",
"aiHumanTransfer": true,
"analytics": "<string>",
"businessHoursRouting": true,
"crossChannelCascade": true,
"enabled": true,
"multiLanguageAi": true,
"outboundCampaigns": "<string>",
"outboundConcurrency": 123,
"pausedForPayment": true,
"queueManagement": true,
"recording": true,
"routing": "<string>",
"voicemailDrop": true,
"whatsappOutbound": true
},
"catalogCapability": "<string>",
"catalogUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"count": 123,
"dataRetentionCapability": "<string>",
"emailInboxUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
},
"endCursor": "<string>",
"hasNext": true,
"hasPrevious": true,
"limit": 123,
"liveChatWidgetUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"page": 123,
"pageSize": 123,
"pendingCount": 123,
"routingCapability": "<string>",
"ssoCapability": "<string>",
"startCursor": "<string>",
"total": 123,
"totalPages": 123,
"whatsappNumberUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
}
},
"success": true
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"message": "<string>"
},
"message": "<string>",
"meta": {
"aiTranslation": "<string>",
"apiKeyUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"brandingCapability": "<string>",
"callCapabilities": {
"aiHandling": "<string>",
"aiHumanTransfer": true,
"analytics": "<string>",
"businessHoursRouting": true,
"crossChannelCascade": true,
"enabled": true,
"multiLanguageAi": true,
"outboundCampaigns": "<string>",
"outboundConcurrency": 123,
"pausedForPayment": true,
"queueManagement": true,
"recording": true,
"routing": "<string>",
"voicemailDrop": true,
"whatsappOutbound": true
},
"catalogCapability": "<string>",
"catalogUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"count": 123,
"dataRetentionCapability": "<string>",
"emailInboxUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
},
"endCursor": "<string>",
"hasNext": true,
"hasPrevious": true,
"limit": 123,
"liveChatWidgetUsage": {
"limit": 123,
"unlimited": true,
"used": 123
},
"page": 123,
"pageSize": 123,
"pendingCount": 123,
"routingCapability": "<string>",
"ssoCapability": "<string>",
"startCursor": "<string>",
"total": 123,
"totalPages": 123,
"whatsappNumberUsage": {
"addOn": "<string>",
"limit": 123,
"unlimited": true,
"used": 123
}
},
"success": true
}Authorizations
Body
application/json
Request body