Add a Group Voicemail
Add a custom group voicemail.
Note: Only Custom group voicemails can be created
through this interface, while Queue and Ring
Group group voicemails cannot be created through this interface. When a queue or
ring group is configured with a group voicemail as its destination, the system automatically
creates the corresponding group voicemail.
Request URL
POST {base_url}/{api_path}/group_voicemail/create?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| name | Yes | String | The name of the group voicemail. |
| number | Yes | String | The number of the group voicemail. |
| mode | No | String | The message mode of the group voicemail. Valid value:
|
| members | No | Array<Group_Voicemail_Member> | The information of each member in the group voicemail. |
| enb_pin | No | Integer | Whether to enable PIN authentication. Valid value:
|
| pin | No | String | The PIN code in Base64 encoding. After decoding, the PIN must contain 3 to 15
digits. Note:
|
| enb_play_datetime | No | Integer | Whether to play the date and time when a voicemail message is
played. Valid value:
|
| enb_play_caller_id | No | Integer | Whether to play the caller ID when a voicemail message is played. Valid value:
|
| enb_play_duration | No | Integer | Whether to play the message duration when a voicemail message is
played. Valid value:
|
| enb_deny_leaving_message | No | Integer | Whether to prevent callers from leaving voicemail messages. Valid value:
|
| enb_custom_language | No | Integer | Whether to enable custom prompt language. Valid value:
|
| language | No | String | The language code for system prompts. Note:
|
| custom_emails | No | String | The email addresses to receive group voicemails. Note: Use
a comma to separate multiple email addresses. |
| enb_trigger_a_call | No | Integer | Whether to trigger a cycle call to announce a new voicemail message. Valid value:
|
| max_number_of_cycles_call | No | Integer | The maximum number of cycle call rounds. Note: This field
takes effect when enb_trigger_a_call is
1. |
| contact_list | No | Array<Contact_List> | The contact list used for the cycle call. Note: This field takes effect when
enb_trigger_a_call is 1. |
| greeting | No | String | The name of the greeting prompt. Note: You can obtain the
available greeting prompt names using the Query Global Voicemail Greeting List interface. |
- Group_Voicemail_Member
-
Parameter Type Description type String The type of the member. Valid value:
extension: Extension.ext_group: Extension group.
value String The member's ID. - When
typeisextension, specify the extension number. - When
typeisext_group, specify the extension group ID.
- Contact_List
-
Parameter Type Description contact_number String The phone number of the contact to call. number_of_call_attempts Integer The maximum number of call attempts to this contact in a single cycle.
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.
|
| id | Integer | The unique ID of the newly created group voicemail. |
Example
Request example
POST /openapi/v1.0/group_voicemail/create?access_token=lweYFZuwsgSrhFOKC3Z0XmDRXfbPohi6 HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
"name": "Test Group Voicemail",
"number": "6899",
"mode": "share",
"members": [
{
"type": "extension",
"value": "1002"
}
],
"enb_pin": 1,
"pin": "MTIzNA=="
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"id": 2
}