API - SISTEMA | BAILEYS | OFIC...

Obter Contatos por Tag

1min
\<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{backend url}/api/contacts/findbytag', curlopt returntransfer => true, curlopt encoding => '', curlopt maxredirs => 10, curlopt timeout => 0, curlopt followlocation => true, curlopt http version => curl http version 1 1, curlopt customrequest => 'get', curlopt postfields =>'{ "tagid" "56" }', curlopt httpheader => array( 'content type application/json', 'authorization bearer seutokenaqui' ), )); $response = curl exec($curl); curl close($curl); echo $response; \[ { "id" 173, "status" "closed", "unreadmessages" 4, "lastmessage" "🙏", "protocolo" null, "typebot sessionid" null, "typebot status" null, "customa" null, "customb" null, "isgroup" false, "userid" null, "contactid" 481, "whatsappid" 2, "queueid" null, "chatbot" false, "channel" "whatsapp", "queueoptionid" null, "companyid" 1, "uuid" "09d35dac d689 4927 97e6 cebeb68338c2", "createdat" "2023 07 31t15 59 07 925z", "updatedat" "2023 12 28t01 54 44 449z", "contact" { "id" 481, "name" "nome do contato", "number" "5588999995544", "email" "", "profilepicurl" "https //pps whatsapp net/v/ " }, "queue" null, "user" null, "tags" \[ { "id" 15, "name" "privado", "color" "#00009c", "tickettag" { "ticketid" 173, "tagid" 15, "createdat" "2023 08 07t22 31 12 644z", "updatedat" "2023 08 07t22 31 12 644z" } }, { "id" 54, "name" "nome da tag", "color" "#a4cccc", "tickettag" { "ticketid" 173, "tagid" 54, "createdat" "2023 08 07t22 31 12 644z", "updatedat" "2023 08 07t22 31 12 644z" } }, { "id" 55, "name" "srv h1", "color" "#a4cccc", "tickettag" { "ticketid" 173, "tagid" 55, "createdat" "2023 08 07t22 31 12 644z", "updatedat" "2023 08 07t22 31 12 644z" } }, { "id" 56, "name" "10 conexoes", "color" "#a4cccc", "tickettag" { "ticketid" 173, "tagid" 56, "createdat" "2023 08 07t22 31 12 644z", "updatedat" "2023 08 07t22 31 12 644z" } }, { "id" 11, "name" "instalação ativa", "color" "#378044", "tickettag" { "ticketid" 173, "tagid" 11, "createdat" "2023 08 07t22 31 12 644z", "updatedat" "2023 08 07t22 31 12 644z" } } ], "whatsapp" { "name" "suporte x" } } ]