REST API: Android Channels: Create
This endpoint creates a notification android channel for a specific application.
POST API url -> /v1/notifications/android-channels
Body Parameters
The following body parameters are possible:
| Field | Type | Description | Required |
|---|---|---|---|
| appId | String | Application id | ✅ |
| name | String | Channel name | ✅ |
| description | String | Description for CMS internal use | ✅ |
| lightColorHex | String | Sets the notification light color if lights are enabled and the device supports that feature. Hex color without transparency. Example: #0D47A1 |
Optional |
| vibrationPattern | String | Describes the vibration pattern of a notification. Accepted values: • NONE - no vibration • SHORT_LONG_SHORT - arrayOf(0, 100, 100, 400, 100, 100) • SINGLE_SHORT_IMPULSE - arrayOf(0, 800) • FAST_SHORT_BEEP - arrayOf(0, 50, 50, 50, 50, 50, 50, 50) • LONG_DRAMATIC - arrayOf(0, 500, 200, 500) • PULSATING - arrayOf(0, 200, 100, 200, 100, 200) • LONG_SHORT • SHORT_LONG - arrayOf(0, 100, 50, 300) • LONG_SHORT - arrayOf(0, 300, 50, 100) • TRIPLE_TAP - arrayOf(0, 100, 100, 100, 100, 100) • DOUBLE_TAP - arrayOf(0, 100, 100, 100) • SHORT_SINGLE - arrayOf(0, 100) The vibrationPattern field uses the same semantics as Android Notification Channel Vibration Pattern. See the Android Notification Channel Vibration Pattern |
✅ |
| lockscreenVisibility | String | How to display notification on the lockscreen. Accepted values: • PUBLIC - such a notification can be read even in an "insecure" context (that is, above a secure lockscreen) • PRIVATE - notification's icon and tickerText (if available) are shown in all situations but the contents are only available if the device is unlocked for the appropriate user • SECRET - which will suppress its icon and ticker until the user has bypassed the lockscreen. The lockscreenVisibility field uses the same semantics as Android Notification Lock Screen Visibility. See the Android Notification Lock Screen Visibility |
✅ |
| importance | String | Channel importance affects the interruption level of all notifications posted in the channel. Accepted values: • HIGH - Makes a sound and appears as a heads-up notification. • DEFAULT- Makes a sound. • LOW - Makes no sound. • MIN - Makes no sound and doesn't appear in the status bar. The importance field uses the same semantics and values as Android Notification Channel importance. See the Android Notification Channel importance |
✅ |
| priority | String | Accepted values: • HIGH- Higher notification priority for setPriority, for more important notifications or alerts. The UI may choose to show these items larger, or at a different position in notification lists, compared with your app's NORMAL items. • NORMAL - Default notification priority. If your application does not prioritize its own notifications, use this value for all notifications. |
✅ |
| bypassDND | Boolean | Sets whether or not notifications can interrupt the user in Do Not Disturb mode. | ✅ |
| showBadge | Boolean | Indicates if a notification should display a badge. The showBadge field uses the same semantics as Android Notification Channel Show Badge. See the Android Notification Channel Show Badge |
✅ |
Response Examples
Returns android channel id or error message