API - SISTEMA | BAILEYS | OFIC...
Mensagem de Lista
1 min
\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/messages/sendlist', 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" "5511989091838", "body" "selecione a melhor opção ", "optionlist" { "buttonlabel" "abrir lista de opções", "options" \[ { "id" "1", "description" "whaticket saas whitelabel", "title" "whaticket saas whitelabel" }, { "id" "2", "description" "não funcionam", "title" "outras plataformas" } ] } }', curlopt httpheader => array( 'content type application/json', 'authorization bearer seutokenaqui' //token cadastrado na conexão ), )); $response = curl exec($curl); curl close($curl); echo $response; { "mensagem" "mensagem enviada", "ticket" ticketdata }