Messaging

Messages sent

The 'Messaging' event group has been introduced. It supports v1 events and is available for all integrators with an active Data Hub Subscription.


The following events can be subscribed upon:

  • messaging.message.sent: a new message is sent in a chat or groupchat conversation
  • messaging.message.delivered: a message has been delivered to the recipient
  • messaging.message.seen: a recipient has seen/read a message
  • messaging.message.treated: a participant has marked a message as treated (groupchat only)
  • messaging.message.driverSeen: a driver has seen the message sent by a group participant (groupchat only)
  • messaging.message.recalled: a sender has recalled/unsent a message before it was read by the recipient

Events

messaging.message.sent

Contains all information that would be returned when doing a "Get messages" (GET /v1/conversations/messages) Datahub API call for that message. This includes the full message content, sender information, conversation context, and an initial statusHistory with status Pending.

The event is emitted for both chat (1:1) and groupchat conversations.

{
  "eventBatchId": "020db07f-6e95-470e-8cc0-a371f9deed2b",
  "eventSubscriptionId": "517db07f-6e95-475e-8cc0-a371f9deed2b",
  "eventBatchTime": "2026-03-03T10:30:15.683Z",
  "eventsData": [
    {
      "eventType": "messaging.message.sent",
      "eventVersion": 1,
      "eventData": {
        "registeredOn": "2026-03-03T10:30:15Z",
        "messageId": "a1234567-89ab-cdef-0123-456789abcdef",
        "conversationId": "3f94cfb0-7cac-46be-bba5-adfb1a24ee12:87bb1451-08c3-4bd6-b89b-2e4328af52f3",
        "conversationType": "chat",
        "sender": {
          "senderId": "3f94cfb0-7cac-46be-bba5-adfb1a24ee12",
          "roleType": "User"
        },
        "recipientId": "87bb1451-08c3-4bd6-b89b-2e4328af52f3",
        "contentType": "text",
        "content": "Hello, how are you?",
        "replyToMessageId": null,
        "statusHistory": {
          "currentStatus": "Pending",
          "lastUpdatedAt": "2026-03-03T10:30:15Z",
          "events": [
            {
              "status": "Pending",
              "timestamp": "2026-03-03T10:30:15Z"
            }
          ]
        }
      }
    }
  ]
}

messaging.message.delivered

Contains the same message structure as messaging.message.sent, with the statusHistory updated to reflect delivery. The statusHistory.events array will contain both the original Pending entry and the new Delivered entry with its timestamp.

In case of group conversation this event will come only the message is delivered to all the participants present in the group

The event is triggered when a message has been successfully delivered to the recipient's device(s).

{
  "eventBatchId": "030db07f-6e95-470e-8cc0-a371f9deed2b",
  "eventSubscriptionId": "517db07f-6e95-475e-8cc0-a371f9deed2b",
  "eventBatchTime": "2026-03-03T10:30:20.123Z",
  "eventsData": [
    {
      "eventType": "messaging.message.delivered",
      "eventVersion": 1,
      "eventData": {
        "registeredOn": "2026-03-03T10:30:20Z",
        "messageId": "a1234567-89ab-cdef-0123-456789abcdef",
        "conversationId": "3f94cfb0-7cac-46be-bba5-adfb1a24ee12:87bb1451-08c3-4bd6-b89b-2e4328af52f3",
        "conversationType": "chat",
        "sender": {
          "senderId": "3f94cfb0-7cac-46be-bba5-adfb1a24ee12",
          "roleType": "User"
        },
        "recipientId": "87bb1451-08c3-4bd6-b89b-2e4328af52f3",
        "contentType": "text",
        "content": "Hello, how are you?",
        "replyToMessageId": null,
        "statusHistory": {
          "currentStatus": "Delivered",
          "lastUpdatedAt": "2026-03-03T10:30:20Z",
          "events": [
            {
              "status": "Pending",
              "timestamp": "2026-03-03T10:30:15Z"
            },
            {
              "status": "Delivered",
              "timestamp": "2026-03-03T10:30:20Z"
            }
          ]
        }
      }
    }
  ]
}

messaging.message.seen

Contains the same message structure as above, with the statusHistory updated to include a Seen entry. An additional participantId field identifies which participant marked the message as seen.

In case of group conversation this event will come only the message is seen by all the participants present in the group

This event is triggered when a user calls PATCH /v1/messages/actions/seen.

{
  "eventBatchId": "040db07f-6e95-470e-8cc0-a371f9deed2b",
  "eventSubscriptionId": "517db07f-6e95-475e-8cc0-a371f9deed2b",
  "eventBatchTime": "2026-03-03T10:30:30.456Z",
  "eventsData": [
    {
      "eventType": "messaging.message.seen",
      "eventVersion": 1,
      "eventData": {
        "registeredOn": "2026-03-03T10:30:30Z",
        "messageId": "a1234567-89ab-cdef-0123-456789abcdef",
        "conversationId": "3f94cfb0-7cac-46be-bba5-adfb1a24ee12:87bb1451-08c3-4bd6-b89b-2e4328af52f3",
        "conversationType": "chat",
        "sender": {
          "senderId": "3f94cfb0-7cac-46be-bba5-adfb1a24ee12",
          "roleType": "User"
        },
        "recipientId": "87bb1451-08c3-4bd6-b89b-2e4328af52f3",
        "contentType": "text",
        "content": "Hello, how are you?",
        "replyToMessageId": null,
        "participantId": "87bb1451-08c3-4bd6-b89b-2e4328af52f3",
        "statusHistory": {
          "currentStatus": "Seen",
          "lastUpdatedAt": "2026-03-03T10:30:30Z",
          "events": [
            {
              "status": "Pending",
              "timestamp": "2026-03-03T10:30:15Z"
            },
            {
              "status": "Delivered",
              "timestamp": "2026-03-03T10:30:20Z"
            },
            {
              "status": "Seen",
              "timestamp": "2026-03-03T10:30:30Z"
            }
          ]
        }
      }
    }
  ]
}

messaging.message.treated

Contains the same message structure, with the statusHistory updated to include a Treated entry. The Treated status event includes a participant object with the participantId and roleType of the participant who treated the message.

This event is only emitted for groupchat conversations.

This event is triggered when a user calls PATCH /v1/messages/actions/treat.

{
  "eventBatchId": "050db07f-6e95-470e-8cc0-a371f9deed2b",
  "eventSubscriptionId": "517db07f-6e95-475e-8cc0-a371f9deed2b",
  "eventBatchTime": "2026-03-03T10:30:45.789Z",
  "eventsData": [
    {
      "eventType": "messaging.message.treated",
      "eventVersion": 1,
      "eventData": {
        "registeredOn": "2026-03-03T10:30:45Z",
        "messageId": "a1234567-89ab-cdef-0123-456789abcdef",
        "conversationId": "c4df52df-8359-4e37-9dc4-e184c0d4b8ef",
        "conversationType": "groupchat",
        "sender": {
          "senderId": "7f94cfb0-7cac-46be-bba5-adfb1a24ee77",
          "roleType": "User"
        },
        "contentType": "text",
        "content": "Please check the delivery status for order #12345",
        "replyToMessageId": null,
        "statusHistory": {
          "currentStatus": "Treated",
          "lastUpdatedAt": "2026-03-03T10:30:45Z",
          "events": [
            {
              "status": "Pending",
              "timestamp": "2026-03-03T10:30:15Z"
            },
            {
              "status": "Delivered",
              "timestamp": "2026-03-03T10:30:20Z"
            },
            {
              "status": "Treated",
              "timestamp": "2026-03-03T10:30:45Z",
              "participant": {
                "participantId": "1e8ee916-ab83-4402-8048-0d949231d586",
                "roleType": "User"
              }
            }
          ]
        }
      }
    }
  ]
}

messaging.message.driverSeen

Contains the same message structure, with the statusHistory updated to include a DriverSeen entry. The DriverSeen status event includes a participant object with the participantId and roleType (Driver) of the driver who saw the message.

This event is only emitted for groupchat conversations.

{
  "eventBatchId": "060db07f-6e95-470e-8cc0-a371f9deed2b",
  "eventSubscriptionId": "517db07f-6e95-475e-8cc0-a371f9deed2b",
  "eventBatchTime": "2026-03-03T10:30:35.321Z",
  "eventsData": [
    {
      "eventType": "messaging.message.driverSeen",
      "eventVersion": 1,
      "eventData": {
        "registeredOn": "2026-03-03T10:30:35Z",
        "messageId": "a1234567-89ab-cdef-0123-456789abcdef",
        "conversationId": "c4df52df-8359-4e37-9dc4-e184c0d4b8ef",
        "conversationType": "groupchat",
        "sender": {
          "senderId": "7f94cfb0-7cac-46be-bba5-adfb1a24ee77",
          "roleType": "User"
        },
        "contentType": "text",
        "content": "Please check the delivery status for order #12345",
        "replyToMessageId": null,
        "statusHistory": {
          "currentStatus": "DriverSeen",
          "lastUpdatedAt": "2026-03-03T10:30:35Z",
          "events": [
            {
              "status": "Pending",
              "timestamp": "2026-03-03T10:30:15Z"
            },
            {
              "status": "Delivered",
              "timestamp": "2026-03-03T10:30:20Z"
            },
            {
              "status": "DriverSeen",
              "timestamp": "2026-03-03T10:30:35Z",
              "participant": {
                "participantId": "1e8ee916-ab83-4402-8048-0d949231d586",
                "roleType": "Driver"
              }
            }
          ]
        }
      }
    }
  ]
}

messaging.message.recalled

Contains the same message structure, with the statusHistory updated to include a Recalled entry. The recall functionality allows a backoffice user or driver to undo/delete/unsend a message before it has been read by the recipient.

A message can only be recalled if it has not yet been seen by the recipient. Only the original sender of the message can initiate a recall.

The event is emitted for both chat (1:1) and groupchat conversations.

Chat message recalled

{
  "eventBatchId": "3fb6e982-0d45-454a-99ce-c9e07d8ce0ca",
  "eventSubscriptionId": "e753a857-7c94-4bbc-89e6-a0a49775d601",
  "eventBatchTime": "2026-05-06T07:31:55.0322714Z",
  "eventsData": [
    {
      "eventType": "message.recalled",
      "eventVersion": 1,
      "eventData": {
        "registeredOn": "2026-05-06T07:31:45Z",
        "messageId": "b57cca87-ccd5-4046-ac9e-3cb6350e7da6",
        "conversationId": "1e8ee916-ab83-4402-8048-0d949231d586:a3e8e523-f3a4-4fe5-a5d3-063ea6a104ac",
        "conversationType": "chat",
        "sender": {
          "senderId": "1e8ee916-ab83-4402-8048-0d949231d586",
          "roleType": "User"
        },
        "recipientId": "1e8ee916-ab83-4402-8048-0d949231d586",
        "contentType": "text",
        "content": "hi",
        "replyToMessageId": null,
        "statusHistory": {
          "currentStatus": "Recalled",
          "lastUpdatedAt": "2026-05-06T07:31:45Z",
          "events": [
            {
              "status": "Pending",
              "timestamp": "2026-05-06T07:31:41Z"
            },
            {
              "status": "Recalled",
              "timestamp": "2026-05-06T07:31:45Z"
            }
          ]
        }
      }
    }
  ]
}

Groupchat message recalled

{
  "eventBatchId": "a4dc5259-ef22-4595-90f3-e2c033508d64",
  "eventSubscriptionId": "e753a857-7c94-4bbc-89e6-a0a49775d601",
  "eventBatchTime": "2026-05-06T07:31:27.6683440Z",
  "eventsData": [
    {
      "eventType": "message.recalled",
      "eventVersion": 1,
      "eventData": {
        "registeredOn": "2026-05-06T07:31:27Z",
        "messageId": "67b4102c-2b80-4c87-9fd3-02dd88552185",
        "conversationId": "d5c28cf6-03fb-4fbf-a6b5-9b187b0f9ff7",
        "conversationType": "groupchat",
        "sender": {
          "senderId": "1e8ee916-ab83-4402-8048-0d949231d586",
          "roleType": "User"
        },
        "recipientId": "d5c28cf6-03fb-4fbf-a6b5-9b187b0f9ff7",
        "contentType": "text",
        "content": "Hello",
        "replyToMessageId": null,
        "statusHistory": {
          "currentStatus": "Recalled",
          "lastUpdatedAt": "2026-05-06T07:31:27Z",
          "events": [
            {
              "status": "Pending",
              "timestamp": "2026-05-06T07:30:14Z"
            },
            {
              "status": "Recalled",
              "timestamp": "2026-05-06T07:31:27Z"
            }
          ]
        }
      }
    }
  ]
}

Status lifecycle

A message progresses through the following statuses. Each transition emits a separate event, and the statusHistory.events array is cumulative:

Pending → Delivered → Seen
                    → Treated      (groupchat only)
										→ DriverSeen   (groupchat only)
Pending → Recalled                 (before message is seen)

Note that Treated and DriverSeen are independent of Seen — a message can be treated without being seen, and vice versa.

A Recalled status can only occur from Pending — once a message has been seen by the recipient, it can no longer be recalled.

Business decisions

  • When an event is received it should not be needed to do a "Get messages" call afterwards to get more info on the update. Each event contains the full message payload including content, sender, and complete status history.
  • All messaging events follow the standard DHS event envelope with eventBatchId, eventSubscriptionId, eventBatchTime, and eventsData[].
  • Multiple messaging events for the same message can be batched together in a single Kafka message (e.g., a sent + delivered in one batch if they occur close together).
  • Message content is included in all status update events (delivered, seen, treated, driverSeen), not just the initial sent event.
  • treated and driverSeen events are scoped to group chat only — they are not emitted for 1:1 chat conversations.
  • recalled can only be triggered by the original sender and only if the message has not yet been seen by the recipient. Once recalled, the message is effectively unsent and should no longer be visible to the recipient.