Crie sua conta grátis e teste por 7 dias ( não precisa adicionar cartão de crédito )

Obter Contatos por Tag

Obter Contatos por Tag

Obter Contatos por Tag
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://painel.robomensageiro.com.br/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;

Retorno com sucesso:

JSON
[
    {
        "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": "5588919293544",
            "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": "Nome do Servidor",
                "color": "#A4CCCC",
                "TicketTag": {
                    "ticketId": 173,
                    "tagId": 55,
                    "createdAt": "2023-08-07T22:31:12.644Z",
                    "updatedAt": "2023-08-07T22:31:12.644Z"
                }
            },
            {
                "id": 56,
                "name": "Plano Ultimate",
                "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"
        }
    }
]
Atendimento por WhatsAppAtendimento
WhatsApp