https://wv{{wolkvox_server}}.wolkvox.com/api/v2/whatsapp.php?api=edit_template
Descripción:
Esta API permite a los usuarios editar la información de las plantillas de mensajes de WhatsApp que ya han sido creadas y asociadas a un conector específico. Esta funcionalidad es fundamental para mantener las plantillas actualizadas, corregir errores o ajustar el contenido sin tener que crear una nueva plantilla desde cero.
Beneficio:
Cómo funciona:
Ejemplos de código:
En nuestro workspace de Postman (da clic aquí para ir), tienes acceso a ejemplos de código que facilitan la integración con nuestras APIs en diferentes lenguajes de programación, como cURL, Python, JavaScript, y más.
Esta funcionalidad es ideal para integraciones rápidas y permite adaptar los llamados a la API según el lenguaje de programación de tu sistema.
Cómo Usar los Ejemplos de Código:
NAME | DESCRIPTION | TYPE |
---|---|---|
connector_id | El ID del conector de WhatsApp al que pertenece la plantilla que se desea editar. (Ej. “1266”). | String |
name | El nombre exacto de la plantilla existente que se desea modificar. Este campo es crucial para identificar la plantilla a editar. | String |
components | Un arreglo de objetos que definen las secciones actualizadas de la plantilla. Cada objeto dentro de este arreglo representa una sección (ej. HEADER , BODY , FOOTER , BUTTONS ) y sus propiedades. Se deben incluir todos los componentes que conformarán la versión actualizada de la plantilla, incluso si algunos no cambian, para asegurar que la plantilla se reemplace completamente con la nueva definición. |
String |
type | “HEADER” | String |
format | El formato del encabezado (ej. "TEXT" , "IMAGE" , "VIDEO" , "DOCUMENT" ). |
Array |
text | El texto del encabezado (si format es "TEXT" ). Puede contener variables. |
String |
format | El tipo de archivo multimedia. Puede ser “IMAGE”, “VIDEO” o “DOCUMENT”. | String |
example | Objeto para proporcionar ejemplos de las variables. | Object |
header_text | Un arreglo con un arreglo interno que contiene el valor de ejemplo para la variable en el text del encabezado. |
String |
type | Componente “BODY”. | String |
text | El contenido principal del mensaje. Puede contener variables dinámicas (ej. {{1}} , {{2}} , {{3}} ). |
String |
example | Objeto que contiene body_text | Object |
body_text | Obligatorio. Un arreglo de arreglos con textos de ejemplo para las variables definidas en text. Estos ejemplos son solo para la revisión de Meta y no se envían al cliente final. (Ej. [[“Example Name”, “Example Name 2”]]). | String |
type | Componente “FOOTER”. | String |
text | El texto que se mostrará en el pie de página de la plantilla. (Ej. “Use the buttons below to manage your marketing subscriptions”). | String |
type | Componente “BUTTONS”. Define un botón individual y sus propiedades. | String |
buttons | Arreglo que representa un botón individual con sus propiedades específicas. | String |
type | El tipo de botón (ej. “QUICK_REPLY”, “URL”, “PHONE_NUMBER”, “FLOW”, “OTP”). Para leer la documentación oficial de Meta Business acerca de los botones da [clic aquí]. | String |
text | Texto que se mostrará en el botón. | String |
NAME | DESCRIPTION | TYPE |
---|---|---|
code | Código de error | Int |
error | Nombre del error | String |
msg | Explicación del error | String |
data | Objeto que contiene los datos relevantes de la carga | Object |
template_id | El ID único de la plantilla en Meta. Este ID no cambia con la edición. | String |
name | El nombre de la plantilla que fue editada. | String |
status | El estado actual de la plantilla después de la edición. Después de una edición, la plantilla entrará en un proceso de revisión y su estado será “PENDING” hasta que Meta la apruebe nuevamente, momento en el que cambiará a “APPROVED”. El ejemplo proporcionado muestra “APPROVED” lo cual implicaría que la revisión ya finalizó. | 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": ""
}
}
Medellín +57 (604) 322 98 80
Bogotá +57 (601) 381 90 40
Cali +57 (602) 891 28 46
Barranquilla +57 (605) 316 10 34
Sao Paulo
+55 (11) 521 75 933
Madrid
+34 (910) 601 691
Atlanta, GA +1 (470) 447-2610
Miami, FL +1 (470) 447-2610
Ciudad de México
+52 (55) 8526 36 34
Santo Domingo
+1 (829) 249 69 68
Copyright © 2025 WOLKVOX MICROSYSLABS. Todos los derechos reservados. Cra 30 # 4A-45 Of. 205 Ed. FOREVER W&L, Medellín, Colombia
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
ESPAÑA
Madrid +34 (910) 601 691
MÉXICO
Ciudad de México +52 (55) 8526 36 34
BRASIL
Brasilia +55 (61) 9836 4127
São Paulo +55 (12) 9811 155 83
ESTADOS UNIDOS
New York +1 (914) 373 71 36
REPÚBLICA DOMINICANA
Santo Domingo +1 (829) 249 69 68
CHILE
Santiago de Chile +56 (2) 240 533 89
GUATEMALA
Ciudad de Guatemala +502 (2) 314 1344
PERÚ
Lima +51 (1) 644 91 39
Copyright © 2025 WOLKVOX MICROSYSLABS.
Todos los derechos reservados.
Cra 30 # 4A – 45 Of. 205 Ed. FOREVER W&L, Medellín, Colombia
Hacemos uso de cookies, si continúas navegando asumiremos que estás de acuerdo. Puede leer más sobre el uso de cookies en nuestras políticas de privacidad y tratamiento de datos personales
Hacemos uso de cookies, si continúas navegando asumiremos que estás de acuerdo. Puede leer más sobre el uso de cookies en nuestras políticas de privacidad y tratamiento de datos personales