---
source_url: https://www.pubnub.com/docs/chat/swift-chat-sdk/build/features/messages/forward
title: Forward messages
updated_at: 2026-06-03T11:40:22.878Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Forward messages

Forward messages between channels to share information or facilitate collaboration.

Use the `forward()` method on a message object or a channel object. Both produce the same result with different input parameters.

:::note Additional info in the forwarded message
Forwarded messages include `originalPublisher` (original sender's user ID) and `originalChannelId` (source channel ID).
:::

### Method signature

These methods take the following parameters:

* forward() (on the Message object) 1message.forward(2 channelId: String3) async throws -> Timetoken
* forward() (on the Channel object) 1channel.forward(2 message: MessageImpl3) async throws -> Timetoken

#### Input

| Parameter | Required for Message | Required in Channel | Description |
| --- | --- | --- | --- |
| channelId | String | Optional |  | Yes | No | Unique identifier of the channel to which you want to forward the message. You can forward a message to the same channel on which it was published or to any other. |
| message | MessageImpl | Optional |  | No | Yes | [MessageImpl object](https://www.pubnub.com/docs/chat/swift-chat-sdk/learn/chat-entities/message) that you want to forward to the selected channel. |

#### Output

| Parameter | Description |
| --- | --- |
| `Timetoken` | Timetoken of the forwarded message. |

### Sample code

:::tip Sample code
The code samples in Swift Chat SDK focus on asynchronous code execution.
You can also write synchronous code as the parameters are shared between the async and sync methods but we don't provide usage examples of such.
:::

Forward the latest message from the `support` channel to the `incident-management` channel.

* forward() (on the Message object) // Assumes a "ChatImpl" reference named "chat" Task { if let channel = try await chat.getChannel(channelId: "support") { if let message = try await channel.getHistory(count: 1).messages.first { let timetoken = try await message.forward(channelId: "incident-management") debugPrint("Message forwarded successfully with timetoken: \(timetoken)") } else { debugPrint("No messages found in history") } } else { debugPrint("No channel found") } }
* forward() (on the Channel object) // Assumes a "ChatImpl" reference named "chat" Task { if let channel = try await chat.getChannel(channelId: "support") { if let message = try await channel.getHistory(count: 1).messages.first { if let incidentChannel = try await chat.getChannel(channelId: "incident-management") { let timetoken = try await incidentChannel.forward(message: message) debugPrint("Message forwarded successfully with timetoken: \(timetoken)") } } else { debugPrint("No messages found in history") } } }