Email-domain-usernames-mailboxName-secrets:PUT
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 98) |
Mike.robski (Talk | contribs) (Moved the internal configuration comment to https://home.hostway/wiki/display/DevOps/MFG) |
||
Line 27: | Line 27: | ||
; answer - ''string'' (Required) | ; answer - ''string'' (Required) | ||
: The answer in plain-text - must be at least two characters. | : The answer in plain-text - must be at least two characters. | ||
− | |||
=== Request Headers === | === Request Headers === | ||
{{Authorization}} | {{Authorization}} |
Revision as of 09:01, 14 October 2014
PUT /email/{domain}/usernames/{mailboxName}/secrets
Set or update all secret questions and answers for mailbox(alias).
Contents |
Request
PUT /email/{domain}/usernames/{mailboxName}/secrets
Request Parameters
- domain - string
- The specific mailbox domain
- maiboxName - string
- The name of the mailbox
Request Body
{ "{tk}": "{answer}", "{tk}": "{answer}", ... }
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.
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
Response
Status Code
- 204 No Content
- Success
- 400 Bad Request
- The format of the request body is invalid or at least three pairs of secret questions and answers required.
- 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.
Examples
Success scenario
Request
PUT /email/test.com/usernames/test-mailbox/secrets { "tk1": "answer1", "tk2": "answer2", "tk3": "answer3" }
Response
204 No Content
Set only two secret questions and answers
Request
PUT /email/test.com/usernames/test-mailbox/secrets { "tk1": "answer1", "tk2": "answer2" }
Response
400 Bad Request "details": {"": "Shorter than minimum length 3"}
See also