Accounts-account-email-domain-cleanmailplus:PUT

From Hostway API Documentation
Jump to: navigation, search

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

Updates domain's CleanMailPlus info.

Contents


Request

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

URI Parameters

account - string
domain - 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 does not exist.

Examples

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

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

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

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

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