Push

Updated at:

Pushes notifications or messages to different device endpoints and provides rich custom parameters to implement push behaviors in various scenarios.

Operation description

Before you use this operation, make sure that you fully understand the billing methods and pricing of Enterprise Mobile Application Service (EMAS) Mobile Push.

This operation distinguishes between the Android, iOS, and HarmonyOS platforms. For push calls on different platforms, you must pass the AppKey corresponding to the platform.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mpush:Push

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

AppKey

integer

Yes

The AppKey information.

23267207

PushType

string

Yes

The push type. Valid values:

  • NOTICE: Notification. Notifications are delivered to device endpoints through vendor channels such as APNs, Huawei, Xiaomi, and HarmonyOS, and are directly displayed in the notification bar of the device. When an Android device is online (the app process is alive), the notification is preferentially delivered through the Alibaba Cloud proprietary channel. The push SDK constructs and displays the notification to achieve better push performance and save vendor push message quotas in certain scenarios.

  • MESSAGE: Message. Messages are delivered through the Alibaba Cloud proprietary online channel and are not displayed in the notification bar by default. The app must receive and process the message when the process is active, and the business logic determines whether to trigger specific business behaviors. When the device is offline (the app process is inactive), the message cannot be received in a timely manner. In this case, you can use the iOSRemind or AndroidRemind parameter to convert the message into a notification for delivery when the device is offline. Alternatively, you can set the StoreOffline parameter to allow the push system to save the message when the device is offline and automatically deliver the message when the device comes online.

Valid values:

  • MESSAGE
  • NOTICE

MESSAGE

DeviceType

string

Yes

The device type. Valid values:

  • HARMONY: HarmonyOS devices.

  • iOS: iOS devices.

  • ANDROID: Android devices.

  • ALL: If the AppKey belongs to a legacy dual-platform application, this value indicates that the push is sent to both Android and iOS devices. If the AppKey belongs to a new single-platform application, the effect is the same as specifying the device type corresponding to the application type.

Valid values:

  • ALL :

    ALL

  • ANDROID :

    ANDROID

  • iOS :

    iOS

HARMONY

Target

string

Yes

The push target. Valid values:

  • DEVICE: Pushes to specific devices.

  • ACCOUNT: Pushes to specific accounts.

  • ALIAS: Pushes to specific aliases.

  • TAG: Pushes to specific tags.

  • ALL: Pushes to all devices. The interval between two full pushes for the same DeviceType must be at least 1 second.

Note

A full push to iOS devices is delivered to devices that have been active but not uninstalled within the last 24 months. Once Apple Push Notification service (APNs) receives the push request and does not return an error message, the push is considered delivered. This may cause a surge in the number of active devices and incur high costs. Use this value with caution.

  • TBD: Initializes a continuous push. The push target is specified by the subsequent ContinuouslyPush operation.

Valid values:

  • ALL
  • DEVICE
  • ACCOUNT
  • ALIAS
  • TAG
  • TBD
  • FILE

ALL

TargetValue

string

Yes

The target value, which is set based on the Target type. Separate multiple values with commas. If the number of values exceeds the limit, you must send multiple push requests.

  • If Target is set to DEVICE, the value is in the format of deviceid1,deviceid2. A maximum of 1,000 devices are supported.

  • If Target is set to ACCOUNT, the value is in the format of account1,account2. A maximum of 1,000 accounts are supported.

  • If Target is set to ALIAS, the value is in the format of alias1,alias2. A maximum of 1,000 aliases are supported.

  • If Target is set to TAG, single and multiple tags are supported. For more information about the format, see Tag format.

  • If Target is set to ALL, the value is ALL, which is a fixed parameter combination for full pushes.

  • If Target is set to TBD, the value is TBD, which is a fixed parameter combination for continuous pushes.

ALL

StoreOffline

boolean

No

Specifies whether to save offline messages and notifications. Default value: false.

If this parameter is set to true and the user is offline during the push, the message or notification is sent again when the user comes online within the expiration time specified by ExpireTime. The default value of ExpireTime is 72 hours. iOS notifications are delivered through the APNs channel and are not affected by StoreOffline.

false

SendChannels

string

No

The specified delivery channels. Valid values:

  • accs: Alibaba Cloud proprietary channel

  • huawei: Huawei channel

  • honor: Honor channel

  • xiaomi: Xiaomi channel

  • oppo: OPPO channel

  • vivo: vivo channel

  • meizu: Meizu channel

  • gcm: Google GCM channel (legacy HTTP)

  • fcm: Google Firebase channel (HTTP v1 API)

  • apns: APNs channel

  • harmony: HarmonyOS channel

Note
  • If this parameter is not configured, all channels are available.

  • If this parameter is configured, only the specified channels are used.

  • If the configured channels conflict with the delivery policy (for example, iOS notifications are delivered only through the APNs channel, but apns is not included in this parameter), the push is not delivered.

  • If gcm is configured, both Google GCM and FCM channels can be used. If fcm is configured, only the Google FCM channel can be used.

accs,huawei,xiaomi

PushTime

string

No

The scheduled delivery time. If this parameter is not set, the push is delivered immediately. The scheduled delivery time cannot be later than 7 days from the current time.

Specify the time in the ISO 8601 standard. The time must be in UTC and in the YYYY-MM-DDThh:mm:ssZ format.

Note

If Target is set to TBD (continuous push), scheduled delivery is not supported.

2019-02-20T00:00:00Z

ExpireTime

string

No

The expiration time of offline messages and notifications. This parameter is used together with StoreOffline. Expired messages and notifications are not delivered. The maximum retention period is 72 hours. Default value: 72 hours.

