Accounts-account-email-domain-usernames-mailboxName-exchange:PUT

(Difference between revisions)
Jump to: navigation, search
m (1 revision: Release 103)
Line 54: Line 54:
 
:: Minimum length 8
 
:: Minimum length 8
 
:: Maximum length 128
 
:: Maximum length 128
 +
:: Should start with a letter
 
:: Should have at least one digit
 
:: Should have at least one digit
 
:: Should have at least one capital letter
 
:: Should have at least one capital letter

Revision as of 11:43, 6 July 2016

Contents

PUT accounts/{account}/email/{domain}/usernames/{mailboxName}/exchange

Creates or updates an exchange mailbox for specified account and domain.


Request

PUT accounts/{account}/email/{domain}/usernames/{mailboxName}/exchange

URI Parameters

account - string
domain - string
mailboxName - string
The exchange mailbox. String should meet the regexp [a-zA-Z0-9._-]+ ,max 64 characters

Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.
Content-Type
Required. Set this header to application/json; charset=UTF-8


Request Body

{
    "password": "{password}", 
    "resetPassword": {resetPassword},
    "displayName": "{displayName}",
    "type": {type},
    "resourceType": "{resourceType}",
    "firstName": {firstName},
    "lastName": {lastName},
    "city": {city},
    "company": {company},
    "country": {country},
    "department": {department},
    "fax": {fax},
    "homePhone": {homePhone},
    "mobilePhone": {mobilePhone},
    "postalCode": {postalCode},
    "state": {state},
    "street": {street},
    "title": {title},
}
 


Parameters

password - string (Required when creating mailbox)
The password. The password should be at least 8 characters long, a mix of numbers, symbols and mixed-case letters. It should not begin with "pass", "123", "abc", should not contain the second-level domain name of the service, should not contain the username of the mailbox or start with its first 3 characters. There is a restriction using the same password more than once.
Password validation rules:
Password must not be used more than once
Minimum length 8
Maximum length 128
Should start with a letter
Should have at least one digit
Should have at least one capital letter
Should have at least one lower case letter
Should contain at least one special character (any character other than lower or uppercase letters, digits and underscore "_" is considered special character)
Should not start with the phrase 'pass' case-insensitively
Should not start with 'abc' case-insensitively
Should not start with 123
Must not contain second-level domain, username or start with the first 3 letters from the username
resetPassword - boolean (Optional)
The resetPassword flag is set for "exchange" mailbox, forcing the user to change his password on next logon.
displayName - string (Required when creating mailbox)
Display Name(256 characters), The displayName parameter specifies the user's display name.
type - string - one of "standard" or "premium"
Exchange account type. Valid values are standard, premium. If not provided - standard is default.
resourceType - string - one of "user", "equipment" or "room"
Exchange resource type. If not provided - user is default. Passing this parameter when updating mailbox will result in 400 Bad Request error
firstName
First name(64 characters), The firstName parameter specifies the user's given name.
lastName
Last name(64 characters), The lastName parameter specifies the user's surname
city
City Name(128 characters), The city parameter specifies the user's city.
company
Company Name(64 characters), The company parameter specifies the user's company.
country
Country Name(128 characters), The country parameter specifies the user's country or region.
department
Department Name(64 characters), The department parameter specifies the user's department.
fax
FAX number(64 characters), The fax parameter specifies the user's fax number.
homePhone
Home phone number(64 characters), The homePhone parameter specifies the user's home telephone number.
mobilePhone
Mobile phone number(64 characters), The mobilePhone parameter specifies the user's mobile phone number.
postalCode
Zip code(40 characters), The postalCode parameter specifies the user's zip code or postal code.
state
State / Province(128 characters), The state parameter specifies the user's state or province.
street
Street name(1024 characters), The street parameter specifies the user's physical address.
title
Title(128 characters), The Title parameter specifies the user's title.

Response

Status Code

201 Created
Success
204 No Content
Success
400 Bad Request
The format of the request body is invalid or the username does not meet the requirements.
401 Unauthorized
The supplied credentials are invalid or do not provide permissions for this operation.
404 Not Found
The domain name does not exist.
409 Conflict
The mailbox already exists(on create) or domain is disabled(on update).

Examples

Trying to create exchange mailbox without a password

Request

PUT /accounts/test-account123/email/test.com/usernames/john.smith/exchange 

{"displayName": "John"}
 

Response

400 Bad Request

{"password":"Required"}
 


Trying to create exchange mailbox without a displayName

Request

PUT /accounts/test-account123/email/test.com/usernames/john.smith/exchange 

{"password": "pWord123$"}
 

Response

400 Bad Request

{"displayName":"Required"}
 

Trying to create exchange mailbox with a not valid password

Request

PUT /accounts/test-account123/email/test.com/usernames/john.smith/exchange 

{"password": "abc1234", "displayName": "John"}
 

Response

400 Bad Request

{"password":"Password should not start with 'abc' case-insensitively"}
 

Create exchange mailbox

Request

PUT /accounts/test-account123/email/test.com/usernames/john.smith/exchange 

{"password": "pWord123$", "displayName": "John"}
 

Response

201 Created
 

Create premium exchange mailbox

Request

PUT /accounts/test-account123/email/test.com/usernames/john.smith/exchange 

{"password": "pWord123$", "displayName": "John", "type": "premium"}
 

Response

201 Created
 

Update exchange mailbox password

Request

PUT /accounts/test-account123/email/test.com/usernames/john.smith/exchange 

{"password": "!q2w3e4R"}
 

Response

204 No Content
 

Create exchange room

Request

PUT /accounts/test-account123/email/test.com/usernames/john.smith.room/exchange 

{"password": "pWord123$", "displayName": "John", "resourceType":"room"}
 

Response

201 Created
 

Trying to update exchange resource type

Request

PUT /accounts/test-account123/email/test.com/usernames/john.smith.rooh/exchange 

{"resourceType": "equipment"}
 

Response

400 Bad Request
resourceType cannot be updated
 

Update exchange mailbox, forcing the user to reset his password on next logon

Request

PUT /accounts/test-account123/email/test.com/usernames/john.smith/exchange 

{"resetPassword": true}
 

Response

204 No Content
 


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox