Edit an MOH Audio File
Rename an audio file in a specified MOH (music on hold) playlist.
Request URL
POST {base_url}/{api_path}/moh_files/updatefile?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| list_name | Yes | String | The name of the MOH playlist. Note: You can query the name
of the MOH playlist using Query MoH Playlists. |
| old_file | Yes | String | The name of the audio file, including the file extension
(e.g., "WhisperingPine.wav"). Note: You can query the name of the audio file using Query MOH Audio File List. |
| new_file | Yes | String | The new name of the audio file, including the file extension (e.g.,
"WhisperingPine.wav"). Note:
|
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
Example
Request example
POST /openapi/v1.0/moh_files/updatefile?access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
"list_name": "demo_list",
"old_file": "demo_track.wav",
"new_file": "demo_track_v2.wav"
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS"
}