Specify the time in the ISO 8601 standard. The time must be in UTC and in the YYYY-MM-DDThh:mm:ssZ format. The expiration time cannot be earlier than the current time or the scheduled delivery time plus 3 seconds (ExpireTime > PushTime + 3 seconds). The 3-second buffer is used to compensate for network and system latency errors. Set the expiration time to no less than 1 minute for single pushes and no less than 10 minutes for full pushes and batch pushes.

2019-02-20T00:00:00Z

JobKey

string

No

The custom identifier of the push task. If JobKey is not empty, this field is included in the receipt log. For more information, see Receipt logs.

Note

Format requirements: The value can contain only letters, digits, underscores (_), and hyphens (-). The value cannot exceed 32 characters in length.

123

Title

string

No

The title of the notification or message during the push. Maximum length: 200 bytes.

This parameter is required for Android and HarmonyOS pushes. This parameter is optional for iOS notifications. If this parameter is specified:

  • For iOS 10 and later, the title is displayed in the notification.

  • For iOS 8.2 to iOS 9.x, the title replaces the application name in the notification.

title

Body

string

No

The content of the notification or message for Android and HarmonyOS pushes, or the content of the iOS message or notification. The content size is limited. For more information, see Product limits.

hello

Trim

boolean

No

Specifies whether to automatically truncate excessively long titles and content.

Note

This parameter applies only to vendor channels that explicitly limit the length of titles and content. It does not apply to channels such as APNs, Huawei, and Honor, which do not limit the length of titles and content but only limit the total request body size.

false

iOSApnsEnv

string

No

To send iOS notifications through the APNs center, you must specify the corresponding environment context. Valid values:

  • DEV: The development environment. This value applies to applications that are directly installed and debugged by using Xcode.

  • PRODUCT: The production environment. This value applies to applications distributed through the App Store, TestFlight, Ad Hoc, and enterprise distribution.

Valid values:

  • DEV :

    DEV

  • PRODUCT :

    PRODUCT

DEV

iOSRemind

boolean

No

Specifies whether to convert an offline message into a notification. If the device is offline during a message push (that is, the persistent connection channel to the Mobile Push server is disconnected), the push is delivered once as a notification through the Apple APNs channel.

Note

Converting offline messages into notifications applies only to the production environment.

true

iOSSubtitle

string

No

The subtitle of the iOS notification (iOS 10 and later).

su'b

iOSRemindBody

string

No

The iOS notification content used when an iOS message is converted into a notification. This parameter is valid only when iOSApnsEnv is set to PRODUCT and iOSRemind is set to true.

iOS notification body

iOSMusic

string

No

The sound of the iOS notification. Specify the name of the audio file stored in the app bundle or the sandbox Library/Sounds directory. For more information, see How to set the notification sound for iOS pushes.

If this parameter is set to an empty string (""), the notification is silent. If this parameter is not set, the default value is default, which indicates the system prompt sound.

""

iOSBadge

integer

No

The badge number displayed in the upper-right corner of the iOS application icon.

Note

If iOSBadgeAutoIncrement is set to true, this parameter must be left empty.

0

iOSBadgeAutoIncrement

boolean

No

Specifies whether to enable the automatic badge increment feature. Default value: false.

Note

When this parameter is set to true, iOSBadge must be left empty.

The automatic badge increment feature maintains the badge count for each device on the push server. This feature requires SDK version 1.9.5 or later, and users must actively synchronize the badge number to the server.

true

iOSSilentNotification

boolean

No

Specifies whether to enable iOS silent notifications.

true

iOSMutableContent

boolean

No

The iOS notification processing extension flag (iOS 10 and later). If this parameter is set to true, the notification pushed by APNs can reach the extension for processing before it is displayed. This parameter must be set to true for silent notifications.

true

iOSNotificationCategory

string

No

The category of the iOS notification (iOS 10 and later).

ios

iOSNotificationCollapseId

string

No

The collapse ID of the iOS notification. If a device receives messages with the same CollapseId, the messages are merged into one. If the device is offline and continuously receives messages with the same CollapseId, only one notification is displayed in the notification bar. This parameter is supported in iOS 10 and later.

ZD2011

iOSNotificationThreadId

string

No

The thread ID used to group iOS remote notifications and mark the identifier of the collapsed group. This parameter is supported only in iOS 12.0 and later.

abc

iOSInterruptionLevel

string

No

The interruption level. Valid values:

  • passive: The system adds the notification to the notification list without lighting up the screen or playing a sound.

  • active: The system immediately displays the notification, lights up the screen, and can play a sound.

  • time-sensitive: The system immediately presents the notification, lights up the screen, and can play a sound, but does not break through the system notification controls.

  • critical: The system immediately displays the notification, lights up the screen, and plays a sound bypassing the silent switch.

active

iOSRelevanceScore

number

No

The relevance score for summary highlighting. Valid values: a floating-point number in the range of [0,1].

0.01

iOSExtParameters

string

No

The extension property of the iOS notification.

For iOS 10 and later, you can specify the resource URL for rich media push notifications in this parameter: {"attachment": "https://www.example.com/notification_pic.png"}. This parameter must be passed in the JSON map format. Otherwise, a parse error occurs.

{"attachment": "https://www.example.com/notification_pic.png"}

iOSLiveActivityEvent

string

No

The event to start, update, or end a Live Activity. Valid values: start, update, and end.

Valid values:

  • start
  • update
  • end

start

iOSLiveActivityId

string

No

The Live Activity ID reported by the device to the user server. This is the unique identifier of the Live Activity.

66B94673-B32E-4CA7-863C-3E523054FD46

iOSLiveActivityAttributesType

string

No

The type of the Live Activity to be started.

Note

This parameter is required when iOSLiveActivityEvent is set to start.

OrderActivityAttributes

iOSLiveActivityAttributes

string

No

