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

From Hostway API Documentation
Revision as of 08:38, 26 November 2013 by Mike.robski (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PUT accounts/{account}/email/{domain}/usernames/{mailbox}/cleanmailplus

Updates mailbox's CleanMailPlus info.

Contents


Request

PUT accounts/{account}/email/{domain}/usernames/{mailbox}/cleanmailplus

URI Parameters

account - string
domain - string
mailbox - string

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

{
   "attributes": [
      {
         "attributeName": "{attribute_name}", 
         "attributeValue": "{attribute_value}"
      }
   ]
}
 


Parameters

attributeName - string
Attribute's name.
attributeValue - string
New attribute's value.

Response

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.

Examples

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"
      }
   }
}
 

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"
}
 

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"
}
 

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"
}
 

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
 



blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox