JSON API » mailboxes » mailboxes/create
Creates a new mailbox.
Input parameters
Requires authentication and the administrator role privileges.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
mailbox | String | Mailbox. | Yes | |
pin | String | PIN. | Yes, unless copy_pin is specified. | |
callerid | String | Callerid to use on notification calls. Empty string for unknown. | No | Empty string. |
copy_pin | String | Another mailbox in the same customer to copy the PIN from. Empty string to use the pin parameter instead. | No | Empty string. |
customer | Integer | ID of customer to create in. | No | Customer of authentication user. |
description | String | Description. | No | Empty string. |
dtype | String | Destination type if caller presses 0 during greeting. | No | "hangup" |
dnumber | String | Destination number if caller presses 0 during greeting. | No | None. |
envelope | Integer | 1 to play message envelope, 0 not to. | No | 0 |
notify_dnumber | String | Number to call for notification calls. Empty string for none. | No | Empty string. |
notify_email | String | "owner" to notify mailbox owner by email, "owner_wav" to also attach voicemail as .wav, empty string not to notify. | No | "owner_wav" |
notify_for | String | "voicemail" to notify owner for voicemails, "fax" to notify for faxes, "voicemail_fax" for both, empty string for neither. | No | "voicemail_fax" |
notify_ltype | String | What 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_message | String | "owner" to send text message to mailbox owner, empty string not to. | No | Empty string. |
notify_only | Integer | 1 to delete the message after sending notification emails, 0 not to. | No | 0 |
owner | Integer | ID of owner. 0 for none. | No | 0 |
pager | String | Secondary email address to notify. Empty string for none. | No | Empty string. |
pager_attach | Integer | 1 to attach voicemail or fax to email to secondary address, 0 not to. | No | 0 |
panel | Integer | 1 to show in control panel, 0 not to. | No | 0 |
play | String | "oldest" to play oldest message first, "newest" to play newest message first. | No | "oldest" |
saycid | Integer | 1 to say callerid, 0 not to. | No | 1 |
sayduration | Integer | 1 to say message duration, 0 not to. | No | 1 |
temporary_active | Integer | 1 if temporary greeting is active, 0 if not. | No | 1 |
timezone | String | Time zone. | No | Customer default. |
transcribe | Integer | 1 to send new voicemails to transcription URL, 0 not to. Only used if configured. | No | 0 |
validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
Responses
Code | Description |
---|---|
201 | Input passed validation. Only returned if validation=1. |
204 | Success. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
403 | Your 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
Version | Changes |
---|---|
3.14 | transcribe input parameter added. |
3.13 | Function added. |