The JSON string that contains the static pass-through parameters for Dynamic Island pushes. Static parameter includes static user-defined information, such as product numbers and order information.

Note

Static parameter is required when iOSLiveActivityEvent is set to start.

{"orderId": "12345", "product": "Shoes"}

iOSLiveActivityContentState

string

No

The pass-through dynamic parameter for Dynamic Island pushes. This parameter includes real-time update information, such as price and inventory changes.

{"status": "delivered", "estimatedArrival": "2023-12-31T12:00:00Z"}

iOSLiveActivityDismissalDate

integer

No

The UNIX timestamp in seconds. The ended Live Activity is retained on the Lock Screen until the specified time. The maximum retention period is 4 hours.

1743131967

iOSLiveActivityStaleDate

integer

No

The UNIX timestamp in seconds that marks the expiration time of the activity content.

1743131967

AndroidNotifyType

string

No

The reminder method for the notification. Valid values:

  • VIBRATE: Vibrate. This is the default value.

  • SOUND: Sound.

  • BOTH: Sound and vibrate.

  • NONE: Silent.

Valid values:

  • NONE
  • VIBRATE
  • SOUND
  • BOTH

BOTH

AndroidRemind

boolean

No

Specifies whether to use the auxiliary pop-up window feature when the device is offline and the push type is message. Default value: false. This parameter takes effect only when PushType is set to MESSAGE.

If the message is successfully converted into a notification and pushed, the data displayed in the received notification is the value of the AndroidPopupTitle and AndroidPopupBody parameters set on the server. When the notification is clicked, the data obtained in the onSysNoticeOpened method of the auxiliary pop-up window is the value of the Title and Body parameters set on the server.

true

AndroidOpenType

string

No

The action performed after the notification is clicked. Valid values:

  • APPLICATION: Opens the application. This is the default value.

  • ACTIVITY: Opens the specified Android activity of the application.

  • URL: Opens the specified URL.

  • NONE: Performs no redirection.

Valid values:

  • APPLICATION
  • ACTIVITY
  • URL
  • NONE

APPLICATION

AndroidActivity

string

No

The activity to be opened by the notification.

This parameter is passed only when AndroidOpenType is set to ACTIVITY. Example: com.alibaba.cloudpushdemo.bizactivity.

com.alibaba.cloudpushdemo.bizactivity

AndroidOpenUrl

string

No

The URL to be opened after the Android device receives the push.

This parameter is passed only when AndroidOpenType is set to URL.

https://www.example.com

AndroidPopupActivity

string

No

The activity to which the user is redirected after the notification is clicked.

com.alibaba.cloudpushdemo.bizactivity

AndroidPopupTitle

string

No

The title content in auxiliary pop-up window mode. This parameter is required when the AndroidPopupActivity parameter is not empty.

Maximum length: 50 characters. Both Chinese and English characters count as one character.

If a vendor channel is used, the content must also meet the limits of the vendor channel. For more information, see Limits on auxiliary channel pushes for Android.

hello

AndroidPopupBody

string

No

The body content in auxiliary pop-up window mode. This parameter is required when the AndroidPopupActivity parameter is not empty.

Maximum length: 200 characters. Both Chinese and English characters count as one character.

If a vendor channel is used, the content must also meet the limits of the vendor channel. For more information, see Limits on auxiliary channel pushes for Android.

hello

AndroidRenderStyle

integer

No

The notification style. Valid values:

  • 0: Standard mode. This is the default value.

  • 1: Long text mode. This mode is supported by Huawei, Honor, Xiaomi, OPPO, Meizu, and the proprietary channel.

  • 2: Big picture mode. This mode is supported by the proprietary channel but not by Xiaomi models.

  • 3: List mode. This mode is supported by Huawei, Honor, Xiaomi, OPPO, and the proprietary channel.

Note

This parameter must be provided if a non-standard mode is used.

Valid values:

  • 0 :

    0

  • 1 :

    1

  • 2 :

    2

1

AndroidBigTitle

string

No

The title in long text mode. Maximum length: 200 bytes. One Chinese character counts as 3 bytes.

  • This parameter is currently supported only by the Honor channel and the Huawei channel with EMUI 11 and later.

  • If this parameter is not provided in long text mode, the first non-empty value from Title and AndroidPopupTitle is used.

Sample long title

AndroidBigBody

string

No

The body in long text mode. Maximum length: 1,000 bytes. One Chinese character counts as 3 bytes. The actual limit is subject to the specific vendor channel during delivery.

This parameter is currently supported by:

  • Huawei: EMUI 10 and later

  • Honor: Magic UI 4.0 and later

  • Xiaomi: MIUI 10 and later

  • OPPO: ColorOS 5.0 and later

  • Meizu: Flyme

  • Proprietary channel: Android SDK 3.6.0 and later

Note

If this parameter is not provided in long text mode, the first non-empty value from Body and AndroidPopupBody is used.

Sample long text

AndroidBigPictureUrl

string

No

The image URL in big picture mode. This parameter is currently supported by the proprietary channel with Android SDK 3.6.0 and later.

https://imag.example.com/image.png

AndroidXiaomiBigPictureUrl deprecated

string

No

[Deprecated] This parameter is deprecated. Starting from August 2023, Xiaomi officially no longer supports dynamically setting small icons, right-side icons, and big pictures during pushes on new devices and systems.

https://f6.market.xiaomi.com/download/MiPass/aaa/bbb.png

AndroidImageUrl

string

No

The URL of the right-side icon. This parameter is currently supported by:

  • Huawei EMUI: applicable only in long text mode and inbox mode.

  • Honor Magic UI: applicable only in long text mode.

  • Proprietary channel: Android SDK 3.5.0 and later.

https://imag.example.com/image.png

AndroidXiaomiImageUrl deprecated

string

No

