Conversations webhooks
Here you will find the list of all the Conversation events you can track, along with their schema and parameters.
Conversation started
Event is triggered when a conversation is started by a visitor or an agent (automatic targeted messages and pushed messages won’t trigger the event).
| Attribute name | Data type | Description |
|---|---|---|
eventName | string | ”conversationStarted” |
conversationId | string | ID of the continuous conversation with one visitor. |
message | Message | Initial message |
agent | Agent | Agent information |
visitor | Visitor | Visitor information: - country, language, browser, etc. - contact attributes - info from contact form or JS API - info from channel (i.e. Facebook profile) - terms of service and marketing consents - and more! |
conversationStartPage | Object | For the chat widget, will contain the link and title of your website at the time the conversation was started. |
isNoAvailableAgent | Boolean | Shows if no agent is online at this point |
1 { 2 "eventName": "conversationStarted", 3 "conversationId": "MxhGJAEugdLtS2BBq", 4 5 "conversationStartPage": { 6 "link": "https://getwear.com/women/151254/", 7 "title": "Washed skinny jeans for women" 8 } 9 10 // initial message (see “The Message object” below) 11 // /guides/conversations/conversations-webhooks#the-message-object 12 "message": { 13 "id": "dkmyYPxJyh5rKDhRT", 14 // `type` can be `agent` or `visitor` 15 "type": "agent", 16 "text": "Hi there! Did you receive your tracking number?", 17 "html": "Hi there! Did you receive your tracking number?", 18 // timestamp in ms 19 "createdAt": 1665578322700, 20 // agent’s name and ID is passed in case it’s agent’s message 21 "agentId": "bnRzp4CioKudG4aHm", 22 "agentName": "Julia", 23 // only set when the agent has uploaded a profile picture 24 "agentUserpic": "https://ucarecdn.com/06e119c4-debd-420f-bb8c-7a2f261ca0e5/" 25 }, 26 27 // agent info is passed in case chat was started by an agent 28 "agent": { 29 "id": "bnRzp4CioKudG4aHm", 30 "name": "Julia", 31 "email": "julia@getwear.com", 32 // only set when the agent has uploaded a profile picture 33 "userpic": "https://ucarecdn.com/06e119c4-debd-420f-bb8c-7a2f261ca0e5/" 34 }, 35 36 // visitor information 37 "visitor": { 38 // id generated by Brevo or `visitorId` passed to `window.BrevoConversationsSetup` 39 // (see “Binding chat to a user account”: /guides/conversations/customize-the-chat-widget#binding-conversations-to-user-accounts) 40 "id": "vfg1y4h4ioapl1cx0trw1mujk6den021zs9b2q8", 41 "threadId": "aC4krWMZWLYzz9sKZ", 42 // link to this conversation in dashboard 43 "threadLink": "https://conversations-app.brevo.com/conversations/aC4krWMZWLYzz9sKZ", 44 "source": "widget", 45 // For Facebook/Instagram/WhatsApp, the ID of the page/account 46 "sourceChannelRef": null, 47 // For Facebook/Instagram/WhatsApp, the link of the channel on the platform 48 "sourceChannelLink": null, 49 // For Facebook/Instagram/WhatsApp, the ID of the visitor on the platform 50 "sourceConversationRef": null, 51 // id of the agent group 52 "groupId": "z2o3F8GDkNpKD4BYt", 53 // visitor’s userpic color in Conversations 54 "color": "#faebd7", 55 "ip": "192.168.1.179", 56 // visitor’s browser language 57 "browserLanguage": "en-US", 58 // language displayed to the visitor 59 "conversationLanguage": "en", 60 "browser": "Chrome 106.0.0", 61 "os": "Windows 10", 62 // User agent string 63 "userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36", 64 "country": "Ireland", 65 "city": "Dublin", 66 "lastVisit": { 67 // timestamp in ms 68 "startedAt": 1664550759104, 69 // finishedAt can be undefined for an ongoing visit 70 "finishedAt": 1664551471534, 71 // last visited website 72 "hostName": "getwear.com", 73 // list of viewed pages (link + title) during current visit 74 "viewedPages": [ 75 { 76 "link": "https://getwear.com/", 77 "title": "Getwear — custom designer jeans" 78 }, 79 { 80 "link": "https://getwear.com/women/151254/", 81 "title": "Washed skinny jeans for women" 82 } 83 ] 84 }, 85 // name displayed in dashboard (userpic color name for anonymous visitors, e.g. “Dark Orange”) 86 "displayedName": "Jane", 87 // Attributes from the contact 88 "contactAttributes": { 89 "SMS": "35315684258" 90 }, 91 // Information from the contact form or passed to the JS API. 92 // (see “Passing user details to Conversations”: /guides/conversations/customize-the-chat-widget#passing-user-details-to-conversations) 93 "integrationAttributes": { 94 "FIRSTNAME": "Jane", 95 "EMAIL": "jane@example.com", 96 "ORDER": "#151254", 97 "CART": "Washed skinny jeans for women, $99" 98 }, 99 // Combination of the two above, priority is given to the information filled by visitor 100 // and/or agents. This object should be used over the two above in most cases. 101 "attributes": { 102 "FIRSTNAME": "Jane", 103 "EMAIL": "jane@example.com", 104 "SMS": "35315684258", 105 "ORDER": "#151254", 106 "CART": "Washed skinny jeans for women, $99" 107 }, 108 // Attributes that can be formatted only 109 "formattedAttributes": { 110 "SMS": "+353 1 568 4258" 111 }, 112 "notes": "Loves skinny jeans", 113 "contactId": 5, 114 "marketingConsent": false, 115 "termsOfServiceConsent": true 116 } 117 }
Conversation fragment
Event is triggered after each message with some exceptions. Will not be triggered in these cases:
- Message is an automatic targeted message from an agent.
- Visitor’s chat is blocked by a mandatory contact form (“Get messages only once the form is filled” option in contact form settings). In this case, the event will be triggered after the contact form is filled by the visitor.
- Message is a pushed message and there are no previous conversations with the visitor.
messagesproperty of the event object contains all the messages since previousconversationFragmentevent.
This ruleset is designed for two-way integrations with help desks and the like.
The event is only triggered when there’s a message that requires agents’ attention or there’s a response from an agent that should be added to the conversation (i.e. new ticket should be created or an existing ticket should be updated).
That’s why automatic targeted messages do not trigger the event, but are added to the webhook for the sake of completeness the next time the event happens.
| Attribute name | Data type | Description |
|---|---|---|
eventName | string | ”conversationFragment” |
conversationId | string | ID of the continuous conversation with one visitor. |
messages | Message[] | List of messages since the previous conversationFragment event |
agents | Object[] | List of agents who participated in this fragment |
visitor | Visitor | Visitor information: - country, language, browser, etc. - contact attributes - info from contact form or JS API - info from channel (i.e. Facebook profile) - terms of service and marketing consents - and more! |
isNoAvailableAgent | Boolean | Shows if no agent is online at this point |
1 { 2 "eventName": "conversationFragment", 3 "conversationId": "aC4krWMZWLYzz9sKZ", 4 5 // list of messages since previous `conversationFragment` event 6 // (see “The Message object” below) 7 // /guides/conversations/conversations-webhooks#the-message-object 8 "messages": [ 9 // pushed message from an agent (see `pushedMessages` in REST API) 10 { 11 "type": "agent", 12 "id": "AXCR3k9bpSY7bpuh7", 13 "text": "Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54", 14 "html": "Your order has shipped! Here&39;s your tracking number: 9114 5847 4668 7775 9233 54", 15 "createdAt": 1664550379561, 16 "agentId": "d9nKoegKSjmCtyK78", 17 "agentName": "Liz", 18 // only set when the agent has uploaded a profile picture 19 "agentUserpic": "https://ucarecdn.com/06e119c4-debd-420f-bb8c-7a2f261ca0e5/", 20 // `true` for pushed messages 21 "isPushed": true 22 }, 23 24 // automatic targeted message from an agent 25 { 26 "type": "agent", 27 "id": "DftGtKqyJpBXtC42J", 28 "text": "Hi there! How can we help you?", 29 "html": "Hi there! How can we help you?", 30 "createdAt": 1664554934355, 31 "agentId": "bnRzp4CioKudG4aHm", 32 "agentName": "Julia", 33 // only set when the agent has uploaded a profile picture 34 "agentUserpic": "https://ucarecdn.com/06e119c4-debd-420f-bb8c-7a2f261ca0e5/", 35 // `true` for automatic messages from “Targeted chats & triggers” 36 "isTrigger": true 37 }, 38 39 // visitor’s message 40 { 41 "type": "visitor", 42 "id": "JuzQe8pJ9cZqymJK9", 43 "text": "I’ve changed my email, could you please re-send my order details?", 44 "html": "I&39;ve changed my email, could you please re-send my order details?", 45 "createdAt": 1664563333617 46 } 47 ], 48 49 // list of agents who participated in this fragment 50 "agents": [ 51 { 52 "id": "d9nKoegKSjmCtyK78", 53 "name": "Liz", 54 "email": "liz@getwear.com", 55 // only set when the agent has uploaded a profile picture 56 "userpic": "https://ucarecdn.com/93d1e396-2a78-4ece-82f0-7b8bb9043b78/" 57 }, 58 59 { 60 "id": "bnRzp4CioKudG4aHm", 61 "name": "Julia", 62 "email": "julia@getwear.com", 63 // only set when the agent has uploaded a profile picture 64 "userpic": "https://ucarecdn.com/06e119c4-debd-420f-bb8c-7a2f261ca0e5/" 65 } 66 ], 67 68 // visitor information 69 "visitor": { 70 71 // id generated by Brevo or `visitorId` passed to `window.BrevoConversationsSetup` 72 // (see “Binding chat to a user account”: /guides/conversations/customize-the-chat-widget#binding-conversations-to-user-accounts) 73 "id": "vfg1y4h4ioapl1cx0trw1mujk6den021zs9b2q8", 74 "threadId": "aC4krWMZWLYzz9sKZ", 75 // link to this conversation in dashboard 76 "threadLink": "https://conversations-app.brevo.com/conversations/aC4krWMZWLYzz9sKZ", 77 "source": "widget", 78 // For Facebook/Instagram/WhatsApp, the ID of the page/account 79 "sourceChannelRef": null, 80 // For Facebook/Instagram/WhatsApp, the link of the channel on the platform 81 "sourceChannelLink": null, 82 // For Facebook/Instagram/WhatsApp, the ID of the visitor on the platform 83 "sourceConversationRef": null, 84 // id of the agent group 85 "groupId": "z2o3F8GDkNpKD4BYt", 86 // visitor’s userpic color in Conversations 87 "color": "#faebd7", 88 "ip": "192.168.1.179", 89 // visitor’s browser language 90 "browserLanguage": "en-US", 91 // language displayed to the visitor 92 "conversationLanguage": "en", 93 "browser": "Chrome 106.0.0", 94 "os": "Windows 10", 95 // User agent string 96 "userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36", 97 "country": "Ireland", 98 "city": "Dublin", 99 "lastVisit": { 100 // timestamp in ms 101 "startedAt": 1664550759104, 102 // finishedAt can be undefined for an ongoing visit 103 "finishedAt": 1664551471534, 104 // last visited website 105 "hostName": "getwear.com", 106 // list of viewed pages (link + title) during current visit 107 "viewedPages": [ 108 { 109 "link": "https://getwear.com/", 110 "title": "Getwear — custom designer jeans" 111 }, 112 { 113 "link": "https://getwear.com/women/151254/", 114 "title": "Washed skinny jeans for women" 115 } 116 ] 117 }, 118 // name displayed in dashboard (userpic color name for anonymous visitors, e.g. “Dark Orange”) 119 "displayedName": "Jane", 120 // Attributes from the contact 121 "contactAttributes": { 122 "SMS": "35315684258" 123 }, 124 // Information from the contact form or passed to the JS API. 125 // (see “Passing user details to Conversations”: /guides/conversations/customize-the-chat-widget#passing-user-details-to-conversations) 126 "integrationAttributes": { 127 "FIRSTNAME": "Jane", 128 "EMAIL": "jane@example.com", 129 "ORDER": "#151254", 130 "CART": "Washed skinny jeans for women, $99" 131 }, 132 // Combination of the two above, priority is given to the information filled by visitor 133 // and/or agents. This object should be used over the two above in most cases. 134 "attributes": { 135 "FIRSTNAME": "Jane", 136 "EMAIL": "jane@example.com", 137 "SMS": "35315684258", 138 "ORDER": "#151254", 139 "CART": "Washed skinny jeans for women, $99" 140 }, 141 // Attributes that can be formatted only 142 "formattedAttributes": { 143 "SMS": "+353 1 568 4258" 144 }, 145 "notes": "Loves skinny jeans", 146 "contactId": 5, 147 "marketingConsent": false, 148 "termsOfServiceConsent": true 149 } 150 }
Conversation transcript
Event is triggered when a conversation is finished. Conversation is considered finished after the visitor goes offline (leaves your website) or all the agents who participated leave the conversation.
| Attribute name | Data type | Description |
|---|---|---|
eventName | string | ”conversationTranscript” |
conversationId | string | ID of the continuous conversation with one visitor. |
messages | Message[] | List of messages |
missedMessagesCount | Number | Number of missed and offline messages |
agents | Object[] | List of agents who participated in the conversation |
visitor | Visitor | Visitor information: - country, language, browser, etc. - contact attributes - info from contact form or JS API - info from channel (i.e. Facebook profile) - terms of service and marketing consents - and more! |
conversationStartPage | Object | For the chat widget, will contain the link and title of your website at the time the conversation was started. |
1 { 2 "eventName": "conversationTranscript", 3 "conversationId": "aC4krWMZWLYzz9sKZ", 4 5 // For the chat widget, will contain the `link` and `title` of your website at the time the conversation was started 6 "conversationStartPage": { 7 "link": "https://getwear.com/women/151254/", 8 "title": "Washed skinny jeans for women" 9 } 10 11 // list of messages (see “The Message object” below) 12 // /guides/conversations/conversations-webhooks#the-message-object 13 "messages": [ 14 // pushed message from an agent (see `pushedMessages` in REST API) 15 { 16 "type": "agent", 17 "id": "AXCR3k9bpSY7bpuh7", 18 "text": "Your order has shipped! Here’s your tracking number: 9114 5847 4668 7775 9233 54", 19 "html": "Your order has shipped! Here's your tracking number: 9114 5847 4668 7775 9233 54", 20 "createdAt": 1664550379561, 21 "agentId": "d9nKoegKSjmCtyK78", 22 "agentName": "Liz", 23 // only set when the agent has uploaded a profile picture 24 "agentUserpic": "https://ucarecdn.com/93d1e396-2a78-4ece-82f0-7b8bb9043b78/", 25 // `true` for pushed messages 26 "isPushed": true 27 }, 28 29 // automatic targeted message from an agent 30 { 31 "type": "agent", 32 "id": "DftGtKqyJpBXtC42J", 33 "text": "Hi there! How can we help you?", 34 "html": "Hi there! How can we help you?", 35 "createdAt": 1664554934355, 36 "agentId": "bnRzp4CioKudG4aHm", 37 "agentName": "Julia", 38 // only set when the agent has uploaded a profile picture 39 "agentUserpic": "https://ucarecdn.com/06e119c4-debd-420f-bb8c-7a2f261ca0e5/", 40 // `true` for automatic messages from “Targeted chats & triggers” 41 "isTrigger": true 42 }, 43 44 // visitor’s message 45 { 46 "type": "visitor", 47 "id": "JuzQe8pJ9cZqymJK9", 48 "text": "I’ve changed my email, could you please re-send my order details?", 49 "html": "I&39;ve changed my email, could you please re-send my order details?", 50 "createdAt": 1664563333617 51 }, 52 53 // agent’s message 54 { 55 "type": "agent", 56 "id": "5z5fvBj4auebD63S5", 57 "text": "Sure, just a moment :)", 58 "html": "Sure, just a moment :)", 59 "createdAt": 1664563359830, 60 "agentId": "bnRzp4CioKudG4aHm", 61 "agentName": "Julia", 62 // only set when the agent has uploaded a profile picture 63 "agentUserpic": "https://ucarecdn.com/06e119c4-debd-420f-bb8c-7a2f261ca0e5/", 64 }, 65 66 // agent sends a file 67 { 68 "type": "agent", 69 "id": "5MzkBA9ERXJNk4JuH", 70 "text": "receipt.png", 71 // Sanitized file name 72 "html": "receipt.png", 73 "file": { 74 "name": "receipt.png", 75 // size in bytes 76 "size": 333455, 77 "isAllowedFileType": true, 78 // whether the file is an image 79 "isImage": true, 80 "isSticker": true, 81 "link": "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/", 82 // image info is passed in case the file is an image 83 "imageInfo": { 84 "width": 1129, 85 "height": 525, 86 "previewUrl": "https://ucarecdn.com/03cd56cd-1de9-4f65-996d-08afdf27fa1b/-/preview/800x800/-/quality/lighter/" 87 } 88 }, 89 "createdAt": 1664563366078, 90 "agentId": "bnRzp4CioKudG4aHm", 91 "agentName": "Julia", 92 // only set when the agent has uploaded a profile picture 93 "agentUserpic": "https://ucarecdn.com/06e119c4-debd-420f-bb8c-7a2f261ca0e5/" 94 }, 95 96 { 97 "type": "visitor", 98 "id": "6QZDugATac9FXZSkp", 99 "text": "Thanks!", 100 "html": "Thanks!", 101 "createdAt": 1664563372326, 102 // `true` for missed and offline messages 103 "isMissed": true 104 } 105 ], 106 107 // number of missed and offline messages 108 "missedMessagesCount": 1, 109 110 // list of agents who participated in the conversation 111 "agents": [ 112 { 113 "id": "d9nKoegKSjmCtyK78", 114 "name": "Liz", 115 "email": "liz@getwear.com", 116 // only set when the agent has uploaded a profile picture 117 "userpic": "https://ucarecdn.com/93d1e396-2a78-4ece-82f0-7b8bb9043b78/" 118 }, 119 120 { 121 "id": "bnRzp4CioKudG4aHm", 122 "name": "Julia", 123 "email": "julia@getwear.com", 124 // only set when the agent has uploaded a profile picture 125 "userpic": "https://ucarecdn.com/06e119c4-debd-420f-bb8c-7a2f261ca0e5/" 126 } 127 ], 128 129 // visitor information 130 "visitor": { 131 // id generated by Brevo or `visitorId` passed to `window.BrevoConversationsSetup` 132 // (see “Binding chat to a user account”: /guides/conversations/customize-the-chat-widget#binding-conversations-to-user-accounts) 133 "id": "vfg1y4h4ioapl1cx0trw1mujk6den021zs9b2q8", 134 "threadId": "aC4krWMZWLYzz9sKZ", 135 // link to this conversation in dashboard 136 "threadLink": "https://conversations-app.brevo.com/conversations/aC4krWMZWLYzz9sKZ", 137 "source": "widget", 138 // For Facebook/Instagram/WhatsApp, the ID of the page/account 139 "sourceChannelRef": null, 140 // For Facebook/Instagram/WhatsApp, the link of the channel on the platform 141 "sourceChannelLink": null, 142 // For Facebook/Instagram/WhatsApp, the ID of the visitor on the platform 143 "sourceConversationRef": null, 144 // id of the agent group 145 "groupId": "z2o3F8GDkNpKD4BYt", 146 // visitor’s userpic color in Conversations 147 "color": "#faebd7", 148 "ip": "192.168.1.179", 149 // visitor’s browser language 150 "browserLanguage": "en-US", 151 // language displayed to the visitor 152 "conversationLanguage": "en", 153 "browser": "Chrome 106.0.0", 154 "os": "Windows 10", 155 // User agent string 156 "userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36", 157 "country": "Ireland", 158 "city": "Dublin", 159 "lastVisit": { 160 // timestamp in ms 161 "startedAt": 1664550759104, 162 // finishedAt can be undefined for an ongoing visit 163 "finishedAt": 1664551471534, 164 // last visited website 165 "hostName": "getwear.com", 166 // list of viewed pages (link + title) during current visit 167 "viewedPages": [ 168 { 169 "link": "https://getwear.com/", 170 "title": "Getwear — custom designer jeans" 171 }, 172 { 173 "link": "https://getwear.com/women/151254/", 174 "title": "Washed skinny jeans for women" 175 } 176 ] 177 }, 178 // name displayed in dashboard (userpic color name for anonymous visitors, e.g. “Dark Orange”) 179 "displayedName": "Jane", 180 // Attributes from the contact 181 "contactAttributes": { 182 "SMS": "35315684258" 183 }, 184 // Information from the contact form or passed to the JS API. 185 // (see “Passing user details to Conversations”: /guides/conversations/customize-the-chat-widget#passing-user-details-to-conversations) 186 "integrationAttributes": { 187 "FIRSTNAME": "Jane", 188 "EMAIL": "jane@example.com", 189 "ORDER": "#151254", 190 "CART": "Washed skinny jeans for women, $99" 191 }, 192 // Combination of the two above, priority is given to the information filled by visitor 193 // and/or agents. This object should be used over the two above in most cases. 194 "attributes": { 195 "FIRSTNAME": "Jane", 196 "EMAIL": "jane@example.com", 197 "SMS": "35315684258", 198 "ORDER": "#151254", 199 "CART": "Washed skinny jeans for women, $99" 200 }, 201 // Attributes that can be formatted only 202 "formattedAttributes": { 203 "SMS": "+353 1 568 4258" 204 }, 205 "notes": "Loves skinny jeans", 206 "contactId": 5, 207 "marketingConsent": false, 208 "termsOfServiceConsent": true 209 } 210 }
The Visitor object
| Attribute name | Data type | Description |
|---|---|---|
source | string | Source of the visitor, e.g. widget, facebook, whatsapp, etc. |
displayedName | string | Name displayed in dashboard (userpic color name for anonymous visitors, e.g. “Dark Orange”) |
contactId | Number | If the visitor is in your Contacts, its ID will be available here. |
contactAttributes | Object | Info from your Brevo contact. |
integrationAttributes | Object | Info from the integration. Examples: - For the chat widget, it will be the info from the contact form or the JS API. - Info from channel (i.e. Facebook profile) |
attributes | Object | Combination of the two above. Priority is given to the contact attributes. This object should be used over the two above in most cases |
formattedAttributes | Object | Display name for attributes that can be formatted (SMS, WHATSAPP) |
termsOfServiceConsent | Boolean | Useful if you have enabled “Request consent to your terms” in the Contact form, and the conversation was started by the chat widget (not applicable for other channels like Instagram or Facebook) |
marketingConsent | Boolean | Useful if you have enabled “Request consent to your marketing communications” in the Contact form, and the conversation was started by the chat widget (not applicable for other channels like Instagram or Facebook) |
browser / country / lastVisit / etc. | More fields are available in this object, please check the sample payloads to find out. |
The Agent object
| Attribute name | Data type | Description |
|---|---|---|
id | string | ID of the agent, as found in the agent’s page |
name | string | Name of the agent |
email | string | Email address of the agent |
userpic | string | URL of the agent’s profile photo, if they have uploaded one |
The Message object
| Attribute name | Data type | Description |
|---|---|---|
id | String | Message ID. |
type | String | visitor or agent (depending on who sent the message) |
text | String | Message text or name of the attached file |
html | String | Safe HTML with our chat “markdown” applied |
createdAt | Number | Timestamp in milliseconds |
agentId | String | Agent’s ID in the messages sent by an agent |
agentName | String | Agent’s name as displayed to the visitor. Only in the messages sent by an agent |
agentUserpic | String | URL of the agent’s profile photo, if they have uploaded one |
messageType | String | Contains “email_bounce” when the received answer is a bounce notification received from Gmail |
isTrigger | Boolean | true for automatic messages from Targeted chats & triggers and API |
isPushed | Boolean | For automated messages |
isMissed | Boolean | When the chat is finished, visitor’s messages missed by the agents are marked with \"isMissed\": true |
isMissedByVisitor | Boolean | When the chat is finished, agent’s messages missed by the visitor are marked with \"isMissedByVisitor\": true |
receivedFrom | String | In two-way integrations, messages sent via REST API can be marked with receivedFrom property and then filtered out when received in a webhook to avoid infinite loop |
file | Attachment object | Attachment messages have this property containing file information |
attachments | Attachment[] object | This can exists in email replies to chat conversations. Unlike file, attachments exist alongside the regular message |
The Attachment object
| Attribute name | Data type | Description |
|---|---|---|
name | String | Name of the file |
size | Number | Size in bytes |
isImage | Boolean | Whether the file is an image |
isSticker | Boolean | For stickers (Facebook/Instagram/WhatsApp) |
link | String | URL of the file |
isAllowedFileType | Boolean | Whether the file type is allowed in this setting |
imageInfo | Object | In case the file is an image, will contain width, height and previewLink |