Create a Channel for a Custom Platform Event

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 or change data capture events, but not both.

USER PERMISSIONS NEEDED
To create a PlatformEventChannel:Customize Application
To use REST API:API Enabled
  1. Send a POST request to this URI:

    /services/data/v56.0/tooling/sobjects/PlatformEventChannel

  2. If you’re using Postman, under Tooling, click Post Tooling SObject, and then replace the :SOBJECT_API_NAME placeholder with PlatformEventChannel.

  3. Use this example request body.

  4. Send the request. The response received looks similar to this response.

To configure a channel that receives custom platform event messages, set channelType to event, like in this example. To configure a channel that receives change data capture event messages, set channelType to data, as follows: "channelType": "data".

For more information, see PlatformEventChannel in the Tooling API Developer Guide.