addAndroidNotificationChannel

Creates new notification channels and updates existing ones. Updateable parameters include channel name, description, and default. This method requires your development API clientKey.

Leanplum will not interfere with any channel defined directly in your app code or by other mobile marketing providers. For instance, if your app has both a “Promotions” channel and a “Transactional” channel, but your marketer should only have access to Promotions, then you should only send that channel to Leanplum.

Body Params

JSON request body with variables and values.

string
required
Defaults to YOUR_APP_ID

The application ID. To find yours, select your app in the navigation column, and click Manage Apps. Then click Keys & Settings.

string
required
Defaults to YOUR_DEV_KEY

The Development key for your Leanplum App.

string
enum
required
Defaults to 1.0.6

The version of the Leanplum API to use. The current version is 1.0.6.

Allowed:
string
required

The channel ID. Also used when updating existing channels.

string
required

The human-readable name that will appear on the Leanplum dashboard (e.g. Promotions, Transactional, etc.). Should be distinguishable from all other channel names.

number
required
Defaults to 3

Sets the importance of all notifications in the channel, which determines how much the channel can interrupt the user. The default is 3: notifications will show everywhere, make noise, but does not visually intrude. For more, see the Android documentation.

string

The user-visible description of this channel.

string

See Android docs here.

boolean

Whether to enable lights.

number

See Android docs for available colors.

boolean

Whether to enable vibration.

vibrationPattern
array of numbers

See Android docs here.

vibrationPattern
number

See Android documentation here.

boolean

See Android docs here.

boolean

Whether to show badge.

string

URI of sound file, which must be stored locally on the device. See Andoroid Docs here.

boolean

This is a Leanplum parameter, indicating whether this channel should be the default channel referenced in the dashboard. Leanplum automatically defines the first channel you create as the “default” channel, preventing the dashboard user from having to manually choose a channel for every campaign.

Response

Language
Credentials
URL
Response
Choose an example:
application/json