VoiceSingleCall

Updated at: 2025-03-13 08:45

Sends a voice verification code or voice notification with variables to a phone number. A voice file or text-to-speech (TTS) template is supported.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
CallerIdNumberstringNo

The calling number. If you do not specify this parameter, the system uses a local random number as the display number. If you use a dedicated number for outbound calls, you must specify the purchased number. You can specify only one number. You can log on to the VMS console and go to the number management page to view the purchased phone numbers.

852****0001
CalledNumberstringNo

The phone number that receives the voice notification. You must add the country/region dialing code to the beginning of the phone number. Example: 85200****00.

852****0000
TtsCodestringNo

The ID of the TTS template. You can log on to the VMS console and go to the TTS templates page to view the template ID. You must specify either TtsCode or VoiceCode. You can specify TtsCode to use the voice file as the call content, or you can specify VoiceCode to use preset text as the call content.

1001
TtsParamstringNo

The variables in the template, in the JSON format.

{"code":"1234"}
VoiceCodestringNo

The ID of the voice file template. You can log on to the VMS console and go to the voice file templates page to view the template ID. You must specify either TtsCode or VoiceCode. You can specify TtsCode to use the voice file as the call content, or you can specify VoiceCode to use preset text as the call content.

1002
PlayTimeslongNo

The number of times the voice notification is played in the call. Valid values: 1 to 3. Default value: 3.

2
VolumelongNo

The playback volume of the voice notification. Valid values: 0 to 100. Default value: 100.

100
SpeedlongNo

The playback speed. Valid values: -500 to 500.

0
TaskNamestringNo

The task name.

Task0
SendTypelongNo

The delivery type. Valid values: 1 and 2. 1: immediately delivers the task. 2: delivers the task at a scheduled time. If you set this parameter to 2, you must specify TimingStart.

1
TimingStartstringNo

The time when the task is scheduled to be delivered.

2022-05-01T08:00:00+08:00
OutIdstringNo

The ID reserved for the caller. This ID is returned to the caller in a receipt message. The value must be a string that is 1 to 15 bytes in length.

22522****
CountryIdstringNo

The ISO2 country/region code.

HK

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
object
AccessDeniedDetailstring

The details about the access denial.

""
Messagestring

The returned message.

OK
RequestIdstring

The request ID.

D9CB****-****-****-****-********9D23
Modelobject

The returned data.

Codestring

The error code. A value of OK indicates that the request was successful. For information about other error codes, see Error codes.

OK
Successboolean

Indicates whether the request was successful. Valid values: true and false.

true

Examples

Sample success responses

JSONformat

{
  "AccessDeniedDetail": "\"\"",
  "Message": "OK",
  "RequestId": "D9CB****-****-****-****-********9D23\n",
  "Model": {
    "test": "test",
    "test2": 1
  },
  "Code": "OK",
  "Success": true
}

Error codes

For a list of error codes, visit the Service error codes.

Previous:NoneNext: Voice Service
  • On this page (1)
  • Debugging
  • Authorization information
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare