POST api/Mail?user={user}
Create a new mail box
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
user |
User handle |
string |
None. |
Body Parameters
Mailbox properties
MailBoxName | Description | Type | Additional information |
---|---|---|---|
ServiceHandle |
Object handle of the mail service |
string |
Required |
ObjectHandle |
Object handle of the mail box |
string |
None. |
DomHandle |
Object handle of the domain |
string |
None. |
UserType |
User type - pop or alias |
string |
Required |
UserName |
User name |
string |
None. |
UserPwd |
User password |
string |
None. |
UserDescription |
User description |
string |
None. |
UserMailAddress |
Email address of mail box |
string |
Required |
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. |
Etat |
Update mode - 1 new, 2 update, 3 delete |
integer |
None. |
State |
State after execution - completed or pending |
string |
None. |
CreDate |
Create date |
date |
None. |
Errors |
List of errors encountered |
Collection of Error |
None. |
Request Formats
application/json, text/json
{ "ServiceHandle": "some1", "ObjectHandle": "some2", "DomHandle": "somed1", "UserType": "pop", "UserName": "user", "UserPwd": null, "UserDescription": null, "UserMailAddress": "someone@somedomain.com", "IsCatchAll": false, "IsRedir": false, "Forward": null, "Alias": null, "Etat": 0, "State": null, "CreDate": "0001-01-01T00:00:00", "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" /> <CreDate>0001-01-01T00:00:00</CreDate> <DomHandle>somed1</DomHandle> <Errors /> <Etat>0</Etat> <Forward xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" /> <IsCatchAll>false</IsCatchAll> <IsRedir>false</IsRedir> <ObjectHandle>some2</ObjectHandle> <ServiceHandle>some1</ServiceHandle> <State i:nil="true" /> <UserDescription i:nil="true" /> <UserMailAddress>someone@somedomain.com</UserMailAddress> <UserName>user</UserName> <UserPwd i:nil="true" /> <UserType>pop</UserType> </MailBox>
application/x-www-form-urlencoded
Sample not available.
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 |
---|---|---|---|
ServiceHandle |
Object handle of the mail service |
string |
Required |
ObjectHandle |
Object handle of the mail box |
string |
None. |
DomHandle |
Object handle of the domain |
string |
None. |
UserType |
User type - pop or alias |
string |
Required |
UserName |
User name |
string |
None. |
UserPwd |
User password |
string |
None. |
UserDescription |
User description |
string |
None. |
UserMailAddress |
Email address of mail box |
string |
Required |
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. |
Etat |
Update mode - 1 new, 2 update, 3 delete |
integer |
None. |
State |
State after execution - completed or pending |
string |
None. |
CreDate |
Create date |
date |
None. |
Errors |
List of errors encountered |
Collection of Error |
None. |
Response Formats
application/json, text/json
{ "ServiceHandle": "some1", "ObjectHandle": "some2", "DomHandle": "somed1", "UserType": "pop", "UserName": "user", "UserPwd": null, "UserDescription": null, "UserMailAddress": "someone@somedomain.com", "IsCatchAll": false, "IsRedir": false, "Forward": null, "Alias": null, "Etat": 0, "State": null, "CreDate": "0001-01-01T00:00:00", "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" /> <CreDate>0001-01-01T00:00:00</CreDate> <DomHandle>somed1</DomHandle> <Errors /> <Etat>0</Etat> <Forward xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" /> <IsCatchAll>false</IsCatchAll> <IsRedir>false</IsRedir> <ObjectHandle>some2</ObjectHandle> <ServiceHandle>some1</ServiceHandle> <State i:nil="true" /> <UserDescription i:nil="true" /> <UserMailAddress>someone@somedomain.com</UserMailAddress> <UserName>user</UserName> <UserPwd i:nil="true" /> <UserType>pop</UserType> </MailBox>