All Products
Search
Document Center

Voice Service:VoiceSingleCall

Last Updated:Aug 15, 2025

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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dyvms:VoiceSingleCallnone
*All Resources
*
    none
none

Request parameters

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
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.

Change history

Change timeSummary of changesOperation
No change history