Accounts-account-email-domain-usernames-mailboxName-cleanmailplus:PUT
From Hostway API Documentation
(Difference between revisions)
Mike.robski (Talk | contribs) |
Mike.robski (Talk | contribs) m (1 revision: Release 87 - update) |
Latest revision as of 08:39, 26 November 2013
[edit] PUT accounts/{account}/email/{domain}/usernames/{mailbox}/cleanmailplus
Updates mailbox's CleanMailPlus info.
[edit] Request
PUT accounts/{account}/email/{domain}/usernames/{mailbox}/cleanmailplus
[edit] URI Parameters
- account - string
- domain - string
- mailbox - string
[edit] 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
[edit] Request Body
{
"attributes": [
{
"attributeName": "{attribute_name}",
"attributeValue": "{attribute_value}"
}
]
}
[edit] Parameters
- attributeName - string
- Attribute's name.
- attributeValue - string
- New attribute's value.
[edit] Response
[edit] Status Code
- 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 or mailbox does not exist.
[edit] Examples
[edit] Failure updating the CleanMailPlus filter attributes for a non-existent domain
Request
PUT accounts/{account}/email/non-existent-domain.com/usernames/mailbox-cleanmailplus/cleanmailplus
{
"attributes": [
{
"attributeName": "SPAM_LEVEL",
"attributeValue": "1"
}
]
}
Response
404 Not Found
{
"itemNotFound": {
"message": "Resource not found",
"code": 404,
"details": {
"message": "Domain not found"
}
}
}
[edit] Failure updating the CleanMailPlus filter attributes by providing bad request body
Request
PUT accounts/{account}/email/test.com/usernames/mailbox-cleanmailplus/cleanmailplus
{
"badBody":"badBodyValue"
}
Response
400 Bad Request
{
"attributes": "Required"
}
[edit] Failure updating the cleanmailplus filter attribute by providing a non-existent attribute name
Request
PUT accounts/{account}/email/test.com/usernames/mailbox-cleanmailplus/cleanmailplus
{
"attributes": [
{
"attributeName": "NON_EXISTENT_ATTRIBUTE_NAME",
"attributeValue": "1"
}
]
}
Response
400 Bad Request
{
"attributes.0": "NON_EXISTENT_ATTRIBUTE_NAME is not valid filter attribute name"
}
[edit] Failure updating the cleanmailplus filter attribute by providing a non-valid attribute value
Request
PUT accounts/{account}/email/test.com/usernames/mailbox-cleanmailplus/cleanmailplus
{
"attributes": [
{
"attributeName": "SPAM_LEVEL",
"attributeValue": "val01"
}
]
}
Response
400 Bad Request
{
"attributes.0": "val01 is not valid attribute option for SPAM_LEVEL filter attribute"
}
[edit] Success updating the CleanMailPlus filter attributes
Request
PUT accounts/{account}/email/test.com/usernames/test/cleanmailplus
{
"attributes": [
{
"attributeName": "SPAM_LEVEL",
"attributeValue": "1"
},
{
"attributeName": "SPAM_ACTION",
"attributeValue": "1"
}
]
}
Response
204 No Content