Email-domain-usernames-mailboxName-mailbox-action:POST

From Hostway API Documentation
Revision as of 08:58, 5 September 2014 by Jerry.dimitrov (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

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

Contents


Request

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

Request Parameters

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": {
    "secretQuestion": "{tk}",
    "secretAnswer": "{answer}",
    "password": "{password}"
  } 
}
 
action - string
The action that should be performed. Allowed values are:
resetPassword - Reset the password of a mailbox.
actionData - string (Required)
Data to be send with the action.
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 /email/test.com/usernames/mailbox123/mailbox/action
Content-Type: application/json; Charset=UTF-8

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

Response

204 No Content
 

Request password reset of a mailbox with wrong answer

Request

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

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

Response

409 Conflict

{
  "conflict": {
    "message": "Verification failed",
    "code": 409, 
  }
}
 

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox