Pular para o conteúdo

GET /v1/conversations

GET
/v1/conversations
curl --request GET \
--url 'https://seu-endereco-da-api/v1/conversations?status=pending&unread=1&kind=person&windowState=open&window=expiring&priorities=today&aiGoal=active&order=newest' \
--header 'Authorization: Bearer <token>'

Permissão que a Chave de acesso precisa: Ler conversas (conversations:read).

conversationId
string format: uuid
status
string
Allowed values: pending open snoozed resolved
contactId
string format: uuid
departmentId
string format: uuid
assignee
string
channelId
string format: uuid
unread
string
Allowed values: 1 true
adSourceId
string
<= 200 characters
tagId
string format: uuid
originId
string format: uuid
kind
string
Allowed values: person group
windowState
string
Allowed values: open closed
lastMessageFrom
string
lastMessageTo
string
window
string
Allowed values: expiring
priorities
string
Allowed values: today
aiGoal
string
Allowed values: active conducting paused completed returned
badge
Array<string>
q
string
<= 200 characters
order
string
Allowed values: newest oldest
cursor
string
limit
string
Media typeapplication/json
object
items
required
Array<object>
object
id
required
string
contactId
required
string
channelId
required
string
status
required
string
departmentId
required
string
nullable
assigneeId
required
string
nullable
lastMessageAt
required
string format: date-time
nullable
lastMessagePreview
required
string
nullable
lastMessageSenderName
required

Who spoke inside the group, for the last message; null on a person conversation and on what the team sent

string
nullable
lastMessageDirection
required

Who sent the last message; null without a message, on a deleted one or on one with no direction

string
nullable
Allowed values: inbound outbound
lastMessageStatus
required

Delivery status of the last message; only filled when the team sent it

string
nullable
unreadCount
required

Mensagens recebidas desde a ultima leitura de quem pede, contadas ate 100

number
waitingSince
required
string format: date-time
nullable
windowExpiresAt
required
string format: date-time
nullable
window
required
object
kind
required

‘none’ when the channel has no session window

string
Allowed values: none open closed
expiresAt
required
string format: date-time
nullable
minutesLeft
required
number
nullable
requiresTemplateToOpen
required

Whether this channel needs an approved template to reopen a closed window

boolean
channel
required
object
name
required

O nome que o cliente deu ao canal na plataforma

string
provider
required
string
status
required
string
coexistence
required
boolean
phoneNumber
required

O numero ou @ da conta no provedor

string
nullable
accountName
required

O nome da conta no provedor: o verificado da Meta, ou o do aparelho no canal lite

string
nullable
removed
required

O canal foi apagado; a conversa continua descrevendo por onde ela aconteceu

boolean
botActive
required
boolean
contaminatedAt
required

Set when an unmerge left this thread with messages from two people

string format: date-time
nullable
revision
required

Sobe a cada escrita na conversa; evento com revisao menor ou igual a esta ja esta contido neste estado

number
contact
required
object
id
required

Null on a group, which is not a contact

string
nullable
name
required
string
phoneNumber
required
string
nullable
kind
required

‘person’ for a 1:1 contact, ‘group’ for a WhatsApp group

string
profilePicUrl
required

Presigned url for the contact’s whatsapp profile photo

string
nullable
blocked
required

True while the contact is blocked: inbound is stored silently and replies are refused

boolean
badges
required

Os campos de contato que o dono escolheu como selo, so os que quem chama ve e que nao sao sensiveis; vazio sem valor

Array<object>
object
key
required
string
label
required
string
value
required

O valor formatado; null num campo sim/nao marcado, que mostra so o rotulo

string
nullable
aiGoal
required

The AI goal the inbox shows: conducting, paused, or completed/returned until someone acknowledges

object
id
required
string format: uuid
state
required
string
Allowed values: conducting paused completed returned
kind
required
string
Allowed values: agendar fechar_venda cobrar recuperar_carrinho coletar_dados livre
returnReason
required
string
nullable
Allowed values: fora_do_limite pediu_pessoa nao_soube sumiu limite_mensagens_prazo reclamacao
agentName
required
string
nextCursor
required
string
nullable
snapshot
required

A foto do banco em que a resposta foi lida: um evento ja esta contido nela quando seu txid e menor que xmin, ou menor que xmax e fora de xip

object
xmin
required

Toda transacao abaixo deste numero ja esta na leitura

number
xmax
required

Nenhuma transacao deste numero em diante esta na leitura

number
xip
required

Transacoes entre xmin e xmax que ainda estavam abertas e por isso ficaram fora

Array<number>

Example

{
"items": [
{
"lastMessageDirection": "inbound",
"window": {
"kind": "none"
},
"aiGoal": {
"state": "conducting",
"kind": "agendar",
"returnReason": "fora_do_limite"
}
}
]
}