Unicat API Reference

Up - API Reference - Home


/api/account/update_email_request

Requires JWT.

Update the email address for the current account.

Note: updating the email address is a two-step process; this is the first step that initiates the action, the second step completes it, see /api/account/update_email.

Request

POST /api/account/update_email_request
Authorization: Bearer <JWT>

{
    "email": "<your-new-email>",
}

email a valid email address where the verification code will be sent. An email address is not case-sensitive.

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "validation_code": "<validation-code>",
    },
    "data": {}
}

Also, an email is sent to the given email address. This email contains a 6-character verification code. This one-time code is valid for 15 minutes. Both validation and verification codes must be submitted in step 2.

result

validation_code is one of the codes that must be submitted in the completion step - the other code is sent via email.

Error response

400 Bad request - missing argument
401 Unauthorized - missing or expired JWT
1001 Validation error - unavailable username or weak password - see Validation information