PUT api/Mail/{handle}?user={user}
Update an existing mail box
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| handle |
Object handle of the mailbox |
string |
Required |
| user |
User handle |
string |
None. |
Body Parameters
Mailbox properties
MailBoxUpdate| Name | Description | Type | Additional information |
|---|---|---|---|
| UserType |
User type - pop or alias |
string |
None. |
| UserName |
User name |
string |
None. |
| UserPwd |
User password |
string |
None. |
| UserDescription |
User description |
string |
None. |
| UserMailAddress |
Email address of mail box |
string |
None. |
| IsCatchAll |
Catch all flag |
boolean |
None. |
| IsRedir |
Is a redirection |
boolean |
None. |
| Forward |
Forward to address(s) for user type alias or when is a redirection |
Collection of string |
None. |
| Alias |
List of aliases for this address |
Collection of string |
None. |
| Errors |
List of errors encountered |
Collection of Error |
None. |
Request Formats
application/json, text/json
{
"UserType": "sample string 3",
"UserName": "sample string 4",
"UserPwd": "sample string 5",
"UserDescription": "sample string 6",
"UserMailAddress": "sample string 7",
"IsCatchAll": true,
"IsRedir": true,
"Forward": [
"sample string 1",
"sample string 2"
],
"Alias": [
"sample string 1",
"sample string 2"
],
"Errors": []
}
application/xml, text/xml
<MailBoxUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models">
<Alias xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</Alias>
<Errors />
<Forward xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</Forward>
<IsCatchAll>true</IsCatchAll>
<IsRedir>true</IsRedir>
<ServiceHandle>sample string 1</ServiceHandle>
<UserDescription>sample string 6</UserDescription>
<UserMailAddress>sample string 7</UserMailAddress>
<UserName>sample string 4</UserName>
<UserPwd>sample string 5</UserPwd>
<UserType>sample string 3</UserType>
</MailBoxUpdate>
application/x-www-form-urlencoded
Response Information
Resource Description
a mailboxe object on success
Collection of errors on failure
Return codes
200 - ok
400 - bad request
401 - unauthorized
404 - not found
500 - internal server error
513 - quota exceeded
530 - invalid attribute value
550 - parameter value policy error
551 - duplicate entry
| Name | Description | Type | Additional information |
|---|---|---|---|
| ObjectHandle |
Object handle of the mail box |
string |
None. |
| DomHandle |
Object handle of the domain |
string |
None. |
| State |
State after execution - completed or pending |
string |
None. |
| CreDate |
Create date |
date |
None. |
| ServiceHandle |
Object handle of the mail service |
string |
None. |
| UserType |
User type - pop or alias |
string |
None. |
| UserName |
User name |
string |
None. |
| UserPwd |
User password |
string |
None. |
| UserDescription |
User description |
string |
None. |
| UserMailAddress |
Email address of mail box |
string |
None. |
| IsCatchAll |
Catch all flag |
boolean |
None. |
| IsRedir |
Is a redirection |
boolean |
None. |
| Forward |
Forward to address(s) for user type alias or when is a redirection |
Collection of string |
None. |
| Alias |
List of aliases for this address |
Collection of string |
None. |
| Errors |
List of errors encountered |
Collection of Error |
None. |
Response Formats
application/json, text/json
{
"ObjectHandle": "some2",
"DomHandle": "somed1",
"State": null,
"CreDate": "0001-01-01T00:00:00",
"ServiceHandle": "some1",
"UserType": "pop",
"UserName": "user",
"UserPwd": null,
"UserDescription": null,
"UserMailAddress": "someone@somedomain.com",
"IsCatchAll": null,
"IsRedir": null,
"Forward": null,
"Alias": null,
"Errors": []
}
application/xml, text/xml
<MailBox xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Namebay.Rest.Api.Models"> <Alias xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" /> <Errors /> <Forward xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" /> <IsCatchAll i:nil="true" /> <IsRedir i:nil="true" /> <ServiceHandle>some1</ServiceHandle> <UserDescription i:nil="true" /> <UserMailAddress>someone@somedomain.com</UserMailAddress> <UserName>user</UserName> <UserPwd i:nil="true" /> <UserType>pop</UserType> <CreDate>0001-01-01T00:00:00</CreDate> <DomHandle>somed1</DomHandle> <State i:nil="true" /> </MailBox>