API - SISTEMA | BAILEYS | OFIC...
Criar Agendamento
1min
\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/schedules', 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 =>'{ "body" "teste de agendamento", "sendat" "2023 12 17t22 00 00 000z", "contactid" "24294", "userid" "34", "openticket" "0", "queueid" "0", "whatsappid" "2", "repetir" "0", //0 = não repetir, 999 = todo dia (repetirtodo) "repetirtodo" "0", //0 = não repetir, 999 = aniversário "quantasvezes" "0" }', curlopt httpheader => array( 'content type application/json', 'authorization bearer tokenmeu' ), )); $response = curl exec($curl); curl close($curl); echo $response; { "id" 57, "body" "teste de agendamento", "sendat" "2023 12 17t22 00 00 000z", "sentat" null, "contactid" 24294, "ticketid" null, "userid" 34, "companyid" 1, "status" "pendente", "geral" false, "queueid" 0, "whatsappid" 2, "mediapath" null, "medianame" null, "repetir" 0, "repetirtodo" 0, "quantasvezes" 0, "createdat" "2023 12 17t14 34 07 751z", "updatedat" "2023 12 17t14 34 07 751z" }