[Deprecated] This parameter is deprecated. Starting from August 2023, Xiaomi officially no longer supports dynamically setting small icons, right-side icons, and big pictures during pushes on new devices and systems.

https://imag.example.com/image.png

AndroidInboxBody

string

No

The body in inbox mode. The content must be a valid JSON array with no more than 5 elements. This parameter is currently supported by:

  • Huawei: EMUI 9 and later

  • Honor: Magic UI 4.0 and later

  • Xiaomi: MIUI 10 and later

  • OPPO: ColorOS 5.0 and later

  • Proprietary channel: Android SDK 3.6.0 and later

["First line","Second line"]

AndroidNotificationBarType

integer

No

The custom notification bar style for Android. Valid values: 1 to 100.

2

AndroidNotificationBarPriority

integer

No

The priority of the Android notification display position in the notification bar. Valid values: -2, -1, 0, 1, and 2.

0

AndroidNotificationNotifyId

integer

No

The unique identifier of each message when displayed in the notification bar. Different notification bar messages can use the same NotifyId to allow new notification bar messages to overwrite old ones.

100001

AndroidNotificationChannel

string

No

The channel ID of the Android application. This value must match the channel ID in the application.

  • For more information about the NotificationChannel parameter, see FAQ: Notifications are not received on devices running Android 8.0 and later.

  • Because the channel_id of the OPPO private message channel is the same as the channel ID of the application, this value is used as the channel_id for OPPO channel pushes.

  • This value is used as the channel_id for Huawei, FCM, and Alibaba Cloud proprietary channel pushes.

1

AndroidNotificationHuaweiChannel

string

No

The importance parameter for Huawei notification message classification, which determines the notification behavior on user devices. Valid values:

  • LOW: Information and marketing messages.

  • NORMAL: Service and communication messages.

Note
  • For the Huawei channel, use AndroidMessageHuaweiCategory for notification classification instead of AndroidNotificationHuaweiChannel.

  • You must apply for this permission on the Huawei platform. For more information, see Application link.

Valid values:

  • LOW :

    LOW

  • NORMAL :

    NORMAL

LOW

AndroidNotificationHonorChannel

string

No

The importance parameter for Honor notification message classification, which determines the notification behavior on user devices. Valid values:

  • LOW: Information and marketing messages.

  • NORMAL: Service and communication messages.

You must apply for this permission on the Honor platform. For more information, see Application link.

Valid values:

  • LOW :

    LOW

  • NORMAL :

    NORMAL

LOW

AndroidNotificationXiaomiChannel

string

No

The channel ID for Xiaomi notification types. You must apply for this permission on the Xiaomi platform. For more information, see Application link.

Note
  • A single application can apply for a maximum of 8 channels on the Xiaomi channel. Plan ahead.

michannel

AndroidNotificationVivoChannel

string

No

The classification for vivo notification messages. Valid values:

  • 0: Operational messages. This is the default value.

  • 1: System messages.

Note
  • For the vivo channel, use AndroidMessageVivoCategory for notification classification instead of AndroidNotificationVivoChannel.

  • You must apply for this permission on the vivo platform. For more information, see Application link.

Valid values:

  • 0 :

    0

  • 1 :

    1

classification

AndroidNotificationGroup

string

No

The message group. For messages in the same group, only the latest message and the total number of messages received in the group are displayed in the notification bar. All messages are not displayed and cannot be expanded. This parameter is currently supported by:

  • Huawei vendor channel

  • Honor vendor channel

  • Proprietary channel: Android SDK 3.9.1 and earlier

Note

The proprietary channel no longer supports this parameter in Android SDK 3.9.2 and later.

group-1

AndroidNotificationThreadId

string

No

The message thread ID. Messages in the same group are collapsed and can be expanded in the notification bar. Notifications in different groups are displayed separately. This parameter is currently supported by:

  • Proprietary channel: Android SDK 3.9.2 and later

thread-1

AndroidExtParameters

string

No

The extended properties of the notification. This parameter does not take effect when the push type PushType is set to MESSAGE.

This parameter must be passed in the JSON map format. Otherwise, a parsing error occurs.

{"key1":"value1","api_name":"PushNoticeToAndroidRequest"}

AndroidMessageHuaweiUrgency

string

No

The delivery priority for Huawei channel notifications. Valid values:

  • HIGH

  • NORMAL

You must apply for this permission. For more information, see Application link.

Valid values:

  • HIGH :

    HIGH

  • NORMAL :

    NORMAL

HIGH

AndroidMessageHuaweiCategory

string

No

Purpose 1: After you complete the self-classification permission application, this parameter is used to identify the message type, determine the message reminder method, and accelerate the delivery of specific types of messages. For valid values, refer to the message classification standards in the official Huawei push documentation, and fill in the "Cloud notification category value" or "Local notification category value" in the document table.

Purpose 2: After you apply for special permissions, this parameter is used to identify high-priority pass-through scenarios. Valid values:

  • VOIP: Audio and video calls.

  • PLAY_VOICE: Voice broadcast.

Note

If the "Cloud notification category value" is "Not applicable", the message is delivered through the Alibaba Cloud proprietary channel. If the "Local notification category value" is "Not applicable", the message is delivered through the Huawei channel.

VOIP

AndroidMessageOppoCategory

string

No

OPPO message categorization includes two categories for management: Communication and Services, and Content and Marketing.

Communication and Services (requires permission application):

  • IM: Instant chat, audio calls, and video calls.

  • ACCOUNT: Individual account and asset changes.

  • DEVICE_REMINDER: Personal device reminders.

  • ORDER: Personal order and logistics status changes.

  • TODO: Personal schedules and to-do lists.

  • SUBSCRIPTION: Individual subscribe.

