Accounts-account-email-domain-usernames-mailboxName-autoresponder:PUT
From Hostway API Documentation
Revision as of 08:56, 11 March 2015 by Viktor.penkov (Talk)
PUT accounts/{account}/email/{domain}/usernames/{mailbox}/autoresponder
Activates/deactivates the autoresponder for specified mailbox,domain and account.
Contents |
Request
PUT accounts/{account}/email/{domain}/usernames/{mailbox}/autoresponder
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
{ "subject": "{subject}", "body": "{body}", "active": {active} }
Parameters
- subject - string
- The subject of auto-responder.
- body - string
- The body of auto-responder. Required.
- active - boolean
- Sets the status of auto-responder. Required.
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 setting the autoresponder with missing required parameter
Request
PUT accounts/test-account123/email/test.com/usernames/test/autoresponder {"subject": "Subject", "active": true}
Response
400 Bad Request {"body":"Required"}
Success setting the auto-responder
Request
PUT accounts/test-account123/email/test.com/usernames/test/autoresponder {"subject": "Subject", "body": "AutoRespond", "active": true}
Response
204 No Content
Success deactivating the auto-responder
Request
PUT accounts/test-account123/email/test.com/usernames/test/autoresponder {"body": "AutoRespond", "active": false}
Response
204 No Content