Accounts-account-email-domain-usernames-mailboxName-autoresponder:PUT
From Hostway API Documentation
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 105) |
Latest revision as of 12:57, 3 April 2015
[edit] PUT accounts/{account}/email/{domain}/usernames/{mailbox}/autoresponder
Activates/deactivates the autoresponder for specified mailbox,domain and account.
Contents |
[edit] Request
PUT accounts/{account}/email/{domain}/usernames/{mailbox}/autoresponder
[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
{ "subject": "{subject}", "body": "{body}", "active": {active} }
[edit] 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.
[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 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"}
[edit] 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
[edit] Success deactivating the auto-responder
Request
PUT accounts/test-account123/email/test.com/usernames/test/autoresponder {"body": "AutoRespond", "active": false}
Response
204 No Content