logo

Ejemplos

Last update: an hour ago by Irais Aguirre

Crear Template

Petición HTTP crear template

curl -X POST "https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/templates" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{wa-msg-api-token}}' \
-H 'phone_number_id: 5215500000000'

Ejemplo body general

{
"name": "notificacion_de_pedido",
"language": "es_MX",
"category": "ACCOUNT_UPDATE",
"structure":
{
"header":
{
"format": "TEXT|IMAGE|DOCUMENT|VIDEO|LOCATION",
"text": "PEDIDO: {{1}}",
"example":
{
"header_handler":
[
"file-handle"
],
"header_text":
[
"header-example"
]
}
},
"body":
{
"text": "Tu pedido {{1}} esta por llegar",
"example":
{
"body_text":
[
[ "123"]
]
}
},
"footer": "Mi empresa",
"buttons":
[
{
"type": "PHONE_NUMBER|URL|QUICK_REPLY|COPY_CODE|FLOW",
"text": "phone-button-text|url-button-text",
"url": "https://www.website.com/{{1}}",
"phone_number": "+52(1) 555-1111",
"example":
[
"https://www.website.com/dynamic-url-example"
]
}
]
}
}

Ejemplo body flows

{
"name": "lead_cj_cm_dudas",
"language": "es_MX",
"category": "MARKETING",
"structure":
{
"body":
{
"text": "Conecta con tus clientes interactuando por el canal y momento correcto. SMS, RCS, WhatsApp, Messenger, Email, Voz, Chatbot y muchos más."
},
"buttons":
[
{
"type": "FLOW",
"text": "Registrate",
"flow_id": "1636507303762565",
"navigate_screen": "CONTACT_INFO",
"flow_action": "navigate"
}
]
},
"wba_id": "173276950931742",
"allowCategoryChange": false
}

Ejemplo body carrusel

{
"wba_id": "173276950931742",
"allowCategoryChange": false,
"name": "coupon_code_fall2023_25off_02",
"language": "en_US",
"category": "MARKETING",
"structure":
{
"body":
{
"text": "Proporciona la mejor experiencia a tus clientes a través de sus canales favoritos. Use el código {{1}} para obtener un descuento del {{2}} al registrarte.",
"example":
{
"body_text":
[
[
"Juan Pablo",
"25OFF"
]
]
}
},
"carousel":
{
"cards":
[
{
"header":
{
"format": "IMAGE",
"example":
{
"header_handle":
[
"4:bW9iaWxlXzAxLnBuZw==:aW1hZ2UvcG5n:ARbNmL-LWW9g9GiqrdlQDUfIAfPya43un_og7QK33_GH3bqlB33NolXg9IQy_eZrIy0jEyq0ha4aA3XCPTg2ZA0zwKBpmuocrbOtkSj_0drOnA:e:1711990389:448814796237847:100079775248003:ARYAjsbm3hq8XZ3kN1s"
]
}
},
"body":
{
"text": "Conecta con tus clientes interactuando por el canal y momento correcto. SMS, RCS..."
},
"buttons":
[
{
"type": "URL",
"text": "Registrate",
"url": "https://www.conceptomovil.com/producto_broadcastermobile.html",
"example":
[
"https://www.conceptomovil.com/producto_broadcastermobile.html"
]
}
]
},
{
"header":
{
"format": "IMAGE",
"example":
{
"header_handle":
[
"4:aW1hZ2VfYm90LnBuZw==:aW1hZ2UvcG5n:ARZd4cAxwHvD_0H0WxEn4mV0wTtGWLDFMUWx7cgQdDzekOIyPPo_qHOHDg044lvPQ_2zbX0GB19aQOUhM6GmACftDCTuewmr_AQ1YBJ2pvuzvg:e:1711993327:448814796237847:100079775248003:ARZTrySagSJ0QUg2sh8"
]
}
},
"body":
{
"text": "Atiende a tus clientes con Chatbots y Agentes mediante Conversaciones en WhatsApp"
},
"buttons":
[
{
"type": "URL",
"text": "Registrate",
"url": "https://www.conceptomovil.com/producto_broadcasterbot.html",
"example":
[
"https://www.conceptomovil.com/producto_broadcasterbot.html"
]
}
]
},
{
"header":
{
"format": "IMAGE",
"example":
{
"header_handle":
[
"4:cGxhdGFmb3JtYV9wcm9tb2Npb25lcy5wbmc=:aW1hZ2UvcG5n:ARZefz3ygOhmwkZPlpuAaCmSdO0OeTZ0y69FM0Qy1AtNfDIalUrrRlANic_91EHF8mZNYPoIytQp9KMCcLdTOpPofEk52J9-H5u8Jj7eaMLdbQ:e:1711993388:448814796237847:100079775248003:ARZEN_1Ob-vzi78h0ow"
]
}
},
"body":
{
"text": "La plataforma inteligente para gestionar tus dinámicas promocionales"
},
"buttons":
[
{
"type": "URL",
"text": "Registrate",
"url": "https://www.conceptomovil.com/producto_cmmkt.html",
"example":
[
"https://www.conceptomovil.com/producto_cmmkt.html"
]
}
]
}
]
}
}
}

Ejemplo body oferta por tiempo limitado

{
"wba_id": "173276950931742",
"allowCategoryChange": false,
"name": "coupon_code_fall2023_25off_02",
"language": "en_US",
"category": "MARKETING",
"structure":
{
"header":
{
"format": "IMAGE",
"example":
{
"header_handle":
[
"https://iili.io/HDQOyc7.jpg"
]
}
},
"limited_time_offer":
{
"text": "Fecha límite!",
"has_expiration": true
},
"body":
{
"text": "Solo hoy, {{1}}! usa el código {{2}} para obtener un gran descuento al registrarte!",
"example":
{
"body_text":
[
[
"Juan Pablo",
"25OFF"
]
]
}
},
"buttons":
[
{
"type": "COPY_CODE",
"example":
[
"1234"
]
},
{
"type": "URL",
"text": "Registrate!",
"url": "https://www.conceptomovil.com/producto_broadcasterdata.html"
}
]
}
}


Eliminar Template

Petición HTTP eliminar template

curl -X DELETE "https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/templates/{{wab_id}}/{{id}}/{{template_name}}" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{wa-msg-api-token}}'


Consultar Template

Petición HTTP consultar template

curl "https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/template/{{wba_id}}" \
-H 'Authorization: Bearer {{wa-msg-api-token}}'
Whatsapp — Anterior
Limitaciones
Siguiente — Whatsapp
Respuestas