Create a channel that holds a stream of custom platform events.
Required Editions
| User Permissions Needed | |
|---|---|
| To create a PlatformEventChannel: | Customize Application |
-
Send a POST request to this URI.
/services/data/v65.0/tooling/sobjects/PlatformEventChannel - If you’re using Postman, expand Event Platform | Custom Channels | Platform Event, and click Create channel.
-
To configure a channel that receives custom platform event messages, set
channelTypetoevent. The channellabelappears in the event relays UI. Use this example request body. In Postman, click Body, and replace the body with this JSON body.{ "FullName": "Carbon_Comparison_Channel__chn", "Metadata": { "channelType": "event", "label": "Carbon Comparison Channel" } } -
Send the request. The response received looks similar to this response.
{ "id": "0YLRM00000001es4AA", "success": true, "errors": [], "warnings": [], "infos": [] }
Now that you created a channel for platform events, add a channel member for one custom platform event. See Add a Custom Platform Event in a New Channel Member.