Accounts-account-email-domain-cleanmailplus:PUT

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
(Created page with "= PUT accounts/{account}/email/{domain}/cleanmailplus = Updates domain's CleanMailPlus info. __TOC__ == Request == <code>PUT accounts/{account}/email/{domain}/cleanmailplus<...")
 
m (1 revision: Release 109)
 

Latest revision as of 12:15, 24 July 2015

[edit] PUT accounts/{account}/email/{domain}/cleanmailplus

Updates domain's CleanMailPlus info.

Contents


[edit] Request

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

[edit] URI Parameters

account - string
domain - 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 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/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/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/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/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/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