跳到主要内容

发送语音消息

调用SendVMSMessage API以发送语音消息。

请求参数​

参数名称类型描述是否必需
Actionstring值: SendVMSMessage是
AccountIdint项目ID,获取AccountId。是
TemplateIdstring语音模板ID。是
CalledNumberstring被叫号码。是

响应元素​

参数名称类型描述是否必需
RetCodeint当RetCode不为0时,将在Message中显示具体的错误描述。如果RetCode为0,则不返回Message。是
Actionstring操作名称。是
Messagestring当RetCode不为0时,将在Message中显示具体的错误描述。是
SessionNostring此会话的提交任务的唯一ID,可用于查询此会话中的发送列表。否

请求示例​

curl --request POST 'https://api.uspeedo.com/api' \
--header 'Content-Type: application/json' \
-d '{
"Action": "SendVMSMessage",
"AccountId": 1,
"TemplateId": "template id",
"CalledNumber": "+11111111"
}'

返回示例​

{
"Action": "SendVMSMessageResponse",
"Message": "Send success",
"RetCode": 0,
"SessionNo": "session no"
}