Content and Marketing:

  • NEWS: News and information.

  • CONTENT: Content recommendations.

  • MARKETING: Platform activities.

  • SOCIAL: Social updates.

For more information, see OPUSH message categorization rules.

MARKETING

AndroidMessageOppoNotifyLevel

integer

No

The notification level for OPPO channel notification bar messages. Valid values:

  • 1: Notification bar.

  • 2: Notification bar, lock screen, ringtone, and vibrate. This is the default notification level for Communication and Services messages.

  • 16: Notification bar, lock screen, ringtone, vibrate, and banner. This level requires permission application.

Note

When you use the AndroidMessageOppoNotifyLevel parameter, you must also pass the AndroidMessageOppoCategory parameter.

1

AndroidMessageVivoCategory

string

No

vivo message categorization includes two categories for management: System Messages and Operational Messages. System Messages:

  • IM: Instant messages.

  • ACCOUNT: Accounts and assets.

  • TODO: Schedules and to-do lists.

  • DEVICE_REMINDER: Device information.

  • ORDER: Orders and logistics.

  • SUBSCRIPTION: Subscribe reminders.

Operational Messages:

  • NEWS: News.

  • CONTENT: Content recommendations.

  • MARKETING: Operational activity.

  • SOCIAL: Social updates.

For more information, see Categorization description.

TODO

AndroidTargetUserType

integer

No

Settings of the notification type for vendor channels. Valid values:

  • 0: Formal notification. This is the default value.

  • 1: Test notification.

Note
  • The parameter settings is equivalent to configuring the AndroidHuaweiTargetUserType, AndroidHonorTargetUserType, AndroidVivoPushMode, and AndroidOppoIntentEnv parameters at the same time. The corresponding parameters for specific vendor channels can overwrite this parameter.

  • This parameter is currently supported by the Huawei channel, Honor channel, vivo channel, and OPPO Fluid Cloud.

Valid values:

  • 0
  • 1

0

AndroidHuaweiTargetUserType

integer

No

The notification type for the Huawei channel. Valid values:

  • 0: Formal notification. This is the default value.

  • 1: Test notification.

Note

Each application can send 500 test notifications per day, which is not subject to the daily push limit per device.

Valid values:

  • 0 :

    0

  • 1 :

    1

0

AndroidHonorTargetUserType

integer

No

The notification type for the Honor channel. Valid values:

  • 0: Formal notification. This is the default value.

  • 1: Test notification.

Note

Each application can send 1,000 test notifications per day, which is not subject to the daily push limit per device.

Valid values:

  • 0
  • 1

0

AndroidVivoPushMode

integer

No

The notification type for the vivo channel. Valid values:

  • 0: Formal push. This is the default value.

  • 1: Test push.

Note

For test pushes, configure the test devices in the vivo console in advance. You can obtain the RegId of the test device by searching for "onReceiveRegId regId" in the device startup log.

Valid values:

  • 0 :

    0

  • 1 :

    1

0

AndroidOppoIntentEnv

integer

No

The push environment for OPPO Fluid Cloud. Valid values:

  • 0: Formal environment. This is the default value.

  • 1: Test environment.

Note

For the OPPO Fluid Cloud test environment, refer to Environment setup to set up the client.

Valid values:

  • 0
  • 1

1

AndroidHuaweiBusinessType

integer

No

The Huawei quick notification parameter. Valid values:

  • 0: Sends a standard Huawei notification. This is the default value.

  • 1: Sends a Huawei quick notification.

Valid values:

  • 0
  • 1

1

AndroidHuaweiReceiptId

string

No

The receipt ID for the Huawei channel. You can view this receipt ID in the receipt parameter settings of the Huawei push operations platform.

Note

If the default receipt configuration on the Huawei push operations platform is set to the Alibaba Cloud receipt, you do not need to provide this parameter. Otherwise, configure the default receipt ID for the Huawei channel in the Alibaba Cloud EMAS Mobile Push console first.

RCP4C123456

AndroidVivoReceiptId

string

No

The receipt ID for the vivo channel. You can view this receipt ID in the application information of the push service on the vivo Open Platform.

Note

If the default receipt configuration on the vivo Open Platform is set to the Alibaba Cloud receipt, you do not need to provide this parameter. Otherwise, configure the default receipt ID for the vivo channel in the Alibaba Cloud EMAS Mobile Push console first.

123

AndroidBadgeClass

string

No

The fully qualified class name of the application entry Activity for badge settings.

Note

This parameter is valid only for pushes through the Huawei or Honor vendor channel.

com.alibaba.cloudpushdemo.bizactivity

AndroidBadgeAddNum

integer

No

The increment value for the badge number. This value is added to the existing badge number. Valid values: 1 to 99.

Note

This parameter is valid only for pushes through the Huawei or Honor vendor channel. If both AndroidBadgeAddNum and AndroidBadgeSetNum are specified, AndroidBadgeSetNum takes precedence.

1

AndroidBadgeSetNum

integer

No

The fixed value for the badge number. Valid values: 0 to 99.

Note

This parameter takes effect only for the Huawei and Honor channels when pushing through vendor channels. When pushing through the Alibaba Cloud proprietary channel, this parameter takes effect only on Huawei, Honor, and vivo devices.

5

AndroidMusic

string

No

The notification sound for the Huawei vendor channel. Specify the name of the audio file stored in the app/src/main/res/raw/ directory of the client project. Do not include the file extension.

If this parameter is not specified, the default ringtone is used.

alicloud_notification_sound

HarmonyRemind

boolean

No

Specifies whether to use the auxiliary pop-up window feature when a push message is sent but the device is offline. This parameter takes effect only when PushType is set to MESSAGE. Default value: false.

If the message is successfully converted to a notification and pushed, the received notification displays the data specified by the HarmonyRemindTitle and HarmonyRemindBody parameters on the server.

