Botão URL
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.robomensageiro.com.br/api/messages/sendURLBTN',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"number": "5511978097649",
"customData": {
"body": "Aqui vem o Body",
"name": "cta_copy",
"params": "{\\"display_text\\":\\"Ir para Site2\\",\\"id\\":\\"aaaaaa-2863-43eb-2b31-17a8f4132689\\",\\"url\\":\\"https://www.robomensageiro.com.br\\",\\"disabled\\":false}"
}
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer seutokenaqui' //Token cadastrado na conexão
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;