Upload a Group Voicemail Greeting

Upload a greeting for specified group voicemail.

Request URL

POST {base_url}/{api_path}/vm_greeting/upload?access_token={access_token}

Request parameters

Parameter Required Type Description
owner Yes String

The number of the group voicemail to which the uploaded greeting belongs.

Note: You can query the number of the group voicemail using Query Group Voicemail List.
file Yes File The greeting file.
Note: Only a file in ".wav", ".mp3" or ".gsm" format is supported, and the file size must not exceed 8MB.
is_check Yes String The operation mode.

Valid value:

  • ask: Check whether the filename of the greeting already exists.
  • force: Upload the greeting file.
    Note: If no duplicate filename exists, add the greeting directly; otherwise, overwrite the existing one.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
owner String

The number of the group voicemail to which the uploaded greeting belongs.

Examples

Request example

  • Check whether the filename of the greeting (file: group_vm_welome2.wav) already exists in the greeting list for specified group voicemail (number: 6300).
    POST /openapi/v1.0/vm_greeting/upload?access_token=L3LDr0HRuT190YmccVIaXj6OxkLzUHfo HTTP/1.1  
    Host: 192.168.5.150:8088
    Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
    
    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="file"; filename="/D:/greeting/group_vm_welome2.wav"
    Content-Type: audio/wav
    
    (binary data)
    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="owner"
    
    6300
    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="is_check"
    
    ask
    ------WebKitFormBoundary7MA4YWxkTrZu0gW--
    Figure 1. Request example 1 in Postman
  • Upload the voicemail greeting (file: group_vm_welome2.wav) for the specified group voicemail (number: 6300).
    POST /openapi/v1.0/vm_greeting/upload?access_token=L3LDr0HRuT190YmccVIaXj6OxkLzUHfo HTTP/1.1  
    Host: 192.168.5.150:8088
    Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
    
    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="file"; filename="/D:/greeting/group_vm_welome2.wav"
    Content-Type: audio/wav
    
    (binary data)
    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="owner"
    
    6300
    ------WebKitFormBoundary7MA4YWxkTrZu0gW
    Content-Disposition: form-data; name="is_check"
    
    force
    ------WebKitFormBoundary7MA4YWxkTrZu0gW--
    Figure 2. Request example 2 in Postman

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "owner": "6300"
}