messaging.message.sent
The messaging.message.sent event is triggered when a new message is sent in either a one-to-one chat or a group conversation. This event provides complete message details including sender information, content, recipient details, and the full status history of the message.
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.
Payload JSON
Chat Message
{
"eventBatchId": "aa331a3b-ee6c-4175-82ba-e602ba15f71c",
"eventSubscriptionId": "7477120c-0229-44ea-9d87-b36fef2566ef",
"eventBatchTime": "2026-03-31T14:12:13.7660462Z",
"eventsData": [
{
"eventType": "message.sent",
"eventVersion": 1,
"eventData": {
"registeredOn": "2026-03-31T14:12:13Z",
"messageId": "06033478-37f2-469e-8e04-4fa764ab66f2",
"conversationId": "1e8ee916-ab83-4402-8048-0d949231d586:8340b144-e4d3-463b-a6d3-b8ea6074651c",
"conversationType": "chat",
"sender": {
"senderId": "1e8ee916-ab83-4402-8048-0d949231d586",
"roleType": "User"
},
"recipientId": "8340b144-e4d3-463b-a6d3-b8ea6074651c",
"contentType": "text",
"content": "8",
"replyToMessageId": null,
"isPriority": false,
"statusHistory": {
"currentStatus": "Pending",
"lastUpdatedAt": "2026-03-31T14:12:13Z",
"events": [
{
"status": "Pending",
"timestamp": "2026-03-31T14:12:13Z"
}
]
}
}
}
]
}Group chat Message
{
"eventBatchId": "73a61c44-6c0f-4e59-90e5-932f889a1b03",
"eventSubscriptionId": "7477120c-0229-44ea-9d87-b36fef2566ef",
"eventBatchTime": "2026-03-31T14:24:24.2057596Z",
"eventsData": [
{
"eventType": "message.sent",
"eventVersion": 1,
"eventData": {
"registeredOn": "2026-03-31T14:24:23Z",
"messageId": "5bcde4a1-11fd-413e-a9f1-73f3595fe44e",
"conversationId": "803233ba-1935-4a4d-8af5-4bd9a5d45245",
"conversationType": "groupchat",
"sender": {
"senderId": "1e8ee916-ab83-4402-8048-0d949231d586",
"roleType": "User"
},
"recipientId": "803233ba-1935-4a4d-8af5-4bd9a5d45245",
"contentType": "text",
"content": "1",
"replyToMessageId": null,
"isPriority": false,
"statusHistory": {
"currentStatus": "Pending",
"lastUpdatedAt": "2026-03-31T14:24:23Z",
"events": [
{
"status": "Pending",
"timestamp": "2026-03-31T14:24:23Z"
}
]
}
}
}
]
}Message priority
Each message event includes eventData.isPriority, a boolean indicating whether the original message was marked as priority. true means priority; false is the default when the message was not marked as priority or its priority flag is unavailable. The flag describes the original message and is included in sent, delivered, seen, treated, driverSeen, and recalled events.
Content exclusion: For subscriptions with excludeMessageContent enabled, isPriority is returned as false, including for messages originally marked as priority. For these subscriptions, false does not establish that the original message was non-priority.
Compatibility: Older events may omit isPriority. Consumers should treat an absent field as false. The addition of this field does not change eventVersion in the examples.
Field level Description
| Field | Type | Optional/Required | Description |
|---|---|---|---|
| eventBatchId | String (UUID) | Required | A unique identifier for this batch of events. Multiple events occurring close together may be grouped into a single batch. |
| eventSubscriptionId | String (UUID) | Required | A unique identifier representing the subscription through which this event was delivered. It ensures traceability between the event and the organization's registered DHS subscription. |
| eventBatchTime | DateTime (ISO 8601 timestamp, UTC) | Required | The timestamp when this event batch was created and prepared for delivery. |
| eventsData | Array | Required | An array containing one or more message event objects. Multiple messages can be batched together if they occur in close temporal proximity. |
| eventsData[].eventType | String | Required | The type of event. For this event: message.sent. |
| eventsData[].eventVersion | Integer | Required | The version of the event schema. Currently 1. |
| eventsData[].eventData | Object | Required | Contains the message event payload data. |
| eventData.registeredOn | DateTime (ISO 8601 timestamp, UTC) | Required | The timestamp when this event was registered in the system. |
| eventData.messageId | String (UUID) | Required | A globally unique identifier assigned to this specific message instance. Used for message tracking, deduplication, and referencing in subsequent status updates. |
| eventData.conversationId | String | Required | Identifies the conversation (chat or groupchat) in which this message was sent. For chat, this is a composite of sender and recipient IDs. For groupchat, this is the group identifier. |
| eventData.conversationType | String | Required | Indicates the type of conversation where the message was sent. Allowed values: chat — One-to-one conversation between two participants. groupchat — Group conversation with multiple participants. |
| eventData.sender | Object | Required | Contains information about the message sender. |
| eventData.sender.senderId | String (UUID) | Required | The unique identifier of the user who sent the message. |
| eventData.sender.roleType | String | Required | The role of the sender within the system. Examples include: User — Standard user. Driver — Vehicle driver. |
| eventData.recipientId | String (UUID) | Required | The unique identifier of the message recipient. For chat, this is the other participant's ID. For groupchat, this is the group conversation ID. |
| eventData.contentType | String | Required | Specifies the format of the message content. Supported values: text — Plain text message content. image — Image attachment. file — File attachment (currently supports PDF only). |
| eventData.content | String | Optional | The message text when contentType is text, or an optional caption when contentType is image or file. |
| eventData.replyToMessageId | String (UUID) or null | Required | The message ID of the original message being replied to. Set to null if the message is not a reply. |
| eventData.isPriority | Boolean | Required | Indicates whether the original message was marked as priority. true means priority; false is the default when the message was not marked as priority or its priority flag is unavailable. With excludeMessageContent enabled, this field is always false, including for messages originally marked as priority. |
| eventData.statusHistory | Object | Required | Contains the complete status lifecycle information for this message, including current status and historical events. |
| statusHistory.currentStatus | String | Required | The current delivery status of the message. For newly sent messages, this is: Pending — Message has been sent but not yet delivered to recipient(s). |
| statusHistory.lastUpdatedAt | DateTime (ISO 8601 timestamp, UTC) | Required | The timestamp when the message status was last updated. |
| statusHistory.events | Array | Required | An ordered array of status transition events, providing a complete audit trail of the message lifecycle. Each event represents a state change. |
| statusHistory.events[].status | String | Required | The status that the message transitioned to. For this event: Pending — Message was successfully sent from the sender. |
| statusHistory.events[].timestamp | DateTime (ISO 8601 timestamp, UTC) | Required | The timestamp when this specific status transition occurred. |
Updated 20 days ago