1. Teleboard | Support Center
  2. Solution home
  3. API Documentation
  4. REST API - PUT Requests
Open navigation

PUT/mailbox

With the PUT/mailbox request you can update the general settings of an existing mailbox or creates a new mailbox. These settings apply for all voicemail or fax messages in the mailbox.   


For the request to work the user must have the relevant administrator privileges! (as listed in the Get/myProfile request.)


Parameters


There are no parameters in the header. All parameters go in the body in JSON Raw format.


If you don't  want to update any parameter you can just omit it from the request.


ParameterTypeOperation/function
mailbox
String
The mailbox number (it's associated phone line.)
uniqueid
String

A unique system ID for the mailbox. Leave empty to create a new mailbox or use an existing ID (obtained from the GET/mailbox request) to update the setting of an existing mailbox.

description
String

A description of the purpose of the mailbox.

fullname
String

A full name of the owner of the mailbox.

email
String

Email of the owner of the mailbox.

timezone
String

A user's selected time zone for the mailbox. If the field is an empty string, the default time zone will be used.

pin
StringA PIN password that is required for accessing messages in the mailbox by either remote manual entry or by automatic authentication with a physical phone or the TeleConsole.
envelope
Boolean

A "1" value to play the time a message was left before the actual message, "0" not to.

saycid
BooleanA "1" value plays the caller ID of the caller before the actual message,  "0" not to.
play
String

The order in which new voicemail messages will be played, either "oldest" (starting with the one that arrived earlier) or "newer" (starting with the most recent one.)

review
Boolean

 A "1" value gives the caller the option to review their message and record it again before it is delivered to the mailbox. 

operator
Boolean

A "1" allows the user to press 0 to connect to an operator or go back to IVR menu.

sayduration
BooleanA "1" value plays the duration of voicemail message before the actual message, "0" not to.
notify_email
StringWhom to notify by email about new messages . A 'owner_wav' value for the mailbox owner with attached .wav file of the voicemail, 'owner' for the mailbox owner without attached .wav file, or an empty string for no one.
notify_message
StringWhom to notify by SMS about new messages. A 'owner' value for the mailbox owner's mobile number or an empty string for no one. 
notify_for
StringWhich type of messages to notify for. A 'voicemail_fax' value for both voicemails and faxes (received at the associated fax line of the owner), 'voicemail' just for voicemails, or 'fax' just for faxes.
notify_dtype
String
Destination type for notification call. Usually an empty string.
notify_dnumber
String
Destination number for a notification call about new messages. Empty string to disable.
notify_ltype
String
A login type required for accessing the mailbox from a notification call. A value of 'voicemailbox' will connect to a specific mailbox without requiring a PIN, 'voicemailboxpin' value will connect to a specific mailbox and require a PIN to be entered, and a 'voicemaillogin' value will have the call's recipient enter both a mailbox number and its PIN.
dtype
String
The destination type the caller will be directed to if he presses 0 after arriving in the mailbox. The Telebroad system supports over 50 possible destinations. The default value here is "hangup" to just end the call. Other two popular destinations are "callback" to request a call back to the caller's number and "autoattendant" to go back to the IVR.
dnumber
String
The destination number the caller will be directed to if he presses 0 after arriving in the mailbox.
pager
String
A backup email address (in addition for for the owner's) for sending notifications about new voicemail or fax messages received.
pager_attach
Boolean
A "1" value to attach a .wav (or fax PDF) file of the message to the email sent to the backup address ("pager"). A value of "0" not to attach the voicemail.  
notify_only
Boolean
A "1" value to delete messages after a notification is sent. A value of "0" not to delete after notification. This can help with avoiding duplications when messages are heard both directly from the mailbox and as an attachment.
callerid
String
A caller ID applied to notification calls about new messages. The caller ID is withheld if the string in empty.
maxmsg
Integer

Maximum number of messages the mailbox is allowed to hold.  

maxsecs
Integer

Maximum allowable duration of a message in seconds (longer messages will get truncated.) A value of 0 indicates no limit.

minsecs
Integer

Minimum allowable duration of a message in seconds (shorter messages will not be saved.)

maxgreet
Integer

The maximum allowable greeting length, in seconds, that the owner can record or upload.

skipms
Integer

A duration, in milliseconds, that specifies the amount of skipping performed when a user pushed a button to skip forward or backward while playing a message. xxx

maxsilence
Integer

A duration, in seconds, of allowed silence before the recording of a voicemail is stopped.

silencethreshold
Integer

An audio value  (the default is 128) that defines for the system the minimum sound level to consider that the caller is silent. Once the caller is considered silent the system counts until the "maxsilence" value is reached and stops the recording of a voicemail.

maxlogins
Integer

The number of allowable login (password entry) attempts before the user is disconnected from the mailbox. The user has to reconnect and try again to gain access to the mailbox.

hidefromdir
Boolean

 A "1" value will hide the mailbox from the dial-by-name directory.

language
String
The language for the interactive voice responses of the mailbox.
attach
Boolean

A "1" value to attach a .wav (or fax PDF) file of the message to SMS notification about new messages.

transcribe
Boolean

a value of "1" will have voicemail transcribed and delivered as text to the owner's email. The transcription service requires additional fees and setup.  

Example


To change the settings for mailbox 1113501 use the following syntax:


HTTPS method: PUT


Header


webserv.telebroad.com/api/teleconsole/rest/mailbox


Body


{"uniqueid": "16965", "mailbox": "1113501", "description": "Rick Goodwin", "password": "7420", "owner": "13690", "fullname": "", "email": "", "pager": "[email protected]", "pager_attach": "1", "notify_only": "0",  "play": "newest", "attach": "yes", "saycid": "yes", "sayduration": "no", "review": "yes", "operator": "yes", "envelope": "yes", "nextaftercmd": "yes", "maxmsg": "100", "maxsecs": "300", "minsecs": "3", "maxgreet": "120", "skipms": "3000", "maxsilence": "10", "silencethreshold": "128", "maxlogins": "3", "hidefromdir": "no", "language": "", "timezone": "", "tz": "est5edt", "notify_for": "voicemail", "notify_dtype": "", "notify_dnumber": "", "notify_ltype": "voicemailbox", "notify_email": "owner_wav", "notify_message": "", "dtype": "hangup", "dnumber": "7185555555", "message_sent": "0", "callerid": "",  "display": "1113834 Rick Goodwin" } 


Responses:


A successful update of an existing mailbox - 


{

    "error": null,

    "result": "true"

}


User does not have the relevant administrator privileges to update the mailbox - 


{

    "error": null,
   
"result": null"
}



Wrong mailbox was specified - 


{
"error": {

    "code": 455,

    "message": "Mailbox does not exist"
    }

}


The "uniqiueid" is returned if creating a new mailbox -   


{

    "error": null, {  

    "result": { "uniqueid": "47858" } }

}