API - SISTEMA | BAILEYS | OFIC...
Atualizar Ticket
1min
\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/tickets/updateapi', 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 =>'{ "ticketid" "1067", // informe o id do ticket "status" "pending", // informe o status open, closed, pending "userid" "13", // id do usuário null ou número "queueid" "34", // id da fila null ou número "typebot sessionid" "campo livre letras e números", "customa" "campo livre letras e números", "customb" "campo livre letras e números" }', curlopt httpheader => array( 'content type application/json', 'authorization bearer tokenmeu' ), )); $response = curl exec($curl); curl close($curl); echo $response; { "id" 1067, "status" "pending", "unreadmessages" 0, "lastmessage" "", "protocolo" "1693", "typebot sessionid" "ur3209ru82094823043209rd320984230", "customa" "campo customizado 1", "customb" "campo customizado 2", "isgroup" false, "userid" null, "contactid" 9016, "whatsappid" 17, "queueid" 34, "chatbot" false, "channel" "whatsapp", "queueoptionid" null, "companyid" 1, "uuid" "34c8b52a 7fb4 4fc3 b819 08b189b6cee0", "createdat" "2023 10 29t17 55 20 292z", "updatedat" "2023 10 29t19 23 10 869z", "contact" { "id" 9016, "name" "rafael tim", "number" "555182551310", "email" "", "profilepicurl" "", "acceptaudiomessage" true, "active" true, "disablebot" false, "extrainfo" \[] }, "user" null, "queue" { "id" 34, "name" "teste perfeito", "color" "#0c797d" }, "whatsapp" { "name" "rafa ab lz", "webhook" "", "id" 17, "token" "", "coverimage" null }, "tags" \[], "company" { "id" 1, "name" "whaticket saas" } }