Edit a template
curl --request PATCH \
--url https://api.getreply.in/v1/templates/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"footer": "<string>",
"header": {},
"examples": {},
"buttons": [
{}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('<string>'),
footer: '<string>',
header: {},
examples: {},
buttons: [{}]
})
};
fetch('https://api.getreply.in/v1/templates/{name}', 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.getreply.in/v1/templates/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'body' => '<string>',
'footer' => '<string>',
'header' => [
],
'examples' => [
],
'buttons' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.getreply.in/v1/templates/{name}"
payload = {
"body": "<string>",
"footer": "<string>",
"header": {},
"examples": {},
"buttons": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"name": "<string>",
"language": "<string>",
"category": "<string>",
"status": "approved",
"rejection_reason": "<string>",
"quality": "<string>",
"header_type": "<string>",
"header_text": "<string>",
"body": "<string>",
"footer": "<string>",
"variables": 123,
"buttons": [
{}
]
}Templates
Edit a template
Edits a template; it goes for review again. The name, language and an approved category stay.
Permission: A Full key.
PATCH
/
v1
/
templates
/
{name}
Edit a template
curl --request PATCH \
--url https://api.getreply.in/v1/templates/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"footer": "<string>",
"header": {},
"examples": {},
"buttons": [
{}
]
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('<string>'),
footer: '<string>',
header: {},
examples: {},
buttons: [{}]
})
};
fetch('https://api.getreply.in/v1/templates/{name}', 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.getreply.in/v1/templates/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'body' => '<string>',
'footer' => '<string>',
'header' => [
],
'examples' => [
],
'buttons' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://api.getreply.in/v1/templates/{name}"
payload = {
"body": "<string>",
"footer": "<string>",
"header": {},
"examples": {},
"buttons": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"name": "<string>",
"language": "<string>",
"category": "<string>",
"status": "approved",
"rejection_reason": "<string>",
"quality": "<string>",
"header_type": "<string>",
"header_text": "<string>",
"body": "<string>",
"footer": "<string>",
"variables": 123,
"buttons": [
{}
]
}Authorizations
Your API key, e.g. gr_live_…
Path Parameters
The name.
Query Parameters
A language code.