Conversas

Buscar conversas

Changed on

**Para buscas de todas conversas para BI utilize filtro de data para busca apenas das conversas recentes.

get/api/v1/conversations

Request

  • Base URL
    https://api.g1.datacrazy.io
  • URL
    https://api.g1.datacrazy.io/api/v1/conversations
  • Auth
    HTTP bearer

Query parameters

skipnumber

Máximo 10000. Acima disso a resposta vem vazia com details indicando o limite; use filtros de data para paginar registros mais antigos.

takenumber
searchstring
status'unstarted' | 'waiting' | 'opened' | 'automation' | 'finished' | 'error'
    Filtro pelo status do chat.

    Valores possíveis:
    - unstarted  → Chat sem atendimento iniciado
    - waiting    → Chat com atendimento iniciado e última mensagem é do cliente
    - opened     → Chat com atendimento iniciado
    - automation → Última mensagem via automação
    - finished   → Chat finalizado
    - error      → Chat com erro
    
departmentsstring

ID ou Lista de IDs de departamentos.

Este campo aceita um único ou uma lista de IDs separados por vírgula

instancesstring

ID ou Lista de IDs de instâncias.

Este campo aceita um único ou uma lista de IDs separados por vírgula

tagsstring

ID ou lista de IDs de tags.

Este campo aceita um ID ou uma lista de IDs de tags separados por vírgula

stagesstring

ID do stage.

Este campo aceita um únido ID, referente a um estágio de pipeline

attendantsstring

ID ou Lista de IDs de atendentes.

Este campo aceita um único ou uma lista de IDs separados por vírgula

openWindow'last24h' | 'all'

Filtro de janela em aberto.

Valores aceitos: 'last24h' (mensagens recebidas nas últimas 24 horas) ou 'all' (todas as conversas)

{
  "status": "opened",
  "departments": "e3581d38-aeab-483a-8275-de32dce2388a",
  "instances": "682f0a3823f2d4e36a2150c0,6808667d911e4c8975bc5405",
  "tags": "849fefab-e697-4720-9303-e788c23790cc,9e008d34-86d2-49fd-90af-34a9f9b29896",
  "stages": "849fefab-e697-4720-9303-e788c23790cc,9e008d34-86d2-49fd-90af-34a9f9b29896",
  "attendants": "849fefab-e697-4720-9303-e788c23790cc,9e008d34-86d2-49fd-90af-34a9f9b29896",
  "openWindow": "last24h"
}

Response

countnumber required

Example response

{
  "count": 100,
  "data": [
    {
      "id": "6808cd89c9968a7b8a41b9f7",
      "createdAt": "2025-04-23T11:22:49.143Z",
      "updatedAt": "2025-06-24T16:28:23.722Z",
      "deletedAt": "2025-12-24T16:31:59.531Z",
      "archivedAt": "2025-12-24T16:31:59.531Z",
      "name": "Patrick Almeida",
      "description": "Cliente solicitou contato para o mês de novembro",
      "imageURL": "https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/df4db2b8-7f0f-44d4-88e1-dd3e838f275e",
      "isGroup": true,
      "automationEnabled": true,
      "contact": {
        "id": "6808cd89c9968a7b8a41b9f7",
        "createdAt": "2024-12-19T14:21:42.164Z",
        "updatedAt": "2025-06-24T16:28:23.703Z",
        "name": "Angelica Schramm",
        "imageURL": "https://dc-qqqq2222pb.s3.amazonaws.com/0a7ac87c-2f50-46b5-9c39-80ffec53e633/df4db2b8-7f0f-44d4-88e1-dd3e838f275e",
        "contactId": "5547988367066",
        "platform": "WHATSAPP",
        "externalId": "1c3627f8-d6b9-42a9-b355-6977c04c969e",
        "accountName": "@AngelicaSchramm",
        "pending": true,
        "externalInfo": {
          "tagIds": [
            "849fefab-e697-4720-9303-e788c23790cc",
            "9e008d34-86d2-49fd-90af-34a9f9b29896"
          ],
          "stageIds": [
            "6fda2a0d-5e7c-4c51-bf47-2c60f7d34283",
            "2bc3d979-93a4-4e64-8903-5d9379d3de91"
          ],
          "pipelineIds": [
            "3e409b29-0462-40b0-aef4-5eb6f0f2f89a",
            "74c8e833-f681-4ed0-9ce6-e474e2d4b1a0"
          ]
        }
      },
      "instance": {
        "id": "507f1f77bcf86cd799439011",
        "name": "Instância atendimentos suporte",
        "createdAt": "2024-04-11T12:00:00.000Z",
        "updatedAt": "2024-04-11T14:30:00.000Z",
        "migratedAt": "2024-04-11T14:30:00.000Z",
        "isActiveChangedAt": "2024-04-11T14:30:00.000Z",
        "platform": "WHATSAPP",
        "provider": "WHATSAPP_CLOUD_API",
        "engine": "WHATSAPP_CLOUD_API_19",
        "config": {
          "endAutomationInterval": 15,
          "endTypingInterval": 1,
          "evolutionApiUrl": "https://evolution-evolution2.mcmoxg.easypanel.host",
          "evolutionInstanceId": "Instancia suporte",
          "evolutionInstanceToken": "78523FD522AA-97KD-8C0F-8138D5A84671",
          "listenGroups": false,
          "typeList": "buttons",
          "startAutomationInterval": 3,
          "startTypingInterval": 0,
          "typingInterval": false
        },
        "isActive": true,
        "webhook": "/webhooks/z-api/d129a692-e5ab-42b3-b0e4-90ad9a12b068/68597f2a95fb0298e5c128b5",
        "status": "CONNECTED",
        "errorCode": "429",
        "errorMessage": "Não foi possível se conectar com o provedor",
        "deletedAt": "2025-11-07T22:05:15.754Z"
      },
      "attendants": [
        {
          "id": "67632a6713d401dff6bf8672"
        }
      ],
      "lastMessageDate": "2025-06-23T21:18:59.068Z",
      "lastReceivedMessageDate": "2025-06-23T21:18:59.068Z",
      "lastSendedMessageDate": "2025-11-22T21:20:15.733Z",
      "currentDepartment": {
        "id": "6804203784ea2133a1e25bd0",
        "tenantId": "d9bd689a-bb7e-4552-b7f6-c7f7b8b73b2b",
        "createdAt": "2025-04-19T22:14:15.964Z",
        "name": "Pós-vendas",
        "color": "#FF2200",
        "main": true,
        "updatedAt": "2025-04-19T22:14:15.998Z"
      },
      "currentThread": {
        "id": "ID da thread",
        "code": 115,
        "startedAt": "2025-06-23T21:18:59.042Z",
        "finishedAt": "2025-12-28T21:12:59.0631Z",
        "conversationId": "ID da conversation",
        "department": {
          "id": "6804203784ea2133a1e25bd0",
          "tenantId": "d9bd689a-bb7e-4552-b7f6-c7f7b8b73b2b",
          "createdAt": "2025-04-19T22:14:15.964Z",
          "name": "Pós-vendas",
          "color": "#FF2200",
          "main": true,
          "updatedAt": "2025-04-19T22:14:15.998Z"
        }
      },
      "finished": true,
      "sourceReferral": {
        "sourceId": "2bc3d979-93a4-4e64-8903-5d9379d3de91",
        "sourceUrl": "https://example.com/artigo-de-origem",
        "ctwaId": "849fefab-e697-4720-9303-e788c23790cc"
      },
      "lastMessageIsAutomation": true
    }
  ]
}

Changes

    • info

      added the optional property //////// to the response with the status

    • info

      added the optional property //////// to the response with the status