GET
/api/v1/conversationsLista conversas visíveis ao membro da chave, por cursor e em ordem de atividade mais recente. Um membro limitado aos próprios dados só acessa suas conversas. Exige whatsapp.view_conversations. Os filtros all, unread, returned e internal consultam conversas abertas; closed consulta as fechadas.
Exemplos
A URL usa o servidor de produção. Defina PIPEFACIL_API_KEY e as variáveis de caminho (como SEQ ou ID) com os identificadores reais. Ajuste o corpo antes de executar: requisições de escrita alteram dados do workspace.
cURL
curl --request GET \
--url "https://pipefacil-server.matchsales.com.br/api/v1/conversations" \
--header "Authorization: Bearer $PIPEFACIL_API_KEY"JavaScript
const response = await fetch(`https://pipefacil-server.matchsales.com.br/api/v1/conversations`, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.PIPEFACIL_API_KEY}`,
},
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const text = await response.text();
const data = text ? JSON.parse(text) : null;Python
import os
import json
import requests
response = requests.request(
"GET",
f"https://pipefacil-server.matchsales.com.br/api/v1/conversations",
headers={"Authorization": f"Bearer {os.environ['PIPEFACIL_API_KEY']}"},
)
response.raise_for_status()
data = response.json() if response.content else NoneParâmetros
| Nome | Local | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
limit | query | integer | Não | — |
cursor | query | string | Não | Cursor opaco retornado pela página anterior. |
search | query | string | Não | Busca sem diferenciar maiúsculas e minúsculas nos campos de contato e telefone. |
filter | query | string | Não | — |
responsibleId | query | string | Não | O negócio ativo do contato pertence a este identificador de usuário. |
pipelineId | query | string | Não | O negócio ativo do contato está neste identificador de funil. |
stageId | query | string | Não | O negócio ativo do contato está neste identificador de etapa. |
source | query | string | Não | O negócio ativo do contato tem esta origem. Valor desconhecido resulta em 400. |
channelIds | query | array de string | Não | Identificadores dos canais de recebimento; repita o parâmetro ou separe por vírgulas. |
sort | query | string | Não | Ordenação por atividade. Mantenha o mesmo valor ao percorrer páginas com cursor. |
Respostas
200Sucesso
| Campo | Tipo | Descrição |
|---|---|---|
data | object | — |
data.items | array | — |
data.items[].id | string | — |
data.items[].waId | string | — |
data.items[].sendTo | string | — |
data.items[].displayName | string | — |
data.items[].phone | string | — |
data.items[].contactId | string | Aceita null. |
data.items[].channelId | string | Aceita null. |
data.items[].channelName | string | Aceita null. |
data.items[].lastMessageAt | string | Formato: date-time. Aceita null. |
data.items[].lastMessageText | string | — |
data.items[].lastMessageDirection | string | Valores: inbound, outbound. Aceita null. |
data.items[].lastInboundAt | string | Última mensagem recebida do contato, agregada entre canais. Não use este valor para concluir que a janela de 24 horas está aberta em outro canal. Formato: date-time. Aceita null. |
data.items[].unreadCount | integer | — |
data.items[].returning | boolean | — |
data.items[].internal | boolean | — |
data.items[].activeDealSeq | integer | Número sequencial do negócio aberto mais recente do contato. Aceita null. |
data.items[].responsibleUserId | string | Responsável por esse negócio ativo. Aceita null. |
data.items[].createdAt | string | Formato: date-time. |
data.items[].updatedAt | string | Formato: date-time. |
data.items[].contactInstagramId | string | Destino técnico do Instagram, no formato ig: |
data.items[].avatarUrl | string | Aceita null. |
data.items[].provider | string | Aceita null. |
data.items[].lastMessageChannelId | string | Aceita null. |
data.items[].lastMessageProvider | string | Aceita null. |
data.items[].closed | boolean | Indica se a conversa está fechada. |
data.nextCursor | string | Aceita null. |
data.hasMore | boolean | — |
Esquema OpenAPI
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConversationSummary"
}
},
"nextCursor": {
"type": "string",
"nullable": true
},
"hasMore": {
"type": "boolean"
}
}
}
}
}400Falha de validação dos campos; `fieldErrors` contém os erros.
| Campo | Tipo | Descrição |
|---|---|---|
error | string | — |
code | string | Valores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. |
requestId | string | — |
details | string | Aceita null. |
fieldErrors | array | Aceita null. |
fieldErrors[].field | string | — |
fieldErrors[].message | string | — |
Esquema OpenAPI
{
"type": "object",
"description": "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes.",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "string",
"enum": [
"BAD_REQUEST",
"VALIDATION_ERROR",
"UNAUTHORIZED",
"FORBIDDEN",
"FEATURE_DISABLED",
"NOT_FOUND",
"CONFLICT",
"QUOTA_EXCEEDED",
"UNPROCESSABLE_ENTITY",
"INTERNAL_ERROR",
"SERVICE_UNAVAILABLE"
]
},
"requestId": {
"type": "string"
},
"details": {
"type": "string",
"nullable": true
},
"fieldErrors": {
"type": "array",
"nullable": true,
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
},
"required": [
"error",
"code",
"requestId"
]
}401Chave ausente, malformada, desconhecida, revogada ou expirada, ou membro emissor inativo.
| Campo | Tipo | Descrição |
|---|---|---|
error | string | — |
code | string | Valores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. |
requestId | string | — |
details | string | Aceita null. |
fieldErrors | array | Aceita null. |
fieldErrors[].field | string | — |
fieldErrors[].message | string | — |
Esquema OpenAPI
{
"type": "object",
"description": "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes.",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "string",
"enum": [
"BAD_REQUEST",
"VALIDATION_ERROR",
"UNAUTHORIZED",
"FORBIDDEN",
"FEATURE_DISABLED",
"NOT_FOUND",
"CONFLICT",
"QUOTA_EXCEEDED",
"UNPROCESSABLE_ENTITY",
"INTERNAL_ERROR",
"SERVICE_UNAVAILABLE"
]
},
"requestId": {
"type": "string"
},
"details": {
"type": "string",
"nullable": true
},
"fieldErrors": {
"type": "array",
"nullable": true,
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
},
"required": [
"error",
"code",
"requestId"
]
}403Autenticado, mas sem acesso: falta de permissão (`FORBIDDEN`), recurso desligado no workspace (`FEATURE_DISABLED`) ou tentativa de acessar uma agenda não permitida.
| Campo | Tipo | Descrição |
|---|---|---|
error | string | — |
code | string | Valores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. |
requestId | string | — |
details | string | Aceita null. |
fieldErrors | array | Aceita null. |
fieldErrors[].field | string | — |
fieldErrors[].message | string | — |
Esquema OpenAPI
{
"type": "object",
"description": "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes.",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "string",
"enum": [
"BAD_REQUEST",
"VALIDATION_ERROR",
"UNAUTHORIZED",
"FORBIDDEN",
"FEATURE_DISABLED",
"NOT_FOUND",
"CONFLICT",
"QUOTA_EXCEEDED",
"UNPROCESSABLE_ENTITY",
"INTERNAL_ERROR",
"SERVICE_UNAVAILABLE"
]
},
"requestId": {
"type": "string"
},
"details": {
"type": "string",
"nullable": true
},
"fieldErrors": {
"type": "array",
"nullable": true,
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
},
"required": [
"error",
"code",
"requestId"
]
}429Limite de requisições excedido por workspace ou IP.
| Campo | Tipo | Descrição |
|---|---|---|
error | string | — |
code | string | Valores: BAD_REQUEST, VALIDATION_ERROR, UNAUTHORIZED, FORBIDDEN, FEATURE_DISABLED, NOT_FOUND, CONFLICT, QUOTA_EXCEEDED, UNPROCESSABLE_ENTITY, INTERNAL_ERROR, SERVICE_UNAVAILABLE. |
requestId | string | — |
details | string | Aceita null. |
fieldErrors | array | Aceita null. |
fieldErrors[].field | string | — |
fieldErrors[].message | string | — |
Esquema OpenAPI
{
"type": "object",
"description": "Formato padrão de erro. `details` e `fieldErrors` são omitidos quando ausentes.",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "string",
"enum": [
"BAD_REQUEST",
"VALIDATION_ERROR",
"UNAUTHORIZED",
"FORBIDDEN",
"FEATURE_DISABLED",
"NOT_FOUND",
"CONFLICT",
"QUOTA_EXCEEDED",
"UNPROCESSABLE_ENTITY",
"INTERNAL_ERROR",
"SERVICE_UNAVAILABLE"
]
},
"requestId": {
"type": "string"
},
"details": {
"type": "string",
"nullable": true
},
"fieldErrors": {
"type": "array",
"nullable": true,
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
},
"required": [
"error",
"code",
"requestId"
]
}