button: Componentes que definem os botões interativosbutton.sub_type: Tipo de botão (quick_reply, url)button.index: Índice do botão no templatebutton.parameters: Parâmetros específicos do botãoAuthorization: Bearer ********************{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "5511999999999",
"type": "template",
"template": {
"name": "confirmacao_agendamento",
"language": {
"code": "pt_BR"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "João Silva"
},
{
"type": "text",
"text": "15/04/2025 às 14:30"
},
{
"type": "text",
"text": "Dr. Carlos Oliveira"
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": "0",
"parameters": [
{
"type": "payload",
"payload": "CONFIRM_APPOINTMENT_12345"
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": "1",
"parameters": [
{
"type": "payload",
"payload": "RESCHEDULE_APPOINTMENT_12345"
}
]
}
]
}
}curl --location --request POST 'https://waba.optjuntos.com.br/api/v1/messages' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "5511999999999",
"type": "template",
"template": {
"name": "confirmacao_agendamento",
"language": {
"code": "pt_BR"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "João Silva"
},
{
"type": "text",
"text": "15/04/2025 às 14:30"
},
{
"type": "text",
"text": "Dr. Carlos Oliveira"
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": "0",
"parameters": [
{
"type": "payload",
"payload": "CONFIRM_APPOINTMENT_12345"
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": "1",
"parameters": [
{
"type": "payload",
"payload": "RESCHEDULE_APPOINTMENT_12345"
}
]
}
]
}
}'{
"messaging_product": "string",
"contacts": [
{
"input": "string",
"wa_id": "string"
}
],
"messages": [
{
"id": "string"
}
]
}