Email-domain-usernames-mailboxName-secrets:PUT

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
(Moved the internal configuration comment to https://home.hostway/wiki/display/DevOps/MFG)
m (1 revision: Release 101)
 
(2 intermediate revisions by 2 users not shown)
Line 40: Line 40:
  
 
; 400 Bad Request
 
; 400 Bad Request
: The format of the request body is invalid or at least three pairs of secret questions and answers required.
+
: The format of the request body is invalid or the number of the secret questions and answers pairs in the request is lower then the [[Email-secretQuestionSettings:GET|required minimum]].
  
 
; 401 Unauthorized
 
; 401 Unauthorized
Line 70: Line 70:
 
  </nowiki>
 
  </nowiki>
  
=== Set only two secret questions and answers ===
+
=== Set only two secret questions and answers, when the required minimum is three ===
 
'''Request'''
 
'''Request'''
 
  <nowiki>
 
  <nowiki>

Latest revision as of 23:50, 16 December 2014

[edit] PUT /email/{domain}/usernames/{mailboxName}/secrets

Set or update all secret questions and answers for mailbox(alias).

Contents


[edit] Request

PUT /email/{domain}/usernames/{mailboxName}/secrets

[edit] Request Parameters

domain - string
The specific mailbox domain
maiboxName - string
The name of the mailbox

[edit] Request Body

{
    "{tk}": "{answer}",
    "{tk}": "{answer}",
    ...
}
 

[edit] Parameters

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.

[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] Response

[edit] Status Code

204 No Content
Success
400 Bad Request
The format of the request body is invalid or the number of the secret questions and answers pairs in the request is lower then the required minimum.
401 Unauthorized
The supplied credentials are invalid.
403 Forbidden
The authorized user does not have permissions for this operation.
404 Not Found
The domain name, mailbox or account does not exist.

[edit] Examples

[edit] Success scenario

Request

PUT /email/test.com/usernames/test-mailbox/secrets

{
    "tk1": "answer1",
    "tk2": "answer2",
    "tk3": "answer3"
}
 

Response

204 No Content
 

[edit] Set only two secret questions and answers, when the required minimum is three

Request

PUT /email/test.com/usernames/test-mailbox/secrets

{
    "tk1": "answer1",
    "tk2": "answer2"
}
 

Response

400 Bad Request

"details": {"": "Shorter than minimum length 3"}
 

[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox