---
title: "Messaging API"
url: "https://docs.unified.to/messaging/overview"
description: "API reference for Messaging API. Launch multiple pre-built Messaging integrations today with zero maintenance — all through a single API."
generated_at: "2026-05-22T23:26:12.555Z"
---
# Messaging API

The Unified Messaging API enables developers and product managers to access communication data from multiple messaging platforms through a single, standardized interface. Retrieve channels, messages, and events from Slack, Microsoft Teams, Discord, and other major messaging platforms - all with one API.

## [What is the Unified Messaging API?](#what-is-the-unified-messaging-api)

Messaging platforms like Slack, Microsoft Teams, and Discord each have unique APIs with different authentication methods and data models. The Unified Messaging API normalizes these differences, allowing you to build once and support all major messaging platforms without maintaining separate integrations.

## [Messaging Data Objects](#messaging-data-objects)

The Messaging API provides access to the following standardized objects:

* **Channels**: Channels, rooms, groups, and conversations
* **Events**: Message events, reactions, and activity notifications
* **Messages**: Chat messages, threads, and direct messages

## [Common Use Cases](#common-use-cases)

### [Chatbots & Virtual Assistants](#chatbots-virtual-assistants)

Build chatbots that work across Slack, Teams, Discord, and other messaging platforms. Create a single bot that can respond to messages, answer questions, and automate workflows across all platforms.

### [Message Analytics & Insights](#message-analytics-insights)

Analyze communication patterns across messaging platforms. Track message volume, response times, channel activity, and team collaboration metrics from Slack, Teams, or any supported platform.

### [Cross-Platform Messaging](#cross-platform-messaging)

Create tools that sync messages between different messaging platforms. Bridge communications from Slack to Teams, or enable cross-platform team collaboration.

### [Compliance & Archiving](#compliance-archiving)

Build compliance and archiving tools that capture messages from multiple messaging platforms. Store, search, and analyze messages for regulatory compliance and e-discovery.

### [Workflow Automation](#workflow-automation)

Automate workflows triggered by messaging events. Create tools that perform actions based on specific messages, keywords, or reactions across all messaging platforms.

## [Handling threaded messages](#handling-threaded-messages)

Use the `parent_id` for maximum flexibility in handling threaded messages.

Note: `parent_message_id` and `root_message_id` are deprecated.

`parent_id`: Represents the **immediate predecessor message** in a thread.  
This allows you to identify which message a given message directly replies to.

Threading relationships form a **tree** of messages, where each reply points to its parent

### [Replying to Messages](#replying-to-messages)

* Set `parent_id` to the ID of the message being replied to.

This ensures the reply is properly threaded and appears under the correct message across all integrations that support threaded conversations.

### [Listing Messages in a Thread](#listing-messages-in-a-thread)

You can retrieve messages within a thread using the `parent_id` relationship.

#### [Using the expand Filter](#using-the-expand-filter)

When listing messages, you can set the `expand` filter to `true` to automatically include **all nested descendants** of a message, not just its immediate children.  
This provides a full flat view of the thread hierarchy in a single query.

### [Consistency Across Integrations](#consistency-across-integrations)

Using the `parent_id` structure ensures:

* **Consistent message hierarchy** across sender and receiver systems.
* **Simplified logic** for reconstructing conversation trees.

If a message does **not** include a `parent_id`, it is treated as either:

* A **standalone message**, or
* The **root** of a new thread.

## [Working with Hierarchical Data in Messaging APIs](#working-with-hierarchical-data-in-messaging-apis)

Messaging integrations typically organize data in a hierarchical (tree-like) structure. For detailed guidance on traversing hierarchical data, refer to our guide: [How to traverse hierarchical data](https://docs.unified.to/guides/working%5Fwith%5Fhierarchical%5Ftree%5Fdata%5Fin%5Fstorage%5Fmessaging%5Fand%5Fkms%5Fapis)

[![Run In Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/16228585-a38b869f-6c79-4b37-b300-ac2abc4e9811?action=collection%2Ffork&source=rip%5Fmarkdown&collection-url=entityId%3D16228585-a38b869f-6c79-4b37-b300-ac2abc4e9811%26entityType%3Dcollection%26workspaceId%3D0a62ef4e-9382-41f4-8a59-44c03de1e0d5)

## [Data Model](#data-model)

MESSAGING data model

SVG fallback viewer

[Open SVG](/images/models/UnifiedMessaging.svg)

Loading diagram...

 Share [](http://www.linkedin.com/sharing/share-offsite/?mini=true&url=%2Fmessaging%2Foverview&title=Messaging%20API&summary= "Share to LinkedIn")[](http://www.twitter.com/share?url=%2Fmessaging%2Foverview&text=Messaging%20API&summary= "Share to Twitter")[](http://www.reddit.com/submit?url=%2Fmessaging%2Foverview&title=Messaging%20API&summary= "Share to Reddit")[](https://news.ycombinator.com/submitlink?u=%2Fmessaging%2Foverview&t=Messaging%20API&summary= "Share to Hacker News")

[Working with hierarchical tree data in Storage, Messaging, and KMS APIs](/guides/working%5Fwith%5Fhierarchical%5Ftree%5Fdata%5Fin%5Fstorage%5Fmessaging%5Fand%5Fkms%5Fapis "Working with hierarchical tree data in Storage, Messaging, and KMS APIs")