false

HarmonyRemindTitle

string

No

The HarmonyOS notification title used when a HarmonyOS message is converted to a notification. This parameter is valid only when HarmonyRemind is set to true.

New message

HarmonyRemindBody

string

No

The HarmonyOS notification content used when a HarmonyOS message is converted to a notification. This parameter is valid only when HarmonyRemind is set to true.

You have a new message. Please check it

HarmonyCategory

string

No

The category of the notification message. After you apply for the notification message auto-categorization permission, this parameter is used for the identity of the message type. Different notification message types affect the display and reminder methods of the message. Valid values:

  • IM: Instant chat.

  • VOIP: Audio and video calls.

  • SUBSCRIPTION: Subscribe.

  • TRAVEL: Travel.

  • HEALTH: Health.

  • WORK: Work reminders.

  • ACCOUNT: Account updates.

  • EXPRESS: Orders and logistics.

  • FINANCE: Finance.

  • DEVICE_REMINDER: Device reminders.

  • MAIL: Emails.

  • CUSTOMER_SERVICE: Customer service messages.

  • MARKETING: News, content recommendations, social updates, product promotions, financial updates, lifestyle information, surveys, feature recommendations, and operational activities. This category only identifies the content and does not accelerate message delivery. These are collectively referred to as information and marketing messages.

  • PLAY_VOICE: Voice broadcast. This value can only be used for HarmonyOS extension notification messages.

For details, see Notification.category on the HarmonyOS official website.

Valid values:

  • IM
  • VOIP
  • SUBSCRIPTION
  • TRAVEL
  • HEALTH
  • WORK
  • ACCOUNT
  • EXPRESS
  • FINANCE
  • DEVICE_REMINDER
  • MAIL
  • CUSTOMER_SERVICE
  • MARKETING
  • PLAY_VOICE

IM

HarmonyNotificationSlotType

string

No

The type of the notification channel to use. This parameter is valid only when the Alibaba Cloud proprietary channel is online. Valid values:

  • SOCIAL_COMMUNICATION: Social communication.

  • SERVICE_INFORMATION: Service reminders.

  • CONTENT_INFORMATION: Content information.

  • CUSTOMER_SERVICE: Customer service messages. This type is used for customer service messages between users and merchants, and must be actively initiated by the user.

  • OTHER_TYPES: Other types.

For more information, see SlotType on the HarmonyOS official website.

Valid values:

  • SOCIAL_COMMUNICATION
  • SERVICE_INFORMATION
  • CONTENT_INFORMATION
  • CUSTOMER_SERVICE
  • OTHER_TYPES

SOCIAL_COMMUNICATION

HarmonyNotifyId

integer

No

The unique identifier of each message when the notification is displayed. If this parameter is not specified, the push service automatically generates a unique identifier for each message. Different notification messages can have the same notifyId to allow new messages to overwrite old ones.

For more information, see Notification.notifyId on the HarmonyOS official website.

0

HarmonyActionType

string

No

The action to perform after the notification is clicked. Valid values:

  • APP_HOME_PAGE: Opens the application home page.

  • APP_CUSTOM_PAGE: Opens a custom page in the application.

Valid values:

  • APP_HOME_PAGE
  • APP_CUSTOM_PAGE

APP_HOME_PAGE

HarmonyAction

string

No

The action corresponding to the ability of the built-in page in the application.

Important When HarmonyActionType is set to APP_CUSTOM_PAGE, you must specify at least one of the HarmonyUri and HarmonyAction fields.

For more information, see ClickAction.action on the HarmonyOS official website.

com.example.action

HarmonyUri

string

No

The URI corresponding to the ability of the built-in page in the application.

Important When HarmonyActionType is set to APP_CUSTOM_PAGE, you must specify at least one of the HarmonyUri and HarmonyAction fields. If multiple abilities exist, specify the action and URI for each ability. The action is prioritized when searching for the corresponding built-in page in the application.

For more information, see ClickAction.uri on the HarmonyOS official website.

https://www.example.com:8080/push/example

HarmonyRenderStyle

string

No

The style of the notification message. Valid values:

  • NORMAL: Normal notification. This is the default value.

  • MULTI_LINE: Multi-line text style.

Valid values:

  • NORMAL
  • MULTI_LINE

NORMAL

HarmonyImageUrl

string

No

The URL of the large icon on the right side of the notification. The URL must use the HTTPS protocol.

Note

Supported image formats include PNG, JPG, JPEG, HEIF, GIF, and BMP. The product of the image width and height must be less than 25,000 pixels.

For more information, see Notification.image on the HarmonyOS official website.

https://example.com/xxx.png

HarmonyInboxContent

string

No

The content for the multi-line text style. This field is required when HarmonyRenderStyle is set to MULTI_LINE. A maximum of three content items are supported.

["1.content1","2.content2","3.content3"]

HarmonyExtParameters

string

No

The extended properties of the notification. This parameter does not take effect when the push type PushType is set to MESSAGE.

This parameter must be passed in the JSON map format. Otherwise, a parsing error occurs.

{"key1":"value1","api_name":"PushNoticeToAndroidRequest"}

HarmonyTestMessage

boolean

No

Specifies whether the message is a test message. Valid values:

  • false: Normal message. This is the default value.

  • true: Test message.

For more information, see pushOptions.testMessage on the HarmonyOS official website.

true

HarmonyReceiptId

string

No

The receipt ID for the HarmonyOS channel. You can view this receipt ID in the receipt parameter settings of the HarmonyOS push operations platform.

Note

If the default receipt configuration on the HarmonyOS push operations platform is set to the Alibaba Cloud receipt, you do not need to provide this parameter. Otherwise, configure the default receipt ID for the HarmonyOS channel in the Alibaba Cloud EMAS Mobile Push console first.

