Skip to main content

Mensagens de retorno

Todas as mensagens da API são retornadas no formato JSON e são devolvidas através da URL de PostBack cadastrada.

Mensagem de Texto / genérica

{
"Type": "receveid_message",
"Body": {
"Info": {
"Id": "2491C431F00FFA4537650B76C02320E0",
"RemoteJid": "5518987654321@s.whatsapp.net",
"SenderJid": "",
"FromMe": true,
"Timestamp": 1633522075,
"messageTimestampTiks": 637691080750000000,
"Status": 4,
"QuotedMessageID": "",
"Fowarded": 0,
"Source": {
"key": {
"remoteJid": "5518987654321@s.whatsapp.net",
"fromMe": true,
"id": "2491C431F00FFA4537650B76C02320E0"
},
"message": {
"conversation": "Bom dia! Tudo bem?"
},
"messageTimestamp": 1633522075,
"status": 4,
"participant": "5518987654321@s.whatsapp.net"
}
},
"Text": "Bom dia! Tudo bem?"
}
}

Mensagem de Imagem

{
"Type": "receveid_image_message",
"Body": {
"Info": {
"Id": "8F1F5D6F264DBE4FDECCA9E3F72B91C9",
"RemoteJid": "5515987654321@s.whatsapp.net",
"SenderJid": "5515987654321@s.whatsapp.net",
"FromMe": false,
"Timestamp": 1633713740,
"messageTimestampTiks": 637692997407746369,
"Status": 0,
"QuotedMessageID": "",
"Fowarded": 0,
"Source": {
"key": {
"remoteJid": "5515987654321@s.whatsapp.net",
"fromMe": false,
"id": "8F1F5D6F264DBE4FDECCA9E3F72B91C9"
},
"message": {
"imageMessage": {
"mimetype": "image/jpeg",
"fileSha256": "i6SX7foVRQPWM32zvdaUiguL1p7/djBM1poj61hMjVg=",
"directPath": "/v/t62.7118-24/31508933_1055887365229537_2817441006624259435_n.enc?ccb=11-4&oh=f0fc235a72f4d7ce30f0b82cb02d0731&oe=618795F2",
"url": "https://api.witi.me/static/2/9/b/29bz3954-01bf-4af0-xa23-61a58a042d56/media/8f1f5d6f264dbe4fdecca9e3f72b91c9.jpeg",
"mediaKey": "A707qFD6+6xhamYyc9gpjiUod0nylmn68cWrhyRbIug=",
"height": 1600,
"width": 900,
"fileEncSha256": "P4o/+udskgNeMVhnpVN8CPfQSSmUE2vrFq6a2oZHroc=",
"caption": null,
"mediaKeyTimestamp": "1633713721",
"fileLength": "107605",
"jpegThumbnail": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEABsbGxscGx4hIR4qLSgtKj04...",
"urlThumbnail": null,
"contextInfo": null
}
},
"messageTimestamp": 1633713740,
"status": 0,
"participant": "5515987654321@s.whatsapp.net"
}
},
"caption": null
},
"Url": ""
}

Mensagen de Áudio

{
"Type": "receveid_audio_message",
"Body": {
"Info": {
"Id": "C0AE5B25DE0C2F49D75B55044D7D9511",
"RemoteJid": "5581987654321@s.whatsapp.net",
"SenderJid": "5581987654321@s.whatsapp.net",
"FromMe": false,
"Timestamp": 1633714116,
"messageTimestampTiks": 637693001172640383,
"Status": 0,
"QuotedMessageID": "",
"Fowarded": 0,
"Source": {
"key": {
"remoteJid": "5581987654321@s.whatsapp.net",
"fromMe": false,
"id": "C0AE5B25DE0C2F49D75B55044D7D9511"
},
"message": {
"audioMessage": {
"mimetype": "audio/ogg; codecs=opus",
"fileSha256": "xJMNkg9FOMY3IO6Di4aejwkEgPbl+Om/5TDKbaIeOHg=",
"directPath": "/v/t62.7117-24/35380297_1004123160366522_2783464767640737736_n.enc?ccb=11-4&oh=e97099dc0793034ed517526b8b5821f4&oe=61859C0B",
"url": "https://api.witi.me/static/2/9/b/23bd3954-01bf-4af0-xa42-61a58a042d56/media/c0ae5b25de0c2f49d75b55044d7d9511.ogg",
"mediaKey": "7HdMc6xzTjiolMc0SB0JRuBZvOZ7DHcBXJPchioeSpY=",
"seconds": 2,
"fileEncSha256": "z7YRbXHDLIfe6s8/kiaG2+Sl+i+/qA00NcBmRin1j9g=",
"mediaKeyTimestamp": "1633714115",
"ptt": true,
"fileLength": "4876",
"contextInfo": null
}
},
"messageTimestamp": 1633714116,
"status": 0,
"participant": "5581987654321@s.whatsapp.net"
}
},
"Length": 2,
"Type": "audio/ogg; codecs=opus",
"Content": null
}
}

Mensagem de Documento

{
"Type": "receveid_document_message",
"Body": {
"Info": {
"Id": "9604C79896C6B4A065F0034DB61A60E0",
"RemoteJid": "5511987654321@s.whatsapp.net",
"SenderJid": "",
"FromMe": true,
"Timestamp": 1633543137,
"messageTimestampTiks": 637691291370000000,
"Status": 3,
"QuotedMessageID": "",
"Fowarded": 0,
"Source": {
"key": {
"remoteJid": "5511987654321@s.whatsapp.net",
"fromMe": true,
"id": "9604C79896C6B4A065F0034DB61A60E0"
},
"message": {
"documentMessage": {
"mimetype": "video/mp4",
"fileSha256": "6G/9BHaJw8SxMhstx2DiAineg/bUc+mb1/UkxX+C/Is=",
"directPath": null,
"pageCount": 0,
"url": "https://api.witi.me/static/2/9/b/29bd3954-02bf-4af0-xz32-61a58a042d56/media/9604c79896c6b4a065f0034db61a60e0.mp4",
"mediaKey": "Sp059PeqC5U4VN6QG4EqHbSObB27PhRyBryzLrddxrY=",
"title": "d6c395c8-9c8e-4273-aa72-c3000911451b.mp4",
"fileName": "d6c395c8-9c8e-4273-aa72-c3000911451b.mp4",
"fileEncSha256": "iEY6VSXiO7tgj+vzTaIFVEnlOC5C9iDszQ9bC8emvcI=",
"mediaKeyTimestamp": null,
"fileLength": "13436457",
"contextInfo": null
}
},
"messageTimestamp": 1633543137,
"status": 3,
"participant": "5511987654321@s.whatsapp.net"
}
},
"Title": "d6c395c8-9c8e-4273-aa72-c3000911451b.mp4",
"PageCount": 0,
"Type": "video/mp4",
"FileName": "d6c395c8-9c8e-4273-aa72-c3000911451b.mp4",
"Thumbnail": null,
"Content": null
}
}

Mensagem de Vídeo

{
"Type": "receveid_video_message",
"Body": {
"Info": {
"Id": "728F6EF24528B7CC5409F7041BD2E3F8",
"RemoteJid": "5511987654321@s.whatsapp.net",
"SenderJid": "5511987654321@s.whatsapp.net",
"FromMe": false,
"Timestamp": 1633617658,
"messageTimestampTiks": 637692036580000000,
"Status": 0,
"QuotedMessageID": "",
"Fowarded": 0,
"Source": {
"key": {
"remoteJid": "5511987654321@s.whatsapp.net",
"fromMe": false,
"id": "728F6EF24528B7CC5409F7041BD2E3F8"
},
"message": {
"videoMessage": {
"mimetype": "video/mp4",
"fileSha256": "CT/0aMFOcauZn2n1NDRCcuf6IsL6Pg/QaqVS3pq9yxM=",
"directPath": "/v/t62.7161-24/20100523_234944715284065_926711423300376281_n.enc?ccb=11-4&oh=3bf98146091aec52aeaf316a98f55177&oe=6185C14A",
"url": "https://api.witi.me/static/2/9/b/29zd3934-01bf-4af0-xz13-61a58a042d56/media/728f6ef24528b7cc5409f7041bd2e3f8.mp4",
"mediaKey": "Dfotxqc8ylFLjSMZmpTJtGCKnt5DbV8l3he1Nf0tK0s=",
"seconds": 47,
"height": 640,
"width": 320,
"fileEncSha256": "whpqXpIQYHahQwfalFqdE/Mtmu4kwkGEjO9cvRuf4+k=",
"mediaKeyTimestamp": "1633617649",
"fileLength": "8820734",
"jpegThumbnail": "/9j/4AAQSkZJRgABAQAAA...",
"urlThumbnail": null,
"caption": "Autorizo a ver e analisar esse vídeo'.",
"contextInfo": null
}
},
"messageTimestamp": 1633617658,
"status": 0,
"participant": "5511987654321@s.whatsapp.net"
}
},
"Caption": "Autorizo a ver e analisar esse vídeo.",
"Thumbnail": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEABsbGxscGx4hIR4qLSgtKj04MzM4PV1CR0JHQl2N....",
"Length": 47,
"Type": "video/mp4",
"Content": null,
"GifPlayback": false
},
"Caption": "Autorizo a ver e analisar esse vídeo.",
"Url": ""
}

Mensagem Removida

{
"Type": "deleted_message",
"messageTimestampTiks": 637692999177696718,
"key": {
"remoteJid": "55159876543210@s.whatsapp.net",
"fromMe": false,
"id": "0228C64AF564D6766441BCF59E27F700"
}
}

Status da Mensagem

O status da mensagem de acordo com o WhatsAPP, vai de -1 (relógio de aguardando envio) até 4 (lido - setas duplas)

Mensagem Única (ACK):

{
"from": "5511987654321@s.whatsapp.net",
"ack": 2,
"cmd": "ack",
"to": "55248765432100@s.whatsapp.net",
"t": 1633713746,
"id": "67FB00BEA425EFE6F656ED63876ACD26"
}

Várias Mensagens (ACKS):

{
"from": "5511987654321@s.whatsapp.net",
"ack": 3,
"cmd": "acks",
"to": "5511987654321@s.whatsapp.net",
"t": 1633714064,
"id": ["6302D2A053C035E37FF2C9BB4A45297A", "F977A705C6813F4A0D59D84E93663B69", "DC41349235B3D7D64693B15F27EBCBD7", "E26EED891E6F741EA7BE338441759183", "22F368032ECC7D2C6F6AA4EC80B99F82", "E54DDDBC56E18D7B5F1C8C7EF18204CD"]
}

Novos Perfis

{
"Type": "profile",
"Body": {
"Name": "Anderson/jeff",
"UrlPicture": "https://api.witi.me/static/2/9/b/29323954-01bf-4af0-ac11-aaa58a042d56/profile/5511987654321.jpeg?h=637692771740086301",
"WebId": "5511987654321@s.whatsapp.net",
"Lead_webid": "",
"Segmento": "",
"SegmentoWebId": "",
"Email": "",
"Telefone": "(11) 98765-4321",
"TotalMessages": 6,
"Situacao": 0,
"LockedTo": "Jefferson Vitor",
"CanBeUnlocked": true,
"isGroup": false,
"UrlInfo": "",
"LeadInfo": "{\"Campos\":{\"DATA NASCIMENTO\":\"01/01/0001\",\"LOGRADOURO\":\"\",\"BAIRRO\":\"\",\"ID_LEAD\":\"\",\"ESTADO_CIVIL\":\"\",\"END_NUMERO\":\"\",\"NUMERO_PEDIDO\":\"\",\"CODIGO_CLIENTE\":\"\",\"RAZAO_SOCIAL\":\"\",\"CNPJ\":\"\"},\"Id\":0,\"Lead_documento\":\"000.000.000-00\",\"Preco_atual\":0.0,\"Valor_conversao\":0.0,\"FK_Valor_Lead_do_cliente\":0.0,\"FK_Regiao_busca_valor_lead_propaganda\":0.0,\"FK_Cliente_Id_regiao\":0,\"Data_cadastro\":\"2021-10-08T17:26:26Z\",\"Data_disponivel\":\"0001-01-01T02:00:00Z\",\"Data_venda\":\"0001-01-01T02:00:00Z\",\"Id_campanha\":0,\"Id_campanha_lead\":0,\"Id_hotsite\":0,\"Id_parceiro_fatura\":0,\"Id_pessoa_izdata\":11806126,\"Id_usuario_izmkt\":0,\"Lead_estado\":\"\",\"Lead_cidade\":\"\",\"Lead_cep\":\"\",\"Lead_email\":\"\",\"Lead_nome\":\"anderson/jeff\",\"Lead_id_cidade\":0,\"Lead_telefone\":\"(67) 99991-0844\",\"Lead_valido\":false,\"Id_arte\":0,\"Id_parceiro\":0,\"Parceiro_valor_custo\":0.0,\"Web_data\":0,\"Id_segmento\":0,\"Data_validacao\":\"0001-01-01T02:00:00Z\"}",
"IdLead": 0,
"IdProfile": 2343891,
"Documento": "",
"Observacao": "",
"Departamento": "",
"IdDepartamento": 0,
"Prioridade": 0,
"Grupo": "",
"CSS": "",
"Arquivos": [],
"LastStatusDateTime": "2021-10-08T17:26:00Z",
"DataUltimaMensagem": "2021-10-08T17:26:22.83Z",
"UltimaMensagem": {
"UniqueID": "95fd85b6-c156-4460-9c24-6e0fcbdfe25e",
"DataHora": "2021-10-08T17:26:22.83Z",
"ChatName": "5511987654321@s.whatsapp.net",
"FromName": "",
"ToName": "5511987654321@s.whatsapp.net",
"Text": "novo atendimento no 2021.10.08.10172",
"TypeMessage": "historico",
"Status": 99,
"IdOperador": 0,
"IdDepartamento": 0,
"NomeOperador": "",
"Departamento": "",
"Ignore": false,
"Encaminhada": false,
"Deleted": false
},
"LastMessageId": "95fd85b6-c156-4460-9c24-6e0fcbdfe25e",
"DataSubscribe": "0001-01-01T02:00:00Z",
"Finalizacao_data": "2021-10-08T17:26:29.833Z",
"Finalizacao_motivo": "",
"AtendimentoTicket": "2021.10.08.10172",
"AtendimentoId": 27349,
"UnreadMessages": 1,
"LockedToId": 5499
}
}

Atualização de Perfil

Após realizar a leitura do qrCode, chegará atualizações dos perfis (mais de um profile):

["Profiles", [
{
"jid": "5511123456789@s.whatsapp.net",
"notify": "",
"verify": "2",
"vname": "Facebook Business",
"short": "",
"name": "",
"picture": "https://api.witi.me/static/2/9/b/29ad3934-01bf-4af0-ac11-62a58a042d56/profile/447710173736.jpeg?h=637668128272839905",
"Lastupdate": "2021-09-10T15:41:56.8551719Z",
"LastMessageTime": 1630066137,
"biz": false,
"status": 200,
"tag": "",
"Count": 0,
"Mute": false,
"Spam": false,
"Archive": false,
"isGroup": false
}, {
"jid": "5511987654321@s.whatsapp.net",
"notify": "",
"verify": "",
"vname": "",
"short": "",
"name": "",
"picture": "https://api.witi.me/get_picture.aspx?wid=29ad3934-01bf-4af0-ac11-62a58a042d56&jid=5511094359591&h=637692998207411463",
"Lastupdate": "2021-10-07T13:36:00.2834803Z",
"LastMessageTime": 1630511134,
"biz": false,
"status": 404,
"tag": "",
"Count": 0,
"Mute": false,
"Spam": false,
"Archive": false,
"isGroup": false
},
...
]]

Ou de um único perfil:

["Profile",
{
"jid": "5511123456789@s.whatsapp.net",
"notify": "",
"verify": "2",
"vname": "Facebook Business",
"short": "",
"name": "",
"picture": "https://api.witi.me/static/2/9/b/29ad3934-01bf-4af0-ac11-62a58a042d56/profile/447710173736.jpeg?h=637668128272839905",
"Lastupdate": "2021-09-10T15:41:56.8551719Z",
"LastMessageTime": 1630066137,
"biz": false,
"status": 200,
"tag": "",
"Count": 0,
"Mute": false,
"Spam": false,
"Archive": false,
"isGroup": false
},
]

Status do Perfil

Perfil disponível (online) ou indisponível:

{
"type": "available", // ou "unavailable"
"t": 0,
"deny": "false",
"id": "5511987654321@s.whatsapp.net",
"chat": "5511987654321@s.whatsapp.net"
}

Perfil está digitando:

{
"type": "composing",
"t": 0,
"id": "5511987654321@s.whatsapp.net",
"chat": "5511987654321@s.whatsapp.net"
}

Contato Recebido

{
"Type": "receveid_contact",
"Body": {
"Info": {
"Id": "DE7A1D8D42378BB7EBBDA4CC6EFEEAB1",
"RemoteJid": "556199876543@s.whatsapp.net",
"SenderJid": "556199876543@s.whatsapp.net",
"FromMe": false,
"Timestamp": 1633127701,
"messageTimestampTiks": 637687137010000000,
"Status": 0,
"QuotedMessageID": "",
"Fowarded": 0,
"Source": {
"key": {
"remoteJid": "556199876543@s.whatsapp.net",
"fromMe": false,
"id": "DE7A1D8D42378BB7EBBDA4CC6EFEEAB1"
},
"messageTimestamp": 1633127701,
"status": 0,
"participant": "556199876543@s.whatsapp.net"
}
},
"contact": {
"displayName": "Janice",
"vcard": "BEGIN:VCARDnVERSION:3.0nN:;Janice;;;nFN:Janicenitem1.TEL;waid=556199988877:+55 61 9998-8877.X-ABLabel:CelularnEND:VCARD",
"UrlThumb": null,
"PushName": null,
"Jid": "556199988877@s.whatsapp.net"
}
}
}

Blocklist

Lista de números bloqueados

    {
"blocklist": [
"5511987654321@s.whatsapp.net",
"5519987654321@s.whatsapp.net",
...
]
}

QRCode

{
"qr": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZ...",
"status": 1,
"error": "",
"ttl": 20
}

Status da Conexão

Atualização das informações da conexão atual e do aparelho (após leitura do qrCode).

["ConnStatus", {
"status": 4,
"statusString": "Starting",
"connected": true,
"ConnectionInfo": {
"lg": "pt",
"lc": "BR",
"phone": {
"device_model": "ali",
"wa_version": "2.21.19.21",
"mcc": "724",
"os_version": "9",
"os_build_number": "PPSS29.55-37-7-10",
"device_manufacturer": "motorola",
"mnc": "016"
},
"battery": 58,
"tos": 0,
"pushname": "vini",
"protoVersion": [0, 17],
"plugged": false,
"platform": "android",
"wid": "5511987654321@s.whatsapp.net",
"connected": true,
"isResponse": "false",
"binVersion": 11,
"locales": "pt-BR"
},
"WebID": "c33325bf9-73bd-48d0-e6ed-06fd87a12c03",
"Webhook": "https://witi.me:443/api/whatsapp/iz/events.aspx?wid=c33325bf9-73bd-48d0-e6ed-06fd87a12c03",
"UserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36",
"CanRestoreConnection": false,
"IdleTime": 0,
"MaxIdleTime": 60,
"LastLoginTime": "0001-01-01T02:00:00Z",
"ApiVersion": "v11 BULK",
"PhoneConectado": true,
"PhoneConectadoLastTime": "2021-10-11T17:45:39.5296652Z",
"MessageCount": 0,
"stats": {
"Contacts": 0,
"Chats": 0,
"SentBytes": 303,
"ReceveidBytes": 6635
},
"storage": {
"Name": "c33325bf9-73bd-48d0-e6ed-06fd87a12c03",
"Bytes": 9282530,
"Files": 103,
"Subs": [{
"Name": "media",
"Bytes": 5945440,
"Files": 24
}, {
"Name": "profile",
"Bytes": 2008199,
"Files": 56
}, {
"Name": "thumb",
"Bytes": 217389,
"Files": 22
}]
}
}]

Conexão Inativa

Quando não há atividade na conexão.

["Stream","asleep"]