外观
语音通知
接口说明
调用接口可实现语音通知。 ⚠️接口有频次限制(10次/秒),如需大批量语音通知,请使用自动外呼任务结合IVR实现。
请求方式
POST/call/api/v1/voiceNotify
请求参数
| 参数 | 类型 | 必填 | 示例值 | 说明 |
|---|---|---|---|---|
| customerNumber | string | 是 | — | 被叫号码 |
| customerNumberEncrypted | boolean | 否 | false | 被叫号码是否加密 |
| displayNumber | string | 否 | — | 外显号码,不传则随机一个可用号码 |
| timeout | integer | 否 | — | 呼叫超时时长,默认60秒 |
| voiceType | string | 是 | — | 语音类型(voice: 语音文件; tts: 语音合成) |
| voiceId | string | 否 | — | 语音文件id,voiceType为voice时必传 |
| ttsText | string | 否 | — | 语音合成文本,voiceType为tts时必传 |
请求示例
json
{
"customerNumber": "01000000000",
"customerNumberEncrypted": false,
"displayNumber": "01012345678",
"timeout": 30,
"voiceType": "",
"voiceId": "",
"ttsText": ""
}成功响应
json
{
"success": true,
"code": "200",
"message": "200 ok!",
"data": null
}