Create a Channel for a Custom Platform Event
Create a channel that holds a stream of custom platform events.
USER PERMISSIONS NEEDED | |
---|---|
To create a PlatformEventChannel: | Customize Application |
To use REST API: | API Enabled |
-
Send a POST request to this URI.
/services/data/v57.0/tooling/sobjects/PlatformEventChannel
-
If you’re using Postman, under Tooling, click Post Tooling SObject, and then replace the
:SOBJECT_API_NAME
placeholder withPlatformEventChannel
. -
To configure a channel that receives custom platform event messages, set
channelType
toevent
. Use this example request body. -
Send the request. The response received looks similar to this response.
Now that you created a channel for platform events, add a channel member for one custom platform event. See Create a Channel Member to Associate a Custom Platform Event.
See Also
- Tooling API Developer Guide: PlatformEventChannel
- Metadata API Developer Guide: PlatformEventChannel
- Platform Events Developer Guide: Group Platform Events into One Stream with a Custom Channel