Accounts-account-email-domain-usernames-mailboxName-mailbox-action:POST

From Hostway API Documentation
Jump to: navigation, search

POST /accounts/{account}/email/{domain}/usernames/{mailboxName}/mailbox/action

Apply an action on a mailbox e.g. reset password

Contents


Request

POST /accounts/{account}/email/{domain}/usernames/{mailboxName}/mailbox/action

Request Parameters

account - string
The user account owning the domain and the mailboxes
domain - string
The specific domain for which the call will retrieve the list
maiboxName - string
The name of the mailbox.

Request Headers

Content-Type
Required. Set this header to application/json; charset=UTF-8

Request Body

{ 
  "action": "resetPassword", 
  "actionData": {
    "secretQuestionsAnswers": {"{tk}": "{answer}"},
    "password": "{password}"
  } 
}
 
action - string
The action that should be performed. Allowed values are:
resetPassword - Reset the password of a mailbox.
actionData - dictionary (Required)
Data to be send with the action.
secretQuestionsAnswers - dictionary (Required)
Dictionary of key/value pairs, each of which represents secret question text key/answer pair.
tk - string (Required)
The text key for the secret question. There should be no duplicate text keys per mailbox.
answer - string (Required)
The answer in plain-text - must be at least two characters.
password - string (Required)
The password. The password should be at least 8 characters long, a mix of numbers, symbols and mixed-case letters. It should not begin with "pass", "123", "abc", should not contain the second-level domain name of the service, should not contain the username of the mailbox or start with its first 3 characters. There is a restriction using the same password more than once.
Password validation rules:
Password must not be used more than once
Minimum length 8
Maximum length 128
Should have at least one digit
Should have at least one capital letter
Should have at least one lower case letter
Should contain at least one special character (any character other than lower or uppercase letters, digits and underscore "_" is considered special character)
Should not start with the phrase 'pass' case-insensitively
Should not start with 'abc' case-insensitively
Should not start with 123
Must not contain second-level domain, username or start with the first 3 letters from the username


Response

Expected Response Codes

204 No Content
Success
400 Bad Request
The supplied action or the supplied data is invalid.
404 Not Found
The resource does not exist.
409 Conflict
Validation of the secret answer failed.

Examples

Request password reset of a mailbox

Request

POST /accounts/account123/email/test.com/usernames/mailbox123/mailbox/action
Content-Type: application/json; Charset=UTF-8

{ 
  "action": "resetPassword",
  "actionData": {
    "secretQuestionsAnswers": {"tk1": "answer123"},
    "password": "pWord123$"
}
 

Response

204 No Content
 

Request password reset of a mailbox with wrong answer

Request

POST /accounts/account123/email/test.com/usernames/mailbox123/mailbox/action
Content-Type: application/json; Charset=UTF-8

{ 
  "action": "resetPassword",
  "actionData": {
    "secretQuestionsAnswersList": {"tk1": "wrongAnswer"},
    "password": "pWord123$"
}
 

Response

409 Conflict

{
  "conflict": {
    "message": "Invalid secret questions and answers provided",
    "code": 409, 
  }
}
 

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox