Skip to main content

Set Messages Data

EVENT 

https://call.domain.comwebhook

This endpoint accepts a batch of messages from the connected WhatsApp account. It's primarily used to sync and upload a collection of messages to ensure the system has the latest data.

Request

Header Parameters

    x-businessId stringrequired

    Identificador do negócio

    x-instanceId stringrequired

    Identificador da instanceia

    x-whatsappId stringrequired

    Identificador do whatsapp conectado

Body

    instance object
    instanceId string
    name string
    state string

    Possible values: [active, inactive]

    connection string

    Possible values: [refused, close, open]

    createdAt date-time
    WhatsApp object
    whatsappId string
    remoteJid string
    pictureUrl string
    pushName string
    createdAt date-time
    Business object
    businessId string
    name string
    data object[]
  • Array [
  • messageId string
    keyId string
    keyRemoteJid string
    keyParticipant string
    pushName string
    contentType string
    content object
    property name* object
    source string

    Possible values: [ios, android, web, api]

    messageTimestamp int32
    createdAt date-time
  • ]
  • event string

    Possible values: [messages.set]

Responses

The API successfully processed the batch of messages and returned a status of 200, confirming successful receipt and synchronization.

curl -L -X GET 'https://call.domain.com' \
-H 'Content-Type: application/json'
Request Collapse all
Base URL
https://call.domain.com
Parameters
— headerrequired
— headerrequired
— headerrequired
Body
{
"event": "messages.set",
"instance": {
"instanceId": "string",
"name": "string",
"state": "active",
"connection": "refused",
"createdAt": "2024-04-14T14:11:06.474Z",
"WhatsApp": {
"whatsappId": "string",
"remoteJid": "string",
"pictureUrl": "string",
"pushName": "string",
"createdAt": "2024-04-14T14:11:06.474Z"
},
"Business": {
"businessId": "string",
"name": "string"
}
},
"data": [
{
"messageId": "string",
"keyId": "string",
"keyRemoteJid": "string",
"keyParticipant": "string",
"pushName": "string",
"contentType": "string",
"content": {},
"source": "ios",
"messageTimestamp": 0,
"createdAt": "2024-04-14T14:11:06.474Z"
}
]
}