https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=edit_template
Description:
This API allows users to edit the information of WhatsApp message templates that have already been created and associated with a specific connector. This functionality is essential for keeping templates up to date, correcting errors, or adjusting content without the need to create a new template from scratch.
Benefits:
Code Examples:
In our Postman workspace ([click here] to access it), you have access to code examples that facilitate integration with our APIs in different programming languages such as cURL, Python, JavaScript, and more.
This feature is ideal for quick integrations and allows you to adapt the API calls to your system’s programming language.
How to Use the Code Examples:
NAME | DESCRIPTION | TYPE |
---|---|---|
connector_id | The ID of the WhatsApp connector to which the template to be edited belongs (e.g., “1266”). | String |
name | The exact name of the existing template you wish to modify. This field is crucial to identify the template to be edited. | String |
components | An array of objects that define the updated sections of the template. Each object within this array represents a section (e.g., HEADER, BODY, FOOTER, BUTTONS) and its properties. All components that will make up the updated version of the template must be included, even if some remain unchanged, to ensure the template is fully replaced with the new definition. | String |
type | “HEADER” | String |
format | The format of the header (e.g., “TEXT”, “IMAGE”, “VIDEO”, “DOCUMENT”). | Array |
text | The header text (if format is “TEXT”). It can contain variables. | String |
format | The type of media file. It can be “IMAGE”, “VIDEO”, or “DOCUMENT”. | String |
example | Object used to provide variable examples. | Object |
header_text | An array with a nested array containing the sample value for the variable in the header text. | String |
type | BODY component. | String |
text | The main content of the message. It can include dynamic variables (e.g., {{1}}, {{2}}, {{3}}). | String |
example | Object containing body_text. | Object |
body_text | Required. An array of arrays with sample texts for the variables defined in text. These examples are for Meta’s review purposes only and will not be sent to the end user. (e.g., [[“Example Name”, “Example Name 2”]]). | String |
type | FOOTER component. | String |
text | The text to be displayed in the template footer. (e.g., “Use the buttons below to manage your marketing subscriptions”). | String |
type | BUTTONS component. Defines an individual button and its properties. | String |
buttons | Array representing a single button with its specific properties. | String |
type | The type of button (e.g., “QUICK_REPLY”, “URL”, “PHONE_NUMBER”, “FLOW”, “OTP”). To read Meta Business’s official documentation on buttons, click [here]. | String |
text | Text to be displayed on the button. | String |
NAME | DESCRIPTION | TYPE |
---|---|---|
code | Error code. | Int |
error | Error name. | String |
msg | Error explanation. | String |
data | Object containing the relevant payload data. | Object |
template_id | The unique ID of the template in Meta. This ID does not change upon editing. | String |
name | The name of the template that was edited. | String |
status | The current status of the template after the edit. After being edited, the template enters a review process and its status will be “PENDING” until Meta approves it again, at which point it will change to “APPROVED”. The example provided shows “APPROVED”, which implies that the review process has already been completed. | String |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=edit_template',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"connector_id": "",
"name": "",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "",
"example": {
"header_text": [
""
]
}
},
{
"type": "BODY",
"text": "",
"example": {
"body_text": [
[
""
]
]
}
},
{
"type": "FOOTER",
"text": "Use the buttons below to manage your marketing subscriptions"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "Unsubcribe from Promos"
},
{
"type": "QUICK_REPLY",
"text": "Unsubscribe from All"
}
]
}
]
}',
CURLOPT_HTTPHEADER => array(
'wolkvox-token: {{wolkvox-token}}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
curl --location --globoff --request PUT 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=edit_template' \
--header 'wolkvox-token: {{wolkvox-token}}' \
--header 'Content-Type: application/json' \
--data '{
"connector_id": "",
"name": "",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "",
"example": {
"header_text": [
""
]
}
},
{
"type": "BODY",
"text": "",
"example": {
"body_text": [
[
""
]
]
}
},
{
"type": "FOOTER",
"text": "Use the buttons below to manage your marketing subscriptions"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "Unsubcribe from Promos"
},
{
"type": "QUICK_REPLY",
"text": "Unsubscribe from All"
}
]
}
]
}'
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"connector_id\": \"\",\r\n \"name\": \"\",\r\n \"components\": [\r\n {\r\n \"type\": \"HEADER\",\r\n \"format\": \"TEXT\",\r\n \"text\": \"\",\r\n \"example\": {\r\n \"header_text\": [\r\n \"\"\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"BODY\",\r\n \"text\": \"\",\r\n \"example\": {\r\n \"body_text\": [\r\n [\r\n \"\"\r\n ]\r\n ]\r\n }\r\n },\r\n {\r\n \"type\": \"FOOTER\",\r\n \"text\": \"Use the buttons below to manage your marketing subscriptions\"\r\n },\r\n {\r\n \"type\": \"BUTTONS\",\r\n \"buttons\": [\r\n {\r\n \"type\": \"QUICK_REPLY\",\r\n \"text\": \"Unsubcribe from Promos\"\r\n },\r\n {\r\n \"type\": \"QUICK_REPLY\",\r\n \"text\": \"Unsubscribe from All\"\r\n }\r\n ]\r\n }\r\n ]\r\n}");
Request request = new Request.Builder()
.url("https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=edit_template")
.method("PUT", body)
.addHeader("wolkvox-token", "{{wolkvox-token}}")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
import requests
import json
url = "https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=edit_template"
payload = json.dumps({
"connector_id": "",
"name": "",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "",
"example": {
"header_text": [
""
]
}
},
{
"type": "BODY",
"text": "",
"example": {
"body_text": [
[
""
]
]
}
},
{
"type": "FOOTER",
"text": "Use the buttons below to manage your marketing subscriptions"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "Unsubcribe from Promos"
},
{
"type": "QUICK_REPLY",
"text": "Unsubscribe from All"
}
]
}
]
})
headers = {
'wolkvox-token': '{{wolkvox-token}}',
'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
{
"code": "200",
"error": null,
"msg": "Template edited successfully",
"data": {
"template_id": "",
"name": "",
"status": ""
}
}
Sao Paulo +55 (11) 521 75 933
Santiago de Chile +56 (2) 240 533 89
Medellín +57 (604) 322 98 80
Ciudad de Guatemala +502 (2) 3141344
Ciudad de México +52 (55) 8526 36 34
Copyright © 2025 WOLKVOX MICROSYSLABS. 1820 N Corporate Lakes Blvd, unit 205. Weston, FL 33326
COLOMBIA
Medellín +57 (4) 322 98 80
Bogotá +57 (1) 381 90 40
Cali +57 (2) 891 28 46
Barranquilla +57 (5) 316 10 34
ARGENTINA
Buenos Aires +54 (11) 5217 5933
SPAIN
Madrid +34 (910) 601 691
MEXICO
Ciudad de México +52 (55) 8526 36 34
BRASIL
Brasilia +55 (61) 9836 4127
São Paulo +55 (12) 9811 155 83
UNITED STATES
New York +1 (914) 373 71 36
DOMINICAN REPUBLIC
Santo Domingo +1 (829) 249 69 68
CHILE
Santiago de Chile +56 (2) 240 533 89
GUATEMALA
Ciudad de Guatemala +502 (2) 314 1344
PERU
Lima +51 (1) 644 91 39
Copyright © 2025 WOLKVOX MICROSYSLABS.
Cra 30 # 4A – 45 Of. 205 Ed. FOREVER W&L, Medellín, Colombia
Usamos cookies, se continuar a navegar assumimos que concorda. Pode ler mais sobre a utilização de cookies nas nossas políticas de privacidade e tratamento de dados pessoais