Evento
POST messenger/chat/room/patchComo receber
Configure uma URL HTTPS pública para receber este evento e responda rapidamente com status de sucesso após aceitar o payload.
Payload
- Content-Type: application/json
| Campo | Tipo | Obrigatório | Valores / Exemplo | Descrição |
|---|---|---|---|---|
| guest | string | Não | ||
| users | string | Não | ||
| prefUser | string | Não | ||
| owner | string | Não | ||
| prefUserPendAttr | boolean | Não | ||
| histUsers | string | Não | ||
| tags | string | Não | ||
| conversationDetailTags | string | Não | ||
| department | string | Não | Departamento atual da sala | |
| contact | string | Não | ||
| tl | string | Não | ||
| lastTl | string | Não | ||
| currFlow | string | Não | ||
| currFlowDtLimit | string (date-time) | Não | ||
| user | string | Não | Usuário atual atribuído a sala | |
| lead | string | Não | ||
| info | object | Não | ||
| lastEvent | string (date-time) | Não | ||
| createdAt | string (date-time) | Não | ||
| lastFromUser | boolean | Não | ||
| lastMsg | string | Não | ||
| status | string | Não | ||
| currCase | string | Não | ||
| triggers | object | Não | ||
| chSrc | number | Não | Tipo de canal: 1 - WhatsApp, 2 - Facebook, 3 - Instagram, 4 - SMS | |
| chInfo | object | Não | ||
| highlightVars | object | Não | ||
| botFlag | number | Não | ||
| srcId | string | Não | ||
| chId | string | Não | Identificador principal da sala no canal. No WhatsApp pode ser telefone ou BSUID quando chIdType = wa_user_id. | |
| chIdType | string | Não | Aceita: wa_user_id | Preenchido apenas quando chId não é o identificador legado do canal. No WhatsApp, indica sala criada somente por BSUID. |
| chUserId | string | Não | BSUID do usuário WhatsApp quando informado pela Meta. | |
| chPhone | string | Não | Telefone WhatsApp confirmado quando informado pela Meta. Preserva vínculo em salas BSUID-only. | |
| chUsername | string | Não | Username WhatsApp quando informado pela Meta. | |
| chIdPair | string | Não | Par de identidade de canal ja conciliado automaticamente. No WhatsApp: BSUID|telefone. | |
| mergeTo | string | Não | ||
| mergeAt | string (date-time) | Não | ||
| utm | object | Não | ||
| utmClick | object | Não | ||
| chIsPending | boolean | Não | Ativado se o canal estiver pendente de resposta | |
| dtIsArchived | string (date-time) | Não | ||
| dtTransfer | string (date-time) | Não | ||
| chIsArchived | boolean | Não | Ativado se o canal já foi concluído | |
| isOutbound | boolean | Não | Define se é uma sala criada para envio ativo, | |
| waCoexTaken | boolean | Não | Indica que a sala foi assumida via Coexistência (WhatsApp app) antes de qualquer usuário entrar | |
| isWaitingUser | boolean | Não | ||
| leadUserPendAttr | number | Não | ||
| contactUserPendAttr | number | Não | ||
| companyUserPendAttr | number | Não | ||
| _integration | object | Não | ||
| transmissionList | string | Não | ||
| idleRulesDisabled | boolean | Não | ||
| idleRules | object | Não |
Estruturas internas
info
{
"name": "string",
"phone": "string",
"email": "string"
}utm
{
"provider": "string",
"source": "string",
"medium": "string",
"clickId": "string",
"campaignId": "string",
"campaign": "string",
"groupId": "string",
"group": "string",
"creativeId": "string",
"creative": "string",
"content": "string",
"term": "string",
"url": "string",
"ref": "string"
}utmClick
{
"fbclid": "string",
"ctwaClid": "string",
"gclid": "string",
"gbraid": "string",
"wbraid": "string",
"ttclid": "string"
}idleRules
[
{
"rule": "string",
"idleNextAt": "string (date-time)",
"idleStep": "number"
}
]Exemplo básico recebido:
{
"guest": "valor",
"users": [
"valor"
],
"prefUser": "valor",
"owner": "valor",
"prefUserPendAttr": true,
"histUsers": [
"valor"
],
"tags": [
"valor"
],
"conversationDetailTags": [
"valor"
]
}Respostas
| Status | Descrição | Conteúdo |
|---|---|---|
| 200 | Return a 200 status to indicate that the data was received successfully |
Boas práticas
- Trate reenvios como possibilidade real.
- Valide o payload antes de executar regras de negócio.
- Registre o identificador do evento ou do registro recebido para auditoria.
