curl --request POST \
--url https://api.notifique.dev/v1/templates/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": "alerta_pedido",
"channels": [
"whatsapp"
],
"to": [
"5511999999999"
],
"variables": {
"codigo": "12345",
"name": "Maria"
},
"whatsapp": {
"from": "cuid_instancia_whatsapp"
}
}
'{
"success": true,
"data": {
"messageIds": [
"clmsg_wa1"
],
"status": "QUEUED",
"count": 9,
"instagramIds": [
"clig1"
]
}
}Enviar template
Envia um template pelos canais escolhidos (whatsapp, sms, email, …). Resposta 202. Escopo conforme o canal. Para WhatsApp oficial, este é o caminho certo (não use POST /v1/whatsapp/messages com type: template).
curl --request POST \
--url https://api.notifique.dev/v1/templates/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": "alerta_pedido",
"channels": [
"whatsapp"
],
"to": [
"5511999999999"
],
"variables": {
"codigo": "12345",
"name": "Maria"
},
"whatsapp": {
"from": "cuid_instancia_whatsapp"
}
}
'{
"success": true,
"data": {
"messageIds": [
"clmsg_wa1"
],
"status": "QUEUED",
"count": 9,
"instagramIds": [
"clig1"
]
}
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corpo
Envio multicanal. Remetente, agendamento e opções ficam em blocos por canal (whatsapp, email, rcs, …), cada um com from quando o canal exige remetente.
Ate 500 destinatarios. Telefones E.164 para SMS/WhatsApp/RCS; e-mail; chat_id ou @username no Telegram; device ID no Push; Instagram peer id ou @username; voice exige prefixo + no telefone (ex.: +5511999887766) para roteamento correto.
1 - 500 elements[
"5511999999999",
"cliente@email.com",
"@usuario_telegram",
"cldevice123",
"+5511999887766",
"1234567890"
]
ID ou nome do template
"alerta_pedido"
1whatsapp, sms, email, telegram, rcs, push, voice, instagram, whatsapp_call [
"whatsapp",
"sms",
"email",
"telegram",
"rcs",
"push",
"voice",
"instagram",
"whatsapp_call"
]
Show child attributes
Show child attributes
{ "codigo": "12345", "name": "Maria" }
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Esta página foi útil?

