You are here:
Create a Channel and Channel Members
You can create a channel and add members by using Tooling API. A channel is a stream of
events. It contains members that specify the type of events that can be received on the channel. A
channel can contain a stream of platform events, including real-time event monitoring events, or
change data capture events. For a channel of change data capture events, you can select the
standard ChangeEvents channel instead of creating a custom
channel.
To learn about custom channels and the standard ChangeEvents channel, see Event Channels.
Prerequisite: Set Up a REST API Tool
The setup steps in this section use the Tooling REST API. To complete the steps, you can use your favorite REST API tool. We recommend using Postman with the Salesforce API Collection, which contains handy templates for Salesforce API calls, including calls for creating channels and channel members. For instructions on how to set up Postman, see Quick Start: Connect Postman to Salesforce in Trailhead.
Create a Channel for Custom Platform Events or Change Events
To create a channel and channel member for custom platform events, complete the steps in this section for custom platform events. To create a channel and channel member for change events, complete the steps in this section for change events.
After creating a channel, you can add members to the channel. Each member represents one event type. A channel can have multiple members.
"eventType":
"monitoring" field, and the selectedEntity field
in PlatformEventChannelMember references the API name of the event without the __e suffix. For the complete steps, see Create a Custom Channel and Add Real-Time Event Monitoring
Events with Tooling API in the Platform Events Developer Guide.- Create a Channel for a Custom Platform Event
Create a channel that holds a stream of custom platform events. - Add a Custom Platform Event in a New Channel Member
To add a platform event to the channel that you created, create a channel member. - Create a Channel for a Change Event
Create a channel that holds a stream of change data capture events. - Add a Change Event in a New Channel Member
To add a change event to the channel that you created, add a channel member.

