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

Atribuir Tags

Atribuir Tags

Atribuir Tags
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://painel.robomensageiro.com.br/api/tags/add',
  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": 383, // ID do Ticket
    "tags": [
      {
        "id": 100 // ID da TAG
      },
      {
        "id": 98 // ID da TAG
      }
    ]
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer seu-token-aqui'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Retorno com sucesso:

JSON
{
    "id": 383,
    "status": "open",
    "unreadMessages": 0,
    "lastMessage": "Após a primeira",
    "isGroup": false,
    "userId": 1,
    "contactId": 4300,
    "whatsappId": 1,
    "queueId": 1,
    "chatbot": false,
    "channel": "whatsapp",
    "queueOptionId": null,
    "companyId": 1,
    "uuid": "ea7407a7-4f55-4a8c-907e-8e8b29466bee",
    "createdAt": "2023-09-04T08:13:17.451Z",
    "updatedAt": "2023-09-14T22:12:44.180Z",
    "tags": [
        {
            "id": 56,
            "name": "10-CONEXOES",
            "color": "#A4CCCC",
            "kanban": 0,
            "prioridade": 0,
            "conversao": null,
            "companyId": 1,
            "createdAt": "2023-08-07T21:19:34.178Z",
            "updatedAt": "2023-08-07T21:19:34.178Z",
            "TicketTag": {
                "ticketId": 383,
                "tagId": 56,
                "createdAt": "2023-09-15T00:59:04.965Z",
                "updatedAt": "2023-09-15T00:59:04.965Z"
            }
        }
    ]
}
Atendimento por WhatsAppAtendimento
WhatsApp