Add a template of messages in notification center

Last Updated on : 2023-06-20 12:34:12download

Add a custom template of messages in the app notification center. In the template, you can create custom contents to send push notifications and marketing notifications.

API address

POST: /v1.0/iot-03/msg-templates/app-notifications

Request parameter

Description of body

Parameter name Type IN Required Description
name String true The template name with 1 to 30 characters.
title String true The template title with 1 to 40 characters.
content String true The template content with 1 to 100 characters.
type Integer true The type of push notifications. Valid values:
  • 0: operations message.
  • 1: system message.
remark String true The remarks of the application for the template of messages in notification center. Describe your application scenario with 1 to 100 characters.

Return parameter

Parameter name Type Description
result MsgTemplatesRes

Description of result

Parameter name Type Description
template_id String The template ID.

Request example

POST: /v1.0/iot-03/msg-templates/app-notifications
{ "name": "The test template of messages in notification center", "title": "Test title", "content": "Test content", "type": 0, "remark": "The current template applies to the promotions of the Double 11 Shopping Festival" }

Return example

{ "template_id": "PUSH_161639****" }

Error code

For more information, see error code.