Contact Us
Log In

Add a voice template

Last Updated on : 2023-09-11 09:55:07download

Add a voice template.

API address

POST: /v1.0/iot-03/msg-templates/voices

Request parameter

Description of body

Parameter name Type IN Required Description
name String true The template name with 1 to 30 characters.
content String true The template content with 1 to 200 characters.
type Integer true The voice type. 0: verification code, 1: voice notification.
remark String true The remarks of the application for the voice template. 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 Template ID.

Request example

POST: /v1.0/iot-03/msg-templates/voices
{ "name": "The template of the voice verification code", "content": "You are registering with your phone number. The verification code is: ${code}, valid for 5 minutes." "type": 0, "remark": "The current voice template applies to the registration scenario" }

Return example

{ "template_id": "VOICE_1616396456" }

Error code

For more information, see error code.