buttons
: Componentes que definem os botões interativosbuttons.sub_type
: Tipo de botão (quick_reply, url)buttons.index
: Índice do botão no templatebuttons.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": "buttons",
"sub_type": "quick_reply",
"index": "0",
"parameters": [
{
"type": "payload",
"payload": "CONFIRM_APPOINTMENT_12345"
}
]
},
{
"type": "buttons",
"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 '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": "buttons",
"sub_type": "quick_reply",
"index": "0",
"parameters": [
{
"type": "payload",
"payload": "CONFIRM_APPOINTMENT_12345"
}
]
},
{
"type": "buttons",
"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"
}
]
}