For details, see pushOptions.receiptId on the HarmonyOS official website.

RCPB***DFD5

HarmonyExtensionPush

boolean

No

Specifies whether the message is a HarmonyOS extended notification message when PushType is set to NOTICE. Valid values:

  • true: Sends an extended notification message.

  • false: Sends a normal notification. This is the default value.

You must apply for permissions on the HarmonyOS side before sending extended notification messages. For more information, see Sending extended notification messages in the HarmonyOS documentation.
This parameter is supported in HarmonyOS SDK 1.2.0 and later.

true

HarmonyExtensionExtraData

string

No

The extra data for the extended notification message.
This parameter is valid only when sending HarmonyOS extended notification messages.
This parameter is conceptually equivalent to the extraData field of the HarmonyOS extended notification message. For specific definitions, see HarmonyOS ExtensionPayload description.
This parameter is supported in HarmonyOS SDK 1.2.0 and later.







Sample extra data

HarmonyBadgeAddNum

integer

No

The increment value for the badge number of the HarmonyOS application. For more information, see Description of the addNum field for HarmonyOS badges.
This parameter is supported in HarmonyOS SDK 1.2.0 and later.

1

HarmonyBadgeSetNum

integer

No

The fixed value for the badge number of the HarmonyOS application. For more information, see Description of the setNum field for HarmonyOS badges. This parameter is supported in HarmonyOS SDK 1.2.0 and later.

1

SmsTemplateName

string

No

The name of the SMS template used for sending fallback SMS messages. You can obtain this name from the SMS template management page. This is the name assigned by the system, not the name set by the developer.

SMS template name

SmsSignName

string

No

The signature used for sending fallback SMS messages.

SMS signature

SmsParams

string

No

The key-value pairs of variables in the SMS template. Format: key1=value1&key2=value2.

key1=value1

SmsDelaySecs

integer

No

The delay time before triggering the SMS message. Unit: seconds.

This parameter is required if you use the SMS linkage feature. Set this parameter to 15 seconds or more, up to a maximum of 3 days, to prevent duplicate SMS and push messages.

Note

When the SMS linkage feature is used, the ExpireTime parameter becomes invalid. The expiration time of the notification is calculated based on the SmsDelaySecs parameter. The expiration time is the current time plus the value of SmsDelaySecs.

15

SmsSendPolicy

integer

No

The condition for triggering the SMS message. Valid values:

  • 0: Triggers the SMS message when the push message is not received.

  • 1: Triggers the SMS message when the user does not open the push message.

Valid values:

  • 0 :

    0

  • 1 :

    1

0

SendSpeed deprecated

integer

No

[Deprecated] This parameter is deprecated.

0

AndroidXiaoMiNotifyTitle deprecated

string

No

[Deprecated] This parameter is deprecated. All third-party auxiliary pop-up windows are uniformly supported by the new AndroidPopupTitle parameter.

None

AndroidXiaoMiNotifyBody deprecated

string

No

[Deprecated] This parameter is deprecated. All third-party auxiliary pop-up windows are uniformly supported by the new AndroidPopupBody parameter.

None

AndroidXiaoMiActivity deprecated

string

No

[Deprecated] This parameter is deprecated. All third-party auxiliary pop-up windows are uniformly supported by the new AndroidPopupActivity parameter.

None

IdempotentToken

string

No

An idempotent parameter used to prevent duplicate pushes on the server caused by retries from the API client. If the same IdempotentToken is used for calls within 15 minutes, only one push is performed, and subsequent calls return the result of the first successful push.

Note
  • The parameter format is a standard 36-character UUID (8-4-4-4-12). Each valid character is a hexadecimal digit in the range of 0-9 or a-f, and it is case-insensitive.

  • This parameter is only used to prevent duplicate pushes caused by retries. It cannot prevent duplicate pushes caused by concurrent calls.

c8016d13-6e76-410c-9bda-769383d11787

AndroidMeizuNoticeMsgType

integer

No

The Meizu message type. Valid values:

  • 0: Public message. This is the default value.

  • 1: Private message.

Valid values:

  • 0 :

    Public message. This is the default value.

  • 1 :

    Private message.

0

AndroidOppoPrivateMsgTemplateId

string

No

The OPPO private message template ID.

687557242b1634hzefs3d5013

AndroidOppoPrivateTitleParameters

object

No

The title parameters for the OPPO private message template.

string

No

The variable names and values in the title of the OPPO private message template.

my_title

AndroidOppoPrivateContentParameters

object

No

The content parameters for the OPPO private message template.

string

No

The variable names and values in the content of the OPPO private message template.

my_content

AndroidXiaomiTemplateId

string

No

The Xiaomi private message template ID.

P10645

AndroidXiaomiTemplateParams

string

No

The parameters for the Xiaomi private message template. The value is a JSON string.

{"keywords1":"Tom","keywords2":"phone"}

AndroidVivoTemplateId

string

No

The vivo template ID.

t1-ge3-lq

AndroidVivoTemplateParams

string

No

The parameters for the vivo template. The value is a JSON object string.

{"keywords1":"S123"}

HarmonyLiveViewPayload

string

No

The JSON string of the HarmonyOS Live View data structure LiveViewPayload. For development and integration, refer to the HarmonyOS Live View push guide.

{ "activityId": 1, "operation": 0, "event": "TAXI", "status": "DRIVER_ON_THE_WAY", "activityData": { "notificationData": { "type": 3 } } }

AndroidHuaweiLiveNotificationPayload

string

No

The JSON string of the Huawei Android Live Notification data structure LiveNotificationPayload. For development and integration, refer to the Huawei Live Notification push guide.

{ "activityId": 1, "operation": 1, "event": "TAXI", "activityData": { "notificationData": { "type": 3 } } }

AndroidOppoIntelligentIntent

string

No

The JSON string of the OPPO Fluid Cloud intent sharing data structure IntelligentIntent. For development and integration, refer to the OPPO Fluid Cloud push guide.

{ "intentName": "Example.Progress", "identifier": "d71ebd3119877b12ecdb6c4fe96b068e", "timestamp": 1729485000989, "serviceId": { "launcher": "999800001", "fluidCloud": "999900001" }, "intentAction": { "actionStatus": 0 }, "intentEntity": { "entityName": "TAXI" } }

AndroidOppoDeleteIntentData

string

No

The JSON string of the OPPO Fluid Cloud intent deletion data structure data. This parameter is invalid if the AndroidOppoIntelligentIntent parameter is already specified. For development and integration, refer to the OPPO Fluid Cloud push guide.

{ "intentName": "Example.Progress", "entityIds": [ "A580202509130712" ], "serviceId": { "launcher": "999800001", "fluidCloud": "999900001" } }

AndroidVivoLiveMessage

string

No

The JSON string of the vivo Atomic Island data structure liveMessage. For development and integration, refer to the vivo Atomic Island push guide.

{ "operation": 0, "scene": "HEALTH_REGISTER", "templateType": 1, "showNotify": true, "changeRecord": 999, "capsuleData": { "bgColor": "#32d4d4" } }

AndroidXiaomiFocusParam

string

No

The JSON string of the Xiaomi Super Island data structure miui.focus.param. For development and integration, refer to the Xiaomi Super Island push guide.

{ "param_v2": { "business": "taxi", "updatable": true, "orderId": "A580202509130712", "param_island": { "islandProperty": 1, "bigIslandArea": { "imageTextInfoLeft": { "type": 1 } } } } }

AndroidXiaomiFocusPics

string

No

The JSON string of the Xiaomi Super Island image data miui.focus.pic_xxx. For development and integration, refer to the Xiaomi Super Island push guide.

{ "miui.focus.pic_ticker": "https://example.com/ticker.jpg", "miui.focus.pic_aod": "https://example.com/aod.jpg", "miui.focus.pic_imageText": "https://example.com/imageText.jpg" }

Additional request parameter descriptions

Details of Title and Body:

Attribute\Push typeMessage (iOS)Message (Android)Notification (iOS)Notification (Android)
TitleThe message title, which corresponds to the title field of CCPSysMessage in the message callback.The CPushMessage.title field.The notification title.The notification title, which corresponds to the onNotificationOpened callback method.
BodyThe message body, which corresponds to the body field of CCPSysMessage in the message callback.The message body, which corresponds to the CPushMessage.content field.The notification content.The notification content, which corresponds to the onNotificationOpened callback method.

The following configurations apply only to the Android auxiliary pop-up window feature:

If the device is offline during the push (that is, the persistent connection channel to the mobile push server is disconnected), this push can trigger the auxiliary pop-up window feature. To enable the auxiliary pop-up window feature, refer to Configure auxiliary channels for mobile push. The following conditions must be met:

  • A third-party auxiliary channel is integrated.

  • The StoreOffline parameter is set to true.

  • A notification is pushed (the AndroidRemind parameter does not need to be set), or a message is pushed and the AndroidRemind parameter is set to true.

  • The AndroidPopupActivity, AndroidPopupTitle, and AndroidPopupBody parameters are correctly set.

Response elements

Element

Type

Description

Example

object

MessageId

string

The message ID that identifies a push task.

501029

RequestId

string

The request ID.

9998B3CC-ED9E-4CB3-A8FB-DCC61296BFBC

Examples

Success response

JSON format

{
  "MessageId": "501029",
  "RequestId": "9998B3CC-ED9E-4CB3-A8FB-DCC61296BFBC"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidPeriod.ExceedDays The period between specified EndTime and StartTime exceeds %s days. The interval between the start time and end time cannot exceed %s days.
400 Invalid%s.Format The specified %s format is invalid. The parameter format is invalid.
400 AccountDisabled Your account is not enabled. The feature is not enabled.
400 FileNotExist The specified file does not exist. The specified file does not exist.
400 IncorrectPassword The password is incorrect. The password is incorrect.
400 NotApnsCertificate The Certificate is not an APNs certificate. The certificate is not an APNs certificate.
400 PermissionDenied The specified AppKey is not authorized.
400 SendSpeedNotSupported SendSpeed is not supported for specified Target. The specified target does not support the SendSpeed parameter.
400 SmsProfileConfigFailed Failed to configure SMS profile. The SMS configuration failed.
400 SmsProfileGetFailed Failed to get SMS profile. Failed to retrieve the SMS configuration.
400 SmsRoleAuthorizeFailed Failed to authorize SMS role. The SMS role authorization failed.
400 SmsRoleUnauthorized The SMS role is unauthorized. The SMS role is not authorized.
400 TagsNumberBeyondLimit The number of tags bound to this app exceeds the limit. The number of tags bound to the current app exceeds the limit.
400 Invalid%s.LengthExceed The specified %s length cannot be greater than %s. The parameter length exceeds the limit.
400 Invalid%s.BytesExceed The specified %s exceeds the %s bytes limit. The number of bytes in the parameter exceeds the limit.
400 Invalid%s.Empty The specified %s cannot be empty. The parameter cannot be empty.
400 Invalid.Parameter The specified parameter is invalid: %s. The parameter %s is invalid.
400 TargetNotSupported Target is not supported for batch push. The specified target is not supported for file-based push.
500 InternalError The request processing has failed due to some unknown error. Please try again. If the error still exists, submit a ticket. The request processing has failed due to some unknown error.
500 Timeout The request processing is timeout. Request processing timed out.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.