Account

api/account endpoint documentation


New account

Description Creates new account for a given email address.
Endpoint url api/account/create
Method POST
Params
Required
Name Type Value Description
email string A proper email address format. A unique email address the account will be created for.
password string - Password to protect the account.
Success response

{
    "code": 200,
    "body": {
        "data": {
            "token": "$2y$13$YSC.yeHOnoqTw.HdC0OaTeTAQcSDoFj7uXmkoU88FhMbW7LY8WH7y",
            "uuid": "a5c69ad8-bad4-54f9-3740-f416da83c8cd"
        }
    }
}
Error response

{
    "code": 422,
    "body": {
        "data": [],
        "errors": {
            "email": [
                "Email "email@example.com" has already been taken."
            ]
        }
    }
}

BuyNowJs © 2018