JSON API » mailboxes » mailboxes/create

Creates a new mailbox.

Input parameters

Requires authentication and the administrator role privileges.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
mailboxStringMailbox.Yes
pinStringPIN.Yes, unless copy_pin is specified.
calleridStringCallerid to use on notification calls. Empty string for unknown.NoEmpty string.
copy_pinStringAnother mailbox in the same customer to copy the PIN from. Empty string to use the pin parameter instead.NoEmpty string.
customerIntegerID of customer to create in.NoCustomer of authentication user.
descriptionStringDescription.NoEmpty string.
dtypeStringDestination type if caller presses 0 during greeting.No"hangup"
dnumberStringDestination number if caller presses 0 during greeting.NoNone.
envelopeInteger1 to play message envelope, 0 not to.No0
notify_dnumberStringNumber to call for notification calls. Empty string for none.NoEmpty string.
notify_emailString"owner" to notify mailbox owner by email, "owner_wav" to also attach voicemail as .wav, empty string not to notify.No"owner_wav"
notify_forString"voicemail" to notify owner for voicemails, "fax" to notify for faxes, "voicemail_fax" for both, empty string for neither.No"voicemail_fax"
notify_ltypeStringWhat to play on notifications calls. "voicemailbox" for access to mailbox without PIN, "voicemailboxpin" for access to mailbox with PIN, "voicemaillogin" to ask for mailbox and PIN.No"voicemailbox"
notify_messageString"owner" to send text message to mailbox owner, empty string not to.NoEmpty string.
notify_onlyInteger1 to delete the message after sending notification emails, 0 not to.No0
ownerIntegerID of owner. 0 for none.No0
pagerStringSecondary email address to notify. Empty string for none.NoEmpty string.
pager_attachInteger1 to attach voicemail or fax to email to secondary address, 0 not to.No0
panelInteger1 to show in control panel, 0 not to.No0
playString"oldest" to play oldest message first, "newest" to play newest message first.No"oldest"
saycidInteger1 to say callerid, 0 not to.No1
saydurationInteger1 to say message duration, 0 not to.No1
temporary_activeInteger1 if temporary greeting is active, 0 if not.No1
timezoneStringTime zone.NoCustomer default.
validationInteger1 to validate input then return, 0 for full action.No0

Responses

CodeDescription
201Input passed validation. Only returned if validation=1.
204Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your rate plan does not allow this.

Data returned

No data is returned.

Example: With required parameters

http://enswitch.example.com/api/json/mailboxes/create/?auth_username=user;auth_password=password;mailbox=1234;pin=567890

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
3.13Function added.