You can invoke CreateAudioFile to create an audio resource under a specified instance. The created audio resource can be used in the instance, such as selecting the audio file for playback during IVR.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Instance ID. |
ccc-test |
| Name |
string |
Yes |
Display name of the audio, containing 1 to 32 characters. |
欢迎语 |
| AudioFileName |
string |
Yes |
Audio file name, containing 1 to 32 characters. |
test-file.wav |
| OssFileKey |
string |
Yes |
Key of the OSS file, returned by the GetAudioFileUploadParameters API. |
ccc-test/test-file.wav |
| Usage |
string |
No |
Usage of the audio file. The default value is General (used in scenarios such as IVR). Other optional values include HoldMusic (hold music during a call). |
General |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
integer |
HTTP status code. |
200 |
| Code |
string |
Response code. |
OK |
| Message |
string |
Response message. |
无 |
| Data |
string |
Data, which is the ID of the audio resource and uniquely identifies an audio resource. |
2301b83f-1f9f-491e-9f97-2f832ed92f0b |
| RequestId |
string |
Request ID. |
94E29B9B-DBC6-5951-B3DD-C85C1BDF20ED |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"Code": "OK",
"Message": "无",
"Data": "2301b83f-1f9f-491e-9f97-2f832ed92f0b",
"RequestId": "94E29B9B-DBC6-5951-B3DD-C85C1BDF20ED"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | NotExists.InstanceId | The specified instance %s does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.