Message model

Details on every Message Object field
Written by Konstantine
Updated 6 months ago

Messages API allows you to get and create messages on behalf of your customers or agents.

Here's the example response for the Messages API methods:

{
  "id": 542335,
  "agent": {
    "id": 542335,
    "name": "string",
    "email": "string",
    "role": "string"
  },
  "type": "tech",
  "text": "string",
  "read": true,
  "createdAt": "1603885746",
  "updatedAt": "1603885746",
  "edited": true,
  "broadcastType": "trigger",
  "chat": 542335,
  "from": "agent"
}

Below you can find details on each of the Message Object fields.

Field Type Description
id Integer Unique id of the message provided by HelpCrunch
agent Object If the message was sent from agent, this object will contain  id, name, email and role of that agent
type String "tech" - system message (e.g. about status update)
"email" - email message
"knowledgeBase" - link to Knowledge Base article
"message" - regular message
"private" - private note (agents only)
text String Text of the message
read Boolean true - message was read. false - message has not been read
createdAt Date (UNIX timestamp) Date and time the message was created
updatedAt Date (UNIX timestamp) Date and time the message was updated
edited Boolean true - message was edited. false - message was not edited
broadcastType String "trigger" - proactive chat
"auto chat" - targeted chat auto message
"auto email" - email auto message
"manual chat" - manual chat message
"manual email" - manual email message
Read more about Auto and manual messages
chat Integer Unique id of the chat provided by HelpCrunch
from String "agent" or "customer". Who sent the message.
 

If you have any questions regarding the REST API, feel free to chat us any time.

👩‍💻 Happy Coding! 👨‍💻

Did this answer your question?