PUT Exchange Mailbox
From Hostway API Documentation
Edit an Exchange Mailbox
PUT /accounts/{account-number}/exchange/{domain-name}/mailboxes/{username}
PUT /accounts/{account-number}/exchange/{domain-name}/mailboxes/{username}?passwordReset={password-reset}
Contents |
Parameters
- account_number - string
- The account-number that the Exchange resource belongs to
- domain_name - string
- The domain-name that is associated with the Exchange resource
- username - string
- The username of the requested mailbox
- password-reset - int
- (OPTIONAL)
- Whether the update will also overwrite the password of the mailbox. Allowed values are 0 and 1. If not set defaults to 0
Request Body
{ "username": "user1", "password": "strongPass1234", "admin": 0, "notes": "some text", "recipientLimit": 10, "billingStatus": "open", "name": { "name": "John Smith", "company": "My Company", "department": "Sales", "title": "President" }, "address": { "address": "100 Main St.", "city": "Chicago", "state": "IL", "zip": "60001", "country": "US" }, "phones": { "businessPhone": "555-555-5501", "homePhone": "555-555-5502", "fax": "555-555-5503", "mobile": "555-555-5504" } }
- username - string
- the username of the mailbox. Cannot be updated
- password - string
- (OPTIONAL)
- a new password for the mailbox. Will be available if password-reset is set to 1
- admin - int
- Changes whether the user is admin or not.
- notes - string
- any notes to be set on the mailbox
- recipientLimit - integer
- the maximum number of recipients to which email can be sent from this mailbox. Allowed values are integers from 1 to 100.
- billingStatus - string
- Status of the mailbox. Cannot be changed
- name - dictionary
- Additional information pertaining to the mailbox owner's identity
- name - string
- The name of the mailbox owner
- company - string
- The company name of the mailbox owner
- department - string
- The department name of the mailbox owner
- title - string
- The title of the owner of the mailbox
- address - dictionary
- Mailing address information for the mailbox owner
- address - string
- Street address of the mailbox owner
- city - string
- City of the mailbox owner
- state - string
- State or province of the mailbox owner
- zip - string
- The zip or postal code of the mailbox owner
- country - string
- The 2-letter ISO country code of the mailbox owner. See http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm for a listing of all country codes.
- phones - dictionary
- Phone contact information for the mailbox owner
- businessPhone - string
- The business phone number of the mailbox owner
- homePhone - string
- The home phone number of the mailbox owner
- fax - string
- A fax number for the mailbox owner
- mobile - string
- A mobile phone number for the mailbox owner
Expected Response Codes
- 200
- OK
- 400
- Bad Request
- 404
- Non-existent resource
- 405
- Unsupported method
- 502
- Internal server error
Examples
PUT {server_name}/accounts/account300021/exchange/ng-test-hwus-120120b.com/mailboxes/user1
- Request Headers:
Content-Type:application/json Charset=UTF-8 Authorization:Base64-encoded username & password string
- Request Body:
{ "username": "user1", "admin": 0, "notes": "some text", "recipientLimit": 10, "billingStatus": "open", "name": { "name": "John Smith", "company": "My Company", "department": "Sales", "title": "President" }, "address": { "address": "100 Main St.", "city": "Chicago", "state": "IL", "zip": "60001", "country": "US" }, "phones": { "businessPhone": "555-555-5501", "homePhone": "555-555-5502", "fax": "555-555-5503", "mobile": "555-555-5504" } }
- Response: OK (204):
Server : nginx/0.6.32 Date : Wed, 11 Apr 2012 14:26:07 GMT Content-Type : application/json; charset=UTF-8 Connection : keep-alive Access-Control-Allow-Origin : * Location : http://{server_name}/accounts/account300021/exchange/ng-test-hwus-120120b.com/mailboxes/user1/ Content-Length : 0
- There will be a Location header in the response pointing to the edited resource.
PUT {server_name}/accounts/account300021/exchange/ng-test-hwus-120120b.com/mailboxes/{non_existent_contact_id}
- Request Headers:
Content-Type:application/json Charset=UTF-8 Authorization:Base64-encoded username & password string
- Request Body:
{ "username": "user1", "password": "strongPass1234", "admin": 0, "notes": "some text", "recipientLimit": 10, "billingStatus": "open", "name": { "name": "John Smith", "company": "My Company", "department": "Sales", "title": "President" }, "address": { "address": "100 Main St.", "city": "Chicago", "state": "IL", "zip": "60001", "country": "US" }, "phones": { "businessPhone": "555-555-5501", "homePhone": "555-555-5502", "fax": "555-555-5503", "mobile": "555-555-5504" } }
- Response: Not Found (404):
404 Not Found The resource could not be found.