Ponto de extremidade da API:
https://yours.com.br/api/v1/whatsapp/messages
Text message request example:
curl --location --request POST 'https://yours.com.br/api/v1/whatsapp/messages' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--data '{
"to": "5511999999999",
"message": "Sua inscricao foi confirmada.",
"preview_url": false
}'
Template message request example:
curl --location --request POST 'https://yours.com.br/api/v1/whatsapp/messages' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--data '{
"to": "5511999999999",
"template_name": "order_update",
"language": "pt_BR",
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Maicon" },
{ "type": "text", "text": "12345" }
]
}
]
}'
tomessagetemplate_name is not provided.template_namemessage is not provided.languagept_BR.componentspreview_url