Skip to content

Channel:CreateChannel

Creates a Notification Channel and returns the assigned identifier, given the channel parameters and details.

Controller: Channel
Topic: CreateChannel
Action: Publish
Permissions: None

NameTypeExpectDescription
DetailsObjectAlwaysA Channel Details object for identification.
ParametersObjectAlwaysA Channel Parameters object for describing the Channel’s configuration.
IsActiveBooleanSometimesAn optional flag setting whether the Channel should be Active when created. If omitted, defaults to true.
NameTypeExpectDescription
NameStringAlwaysThe user-defined name for the Channel.
DescriptionStringSometimesAn optional description providing further details of the Channel.
MetadataObjectAlwaysAn user-defined object with string values.
NameTypeExpectDescription
TypeStringAlwaysThe Distribution Method to use.
SettingsAnyAlwaysThe settings of the Channel. Format depends on the type.

See Appendix K - Distribution Channels for more information on the appropriate Notification Channel settings for a type.

NameTypeExpectDescription
ChannelIDStringAlwaysA unique identifier of the new Channel.

Send:

{"Controller":"Channel","Topic":"CreateChannel","TransactionID":1,"Data":{
"Parameters":{
"Type":"Push.Web",
"Settings":{
"endpoint":"https://updates.push.services.mozilla.com/wpush/v2/gAAAAABi3j...",
"expirationTime":null,
"keys":{
"auth":"uBw-GNUc...",
"p256dh":"BD0ti6D2A..."
}
}
},
"Details":{
"Name":"ArcLight (Phone)",
"Description":"ArcLight in Firefox Mobile",
"Metadata":{"Category":"Phone"}
},
"IsActive":true
}}

Receive:

{"Controller":"Channel","Topic":"CreateChannel","TransactionID":1,"Data":"Data":{
"ChannelID":"Umk8R2"
}}