Chat - Message Events

This collection of events will inform you about individual messaging that is being sent within chats via the Chat API.

Sent

This event represents a copy of messages sent to and from a chat.

Examples

{
    "eventId": "c10c8138-7925-4717-82b1-af4730a7afea",
    "accountId": 1234,
    "apiSpaceId": "4ba42f12-6e0c-49ab-a41f-f8d7a782a2df",
    "name": "chatMessage.sent",
    "payload": {
        "metadata": {},
        "context": {
            "from": {
                "id": "c5ce8276-a624-4e04-aada-3cbb59bc9cca"
            },
            "chatId": "bef906ab-9735-4bd1-aefa-f2dd56094610",
            "teamId": "Customer_Services",
            "sentBy": "session:c5ce8276-a624-4e04-aada-3cbb59bc9cca",
            "sentOn": "2019-12-10T11:44:25.870Z",
            "direction": "inbound"
        },
        "parts": [
            {
                "name": "body",
                "type": "text/plain",
                "data": "Hi there"
            }
        ],
        "id": "3f48daab-ff6e-48bd-8999-625851653aa9"
    },
    "revision": 0,
    "timestamp": "2019-12-10T11:44:25.871Z"
}
{
    "eventId": "467d70b6-889e-48fa-8a53-453590789cf1",
    "accountId": 1234,
    "apiSpaceId": "4ba42f12-6e0c-49ab-a41f-f8d7a782a2df",
    "name": "chatMessage.sent",
    "payload": {
        "metadata": {},
        "context": {
            "from": {
                "id": "PLATFORMUSER\\[email protected]"
            },
            "chatId": "973880db-75b4-49e5-8c06-2bb030d70319",
            "teamId": "Customer_Services",
            "sentBy": "interactive:[email protected]",
            "sentOn": "2019-12-10T12:03:04.023Z",
            "direction": "outbound",
            "to": {
                "id": "c5ce8276-a624-4e04-aada-3cbb59bc9cca"
            }
        },
        "parts": [
            {
                "data": "How can we help?",
                "size": 16,
                "type": "text/plain"
            }
        ],
        "id": "dc49ccb5-3ccc-4194-b2ed-fa7acca22588"
    },
    "revision": 8,
    "timestamp": "2019-12-10T12:03:04.025Z"
}
{
    "eventId": "c1da996a-6c81-4b60-ae1a-6a5f2fcc372b",
    "accountId": 1234,
    "apiSpaceId": "4ba42f12-6e0c-49ab-a41f-f8d7a782a2df",
    "name": "chatMessage.sent",
    "payload": {
        "metadata": {},
        "context": {
            "from": {
                "id": "Bot"
            },
            "chatId": "973880db-75b4-49e5-8c06-2bb030d70319",
            "teamId": "Bot",
            "sentBy": "access:e5ccf869-f4b8-42b3-b94d-07f70ecb37bf",
            "sentOn": "2019-12-10T12:00:45.916Z",
            "direction": "outbound",
            "to": {
                "id": "c5ce8276-a624-4e04-aada-3cbb59bc9cca"
            }
        },
        "parts": [
            {
                "data": "I'm fine, thanks for asking",
                "type": "text/plain"
            }
        ],
        "id": "7961cbca-5097-4b0b-8a8a-3550193492c5"
    },
    "revision": 2,
    "timestamp": "2019-12-10T12:00:45.920Z"
}

Delivered

Receipt indicating a message has been delivered where the channel the chat is using supports delivery information.

Examples

{
  "eventId": "a246156f-2276-4018-b206-a5003a3744b3",
  "accountId": 12345,
  "apiSpaceId": "fed1780d-8440-480a-b268-20b1eb50a4ab",
  "name": "chatMessage.delivered",
  "payload": {
    "chatId": "53880d0b-de0f-48b0-8d68-17d9400fea02",
    "direction": "inbound",
    "profileId": "PLATFORMUSER\\Chilton&JamesDemo",
    "timestamp": "2017-11-21T11:52:20.474Z"
  },
  "revision": 4,
  "timestamp": "2017-11-21T11:52:20.611Z"
}

Read

Receipt indicating a message has been read where the channel the chat is using supports read indicators.