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:

  • broadcast: The voicemail messages are not stored in the group mailbox. Instead, the system broadcasts (copies and forwards) the group messages to the individual mailboxes of all the members.
  • share: The voicemail messages are saved in the group mailbox, and are shared by all members.
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:

  • 0: Disabled.
  • 1: Enabled.
pin No String The PIN code in Base64 encoding. After decoding, the PIN must contain 3 to 15 digits.
Note:
  • This parameter is required when enb_pin is 1.
  • If this field is omitted, a 4-digit PIN is generated automatically.
enb_play_datetime No Integer Whether to play the date and time when a voicemail message is played.

Valid value:

  • 0: Disabled.
  • 1: Enabled.
enb_play_caller_id No Integer Whether to play the caller ID when a voicemail message is played.

Valid value:

  • 0: Disabled.
  • 1: Enabled.
enb_play_duration No Integer Whether to play the message duration when a voicemail message is played.

Valid value:

  • 0: Disabled.
  • 1: Enabled.
enb_deny_leaving_message No Integer Whether to prevent callers from leaving voicemail messages.

Valid value:

  • 0: Disabled.
  • 1: Enabled.
enb_custom_language No Integer Whether to enable custom prompt language.

Valid value:

  • 0: Disabled.
  • 1: Enabled.
language No String The language code for system prompts.
Note:
  • This field is required when enb_custom_language is 1.
  • You can query the available language codes using the Query System Prompt List interface.
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:

  • 0: Disabled.
  • 1: Enabled.
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 type is extension, specify the extension number.
  • When type is ext_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.
  • 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.
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